inter Posted August 12, 2005 Posted August 12, 2005 hello, in vb.net i create a new form instance in my sub main. 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 Quote
Administrators PlausiblyDamp Posted August 12, 2005 Administrators Posted August 12, 2005 You also need to tell windows to use the form for processing any windows messages Public Module programme Public Sub main() Dim formulier As New Form1 formulier.Show() Application.Run(formulier) End Sub End Module should sort you out. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
inter Posted August 12, 2005 Author Posted August 12, 2005 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.... Quote
Osamah Posted August 15, 2005 Posted August 15, 2005 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 Quote
*Experts* Bucky Posted August 15, 2005 *Experts* Posted August 15, 2005 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. Quote "Being grown up isn't half as fun as growing up These are the best days of our lives" -The Ataris, In This Diary
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.