form disappears

inter

Freshman
Joined
Jul 22, 2005
Messages
36
hello,

in vb.net i create a new form instance in my sub main.

Visual Basic:
Public Module programme
    Public Sub main()
        Dim formulier As New Form1
        formulier.Show()
    End Sub
End Module

the form appears but then dissapears again... what is this?
why doesn't it stop when it once appears ?

thx,

inter
 
You also need to tell windows to use the form for processing any windows messages
Visual Basic:
Public Module programme
    Public Sub main()
        Dim formulier As New Form1
        formulier.Show()
        Application.Run(formulier)
    End Sub
End Module
should sort you out.
 
PlausiblyDamp said:
You also need to tell windows to use the form for processing any windows messages

thanks, it works. would think that it would be standard..that the form stops when shown....
 
Hellow
Hi

when i show a form using
dim x as new form2
x.show ()
------------
when I use this a gian in command_click it will show the form a gain at the same time " it means may copy of the form it selef "
plese i search for a just a way to show a form only as one form without showing it as many forms of the forms it selef

thanks lot for your help

Osamah Lahham
Jordanian
 
Osamah, place the "Dim x As New Form2()" outside of your command_click function. That way you will only ever have one instance of the form created at once. x.Show() should still remain in command_click.
 
Back
Top