|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
load form in vb.netI've got tthree forms at start up
splashscreen- works fine however how do i set the time delay so it stays on the window longer,, shows longer?? Loginscreen- works fine, after the data processing of username etc is done I then need to load, call whatever the syntax is the mainForm at the end of the loginscreen..????? how is that done so it starts at the mainForm_Load procedure??? As it stands now the mainform loads but just for a split second??>> MItch I had a simillar issue.
I had a "main form", "a spash screen", and a "login form". I main my #1 form in vb to be the "Main Form. On the OnLoad of the Main form, I call the splash screen. The splash screen will show even before the main form paints. Now, if you want the login form to show after the main form is painted, the only way I have solved this by putting the login.show somewhere, is kinda silly but it works. I added a timer to the main form, and put a 1/2 second timer delay on it. When the timer fires, i timer.enabled = false, and i show my login form. I realy couldnt figure out where to put the login form call so my main form displays and then the login on top. Miro Show quoteHide quote "Mitch5713" <mi***@nnex.net> wrote in message news:F9910603-6545-4732-8374-5FB883735D76@microsoft.com... > I've got tthree forms at start up > splashscreen- works fine however how do i set the time delay so it stays > on > the window longer,, shows longer?? > Loginscreen- works fine, after the data processing of username etc is done > I > then need to load, call whatever the syntax is the mainForm at the end of > the > loginscreen..????? how is that done so it starts at the mainForm_Load > procedure??? As it stands now the mainform loads but just for a split > second??>> > > MItch Miro,
You can use in this case in your load form method a login form that you call with ShowDialog, if you use it like this than the mainform is not even showed. If myLoginForm.ShowDialog <> Dialogresult.OK then messagebox.show("your login was wrong") me.close End if I hope this helps, Cor Show quoteHide quote "Miro" <miron***@golden.net> schreef in bericht news:e4upKuH8GHA.4620@TK2MSFTNGP02.phx.gbl... >I had a simillar issue. > > I had a "main form", "a spash screen", and a "login form". > > I main my #1 form in vb to be the "Main Form. > > On the OnLoad of the Main form, I call the splash screen. > > The splash screen will show even before the main form paints. > > Now, if you want the login form to show after the main form is painted, > the only way I have solved this by putting the login.show somewhere, is > kinda silly but it works. I added a timer to the main form, and put a 1/2 > second timer delay on it. > When the timer fires, i timer.enabled = false, and i show my login form. > > I realy couldnt figure out where to put the login form call so my main > form displays and then the login on top. > > Miro > > > "Mitch5713" <mi***@nnex.net> wrote in message > news:F9910603-6545-4732-8374-5FB883735D76@microsoft.com... >> I've got tthree forms at start up >> splashscreen- works fine however how do i set the time delay so it stays >> on >> the window longer,, shows longer?? >> Loginscreen- works fine, after the data processing of username etc is >> done I >> then need to load, call whatever the syntax is the mainForm at the end of >> the >> loginscreen..????? how is that done so it starts at the mainForm_Load >> procedure??? As it stands now the mainform loads but just for a split >> second??>> >> >> MItch > > Yes in my case however I wanted to show the main form.
So I needed to use the timer to display it 1/2 second after the main form. -Unless there is another way? M. Show quoteHide quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message news:es%23jt8H8GHA.4572@TK2MSFTNGP02.phx.gbl... > Miro, > > You can use in this case in your load form method a login form that you > call with ShowDialog, if you use it like this than the mainform is not > even showed. > > If myLoginForm.ShowDialog <> Dialogresult.OK then > messagebox.show("your login was wrong") > me.close > End if > > I hope this helps, > > Cor > > "Miro" <miron***@golden.net> schreef in bericht > news:e4upKuH8GHA.4620@TK2MSFTNGP02.phx.gbl... >>I had a simillar issue. >> >> I had a "main form", "a spash screen", and a "login form". >> >> I main my #1 form in vb to be the "Main Form. >> >> On the OnLoad of the Main form, I call the splash screen. >> >> The splash screen will show even before the main form paints. >> >> Now, if you want the login form to show after the main form is painted, >> the only way I have solved this by putting the login.show somewhere, is >> kinda silly but it works. I added a timer to the main form, and put a >> 1/2 second timer delay on it. >> When the timer fires, i timer.enabled = false, and i show my login form. >> >> I realy couldnt figure out where to put the login form call so my main >> form displays and then the login on top. >> >> Miro >> >> >> "Mitch5713" <mi***@nnex.net> wrote in message >> news:F9910603-6545-4732-8374-5FB883735D76@microsoft.com... >>> I've got tthree forms at start up >>> splashscreen- works fine however how do i set the time delay so it stays >>> on >>> the window longer,, shows longer?? >>> Loginscreen- works fine, after the data processing of username etc is >>> done I >>> then need to load, call whatever the syntax is the mainForm at the end >>> of the >>> loginscreen..????? how is that done so it starts at the mainForm_Load >>> procedure??? As it stands now the mainform loads but just for a split >>> second??>> >>> >>> MItch >> >> > > Miro,
Do you mean that your mainform is not showed after this, than there is something terrible wrong. If the login is correct, it does not close the mainform but shows it. :-) CorShow quoteHide quote "Miro" <miron***@golden.net> schreef in bericht news:%233vSkIL8GHA.4620@TK2MSFTNGP02.phx.gbl... > Yes in my case however I wanted to show the main form. > > So I needed to use the timer to display it 1/2 second after the main form. > -Unless there is another way? > > M. > > > "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message > news:es%23jt8H8GHA.4572@TK2MSFTNGP02.phx.gbl... >> Miro, >> >> You can use in this case in your load form method a login form that you >> call with ShowDialog, if you use it like this than the mainform is not >> even showed. >> >> If myLoginForm.ShowDialog <> Dialogresult.OK then >> messagebox.show("your login was wrong") >> me.close >> End if >> >> I hope this helps, >> >> Cor >> >> "Miro" <miron***@golden.net> schreef in bericht >> news:e4upKuH8GHA.4620@TK2MSFTNGP02.phx.gbl... >>>I had a simillar issue. >>> >>> I had a "main form", "a spash screen", and a "login form". >>> >>> I main my #1 form in vb to be the "Main Form. >>> >>> On the OnLoad of the Main form, I call the splash screen. >>> >>> The splash screen will show even before the main form paints. >>> >>> Now, if you want the login form to show after the main form is painted, >>> the only way I have solved this by putting the login.show somewhere, is >>> kinda silly but it works. I added a timer to the main form, and put a >>> 1/2 second timer delay on it. >>> When the timer fires, i timer.enabled = false, and i show my login form. >>> >>> I realy couldnt figure out where to put the login form call so my main >>> form displays and then the login on top. >>> >>> Miro >>> >>> >>> "Mitch5713" <mi***@nnex.net> wrote in message >>> news:F9910603-6545-4732-8374-5FB883735D76@microsoft.com... >>>> I've got tthree forms at start up >>>> splashscreen- works fine however how do i set the time delay so it >>>> stays on >>>> the window longer,, shows longer?? >>>> Loginscreen- works fine, after the data processing of username etc is >>>> done I >>>> then need to load, call whatever the syntax is the mainForm at the end >>>> of the >>>> loginscreen..????? how is that done so it starts at the mainForm_Load >>>> procedure??? As it stands now the mainform loads but just for a split >>>> second??>> >>>> >>>> MItch >>> >>> >> >> > > No,
Just a misunderstanding, I wanted my Login form Showing ontop of my Main form. So thats why I had to use a timer - To show something after the mian form loads. I was looking for something like MainForm.AfterLoadandPaint but instead it was a 1/2 second timer that disables itself on its first run. :) I could not have aDim fLogon As Form = New frmLogon() fLogon.ShowDialog() in my _FormLoad of my Main form, cause I wanted to paint the back screen prior to asking for a login. Cheers, Miro Show quoteHide quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message news:e5u5OsN8GHA.3280@TK2MSFTNGP02.phx.gbl... > Miro, > > Do you mean that your mainform is not showed after this, than there is > something terrible wrong. > > If the login is correct, it does not close the mainform but shows it. > > :-) > > Cor > > "Miro" <miron***@golden.net> schreef in bericht > news:%233vSkIL8GHA.4620@TK2MSFTNGP02.phx.gbl... >> Yes in my case however I wanted to show the main form. >> >> So I needed to use the timer to display it 1/2 second after the main >> form. >> -Unless there is another way? >> >> M. >> >> >> "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message >> news:es%23jt8H8GHA.4572@TK2MSFTNGP02.phx.gbl... >>> Miro, >>> >>> You can use in this case in your load form method a login form that you >>> call with ShowDialog, if you use it like this than the mainform is not >>> even showed. >>> >>> If myLoginForm.ShowDialog <> Dialogresult.OK then >>> messagebox.show("your login was wrong") >>> me.close >>> End if >>> >>> I hope this helps, >>> >>> Cor >>> >>> "Miro" <miron***@golden.net> schreef in bericht >>> news:e4upKuH8GHA.4620@TK2MSFTNGP02.phx.gbl... >>>>I had a simillar issue. >>>> >>>> I had a "main form", "a spash screen", and a "login form". >>>> >>>> I main my #1 form in vb to be the "Main Form. >>>> >>>> On the OnLoad of the Main form, I call the splash screen. >>>> >>>> The splash screen will show even before the main form paints. >>>> >>>> Now, if you want the login form to show after the main form is painted, >>>> the only way I have solved this by putting the login.show somewhere, is >>>> kinda silly but it works. I added a timer to the main form, and put a >>>> 1/2 second timer delay on it. >>>> When the timer fires, i timer.enabled = false, and i show my login >>>> form. >>>> >>>> I realy couldnt figure out where to put the login form call so my main >>>> form displays and then the login on top. >>>> >>>> Miro >>>> >>>> >>>> "Mitch5713" <mi***@nnex.net> wrote in message >>>> news:F9910603-6545-4732-8374-5FB883735D76@microsoft.com... >>>>> I've got tthree forms at start up >>>>> splashscreen- works fine however how do i set the time delay so it >>>>> stays on >>>>> the window longer,, shows longer?? >>>>> Loginscreen- works fine, after the data processing of username etc is >>>>> done I >>>>> then need to load, call whatever the syntax is the mainForm at the end >>>>> of the >>>>> loginscreen..????? how is that done so it starts at the mainForm_Load >>>>> procedure??? As it stands now the mainform loads but just for a split >>>>> second??>> >>>>> >>>>> MItch >>>> >>>> >>> >>> >> >> > > OK but here is my problem I have the login form as my main for,, that way the
splash scrren starts then it goes to the login form i dont want the useres to see the main form until login is sucessful??? How do i call the main form from the end of the login form???????? Show quoteHide quote "Miro" wrote: > I had a simillar issue. > > I had a "main form", "a spash screen", and a "login form". > > I main my #1 form in vb to be the "Main Form. > > On the OnLoad of the Main form, I call the splash screen. > > The splash screen will show even before the main form paints. > > Now, if you want the login form to show after the main form is painted, the > only way I have solved this by putting the login.show somewhere, is kinda > silly but it works. I added a timer to the main form, and put a 1/2 second > timer delay on it. > When the timer fires, i timer.enabled = false, and i show my login form. > > I realy couldnt figure out where to put the login form call so my main form > displays and then the login on top. > > Miro > > > "Mitch5713" <mi***@nnex.net> wrote in message > news:F9910603-6545-4732-8374-5FB883735D76@microsoft.com... > > I've got tthree forms at start up > > splashscreen- works fine however how do i set the time delay so it stays > > on > > the window longer,, shows longer?? > > Loginscreen- works fine, after the data processing of username etc is done > > I > > then need to load, call whatever the syntax is the mainForm at the end of > > the > > loginscreen..????? how is that done so it starts at the mainForm_Load > > procedure??? As it stands now the mainform loads but just for a split > > second??>> > > > > MItch > > > I think the only way u can do this than, is that you will need to create an
"invisible form as ur main form, and do it that way. Miro Show quoteHide quote "Mitch5713" <mi***@nnex.net> wrote in message news:8205FF4F-1C7C-4F05-9E1D-6F4D68090151@microsoft.com... > OK but here is my problem I have the login form as my main for,, that way > the > splash scrren starts then it goes to the login form i dont want the useres > to > see the main form until login is sucessful??? How do i call the main form > from the end of the login form???????? > > > > "Miro" wrote: > >> I had a simillar issue. >> >> I had a "main form", "a spash screen", and a "login form". >> >> I main my #1 form in vb to be the "Main Form. >> >> On the OnLoad of the Main form, I call the splash screen. >> >> The splash screen will show even before the main form paints. >> >> Now, if you want the login form to show after the main form is painted, >> the >> only way I have solved this by putting the login.show somewhere, is kinda >> silly but it works. I added a timer to the main form, and put a 1/2 >> second >> timer delay on it. >> When the timer fires, i timer.enabled = false, and i show my login form. >> >> I realy couldnt figure out where to put the login form call so my main >> form >> displays and then the login on top. >> >> Miro >> >> >> "Mitch5713" <mi***@nnex.net> wrote in message >> news:F9910603-6545-4732-8374-5FB883735D76@microsoft.com... >> > I've got tthree forms at start up >> > splashscreen- works fine however how do i set the time delay so it >> > stays >> > on >> > the window longer,, shows longer?? >> > Loginscreen- works fine, after the data processing of username etc is >> > done >> > I >> > then need to load, call whatever the syntax is the mainForm at the end >> > of >> > the >> > loginscreen..????? how is that done so it starts at the mainForm_Load >> > procedure??? As it stands now the mainform loads but just for a split >> > second??>> >> > >> > MItch >> >> >> I'm going to recommend that you avoid starting an app by running a form.
There is no upside to doing this and you're experiencing the downside. :-) Declare a PUBLIC Sub Main() and have that be the starting point. Then you have complete control of what happens and when. Public Shared Sub Main(ByVal args() as String) ' show the splash screen ' load the user settings initialize stuff ' hide the splash screen ' if everything is okay so far ' show the login dialog ' if the login is successful ' run the main form ' end if ' end if You have a chance to get the command line arguments (if there are any) and you can display and hide the splash screen at will. You also have the user settings prior to anything much else happening which might contain settings for screen positions, colors, sounds, server name, etc. And the main screen isn't loaded until the login is successful. Re: your splash screen timing. I wrote a SplashScreen class that does it all for me but basically you set the "minimum" time you want it to display as you display it. There is no reason to set up any kind of timer at that point but you do make note of the time it was displayed. When you go to close the splash screen the routine first checks to see if the initialization took longer than the minimum time (check the time now against the time you saved). If it is over the minimum it goes ahead and closes the screen if it is less than the minimum it goes to sleep for the remaining amount of time and then closes it. Hope this helps, Tom Show quoteHide quote "Mitch5713" <mi***@nnex.net> wrote in message news:F9910603-6545-4732-8374-5FB883735D76@microsoft.com... > I've got tthree forms at start up > splashscreen- works fine however how do i set the time delay so it stays > on > the window longer,, shows longer?? > Loginscreen- works fine, after the data processing of username etc is done > I > then need to load, call whatever the syntax is the mainForm at the end of > the > loginscreen..????? how is that done so it starts at the mainForm_Load > procedure??? As it stands now the mainform loads but just for a split > second??>> > > MItch
How to raise a shortcut
picking off each digit of an integer Problem bei der Installation eines VB.net Programms Need help updating my dataset with changes made on the Source? Getchanges Merge? How to use binary files as resources in VB 2005 Re: What .NET classes are SLOW vs. API? odbc vb.net database programming Code Snippet Manager Place of web.config |
|||||||||||||||||||||||