|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
dispose the login formThe program i have has login form.
After a user has loged in, formX is loaded and i want to dispose all the forms that where used before (login form). so the result should be the same as when you use formX as your startup object. I dont want: - to hide or minimaze the login form. - use showdialog. Is this possible? JT,
Normally all your not with showdialog showed forms are disposed automaticly, at a time that it is for your system the best time. Therefore it is managed code. I am curious why you ask this? Cor Hello Cor,
the problem is the following, when i dispose my login form, the application stops. for example, if a user loges in and i use formX.show and than close the login form. FormX will also be closed. When i use FormX.ShowDialog, the login form will exist untill FormX is closed. jt Show quoteHide quote "Cor Ligthert [MVP]" wrote: > JT, > > Normally all your not with showdialog showed forms are disposed > automaticly, at a time that it is for your system the best time. > > Therefore it is managed code. > > I am curious why you ask this? > > Cor > > > JT,
I would use the showdialog. Be aware that there are some bugs in the version 1.x when it is about the closing buttons of that. If you need some samples, reply. This newsgroup is full of that in the most advanced formats and the Google Newsgroup search is the best for that. This only the one I wrote about showdialog. http://groups.google.com/group/microsoft.public.dotnet.languages.vb/search?group=microsoft.public.dotnet.languages.vb&q=showdialog+cor&qt_g=1&searchnow=Search+this+group Cor Cor,
Thank you for your support, but as a mentioned, i dont want to use the showdialog. Larry pointed me out the Application.Run(formXvariable) option and that did the trick. Thanks. Show quoteHide quote "Cor Ligthert [MVP]" wrote: > JT, > > I would use the showdialog. Be aware that there are some bugs in the version > 1.x when it is about the closing buttons of that. > > If you need some samples, reply. > > This newsgroup is full of that in the most advanced formats and the Google > Newsgroup search is the best for that. > > This only the one I wrote about showdialog. > > http://groups.google.com/group/microsoft.public.dotnet.languages.vb/search?group=microsoft.public.dotnet.languages.vb&q=showdialog+cor&qt_g=1&searchnow=Search+this+group > > Cor > > > jt wrote:
> The program i have has login form. I would suggest:> > After a user has loged in, formX is loaded and i want to dispose all the > forms that where used before (login form). > > so the result should be the same as when you use formX as your startup object. > > I dont want: > - to hide or minimaze the login form. > - use showdialog. > > Is this possible? Have a Sub Main that is your startup object. This sub shows your login form (modally), then if login fails, just Exit Sub and the app will end; but if login is successful you can load up your formX then do Application.Run(formXvariable) which transfers the message loop to that instance of formX (which means the application's lifetime from then on depends on formX rather than Sub Main). -- Larry Lard Replies to group please Larry, that was what i was looking for:
Application.Run(formXvariable) Thanks Show quoteHide quote "Larry Lard" wrote: > > jt wrote: > > The program i have has login form. > > > > After a user has loged in, formX is loaded and i want to dispose all the > > forms that where used before (login form). > > > > so the result should be the same as when you use formX as your startup object. > > > > I dont want: > > - to hide or minimaze the login form. > > - use showdialog. > > > > Is this possible? > > I would suggest: > > Have a Sub Main that is your startup object. This sub shows your login > form (modally), then if login fails, just Exit Sub and the app will > end; but if login is successful you can load up your formX then do > > Application.Run(formXvariable) > > which transfers the message loop to that instance of formX (which means > the application's lifetime from then on depends on formX rather than > Sub Main). > > -- > Larry Lard > Replies to group please > >
vb.net tabpage copying dynamic
Refresh questions installing my app on another computer Question on finding records in a ado.net vb dataset Save lines drawn in the picturebox as an lmage Job LastRunOutCome?? installing an icon in the all users startup folder search within a arraylist Retrieving file info from ftp server data on datagridview not updated |
|||||||||||||||||||||||