Results 1 to 6 of 6

Thread: messageBox Location

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Dec 2003
    Location
    Bristol, England (but heart is in Virginia)
    Posts
    2,949

    messageBox Location

    HI,

    Can we choose where a messagebox appears without making our own class?
    Taxes
    The more I learn about VB.NET the more I like dBaseIII Plus

    The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Maybe API ?? but can't be sure which one is .(SetWindow or something)

  3. #3
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Reading, UK
    Posts
    870
    create your own custom message box (a form, a button, voilla!)
    www.vb-tech.com
    .Net Freelance Development
    http://weblog.vb-tech.com/nick
    My blog

  4. #4

    Thread Starter
    PowerPoster
    Join Date
    Dec 2003
    Location
    Bristol, England (but heart is in Virginia)
    Posts
    2,949
    Hi Nick,

    "create your own custom message box (a form, a button, voilla!)"


    I have tried that but I could not inherit from the Windows message box -- you can't use the MessageBox Sub New in your derived form, unless you know otherwise.

    With the frmMessageBox I have designed I have to resize it every time it is called, otherwise it shrinks!!
    Last edited by taxes; Mar 22nd, 2004 at 10:06 AM.
    Taxes
    The more I learn about VB.NET the more I like dBaseIII Plus

    The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.

  5. #5
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Reading, UK
    Posts
    870
    even if you create a new instance of it every time you want to show it?

    If you create a new instance of one every time you want to show one you can pass the top, left, width, height, and text value in the new constructor?

    I am only saying this in principle! I've not tried it (yet) in practise!
    www.vb-tech.com
    .Net Freelance Development
    http://weblog.vb-tech.com/nick
    My blog

  6. #6

    Thread Starter
    PowerPoster
    Join Date
    Dec 2003
    Location
    Bristol, England (but heart is in Virginia)
    Posts
    2,949
    Hi Nick,

    "even if you create a new instance of it every time you want to show it?"


    I am using my custom message box to show the results of a loop at the end of each loop, so I only create one instance during that process. I have overcome it by resizing it on every occasion it is used, but I cannot see why I have to.

    I wanted to inherit from the windows MessageBox in order to save construction time, adding only an accessible location property.
    Taxes
    The more I learn about VB.NET the more I like dBaseIII Plus

    The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width