Results 1 to 5 of 5

Thread: form.showdialog() function - bug or is it just me ?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2002
    Posts
    23

    Red face form.showdialog() function - bug or is it just me ?

    I'm using the showdialog() function, and have put some code in the load event of the form.. guess what ? the load event doesn't run when I'm opening the form with showdialog().

    My code:
    Dim varFrmSetup As New frmSetup()
    varFrmSetup.ShowDialog()


    On the load event of the form:
    msgbox("test")


    The load event ONLY runs when I use the show function of the form instead of showdialog().

    Anybody ?

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Are you using any VB6 controls or COM components?

    For instance the MaskEditControl.

    Doing so sometimes causes events not to fire and you'll need to capture the window messages directly in order to fire the events.

    http://www.vbforums.com/showthread.p...ght=load+event

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Oct 2002
    Posts
    23

    Angry weird

    I'm not using any activeX components or upgrading from vb6.
    I'm actually rewriting vb6 code into .net methods.. more effective that way.

    Could this be a bug ?

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Oct 2002
    Posts
    23

    Angry It is a BUG - arghh


  5. #5
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    Another possible work around is to use the forms cunstructor(Sub New) Of course it gets fired when you isntantiate the form not when it 'loads' but it might work. Worth a try.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

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