FartNocker Posted February 8, 2004 Posted February 8, 2004 Does anyone know how to make the system cursor change to a wait cursor after the is clicked on to start it until the main form is displayed? I can do it for forms and other objects but I can't seem to get it to change while waiting for the application to load and show... Thanks Mark Quote
Moderators Robby Posted February 8, 2004 Moderators Posted February 8, 2004 You can use the following... Cursor.Current = Cursors.WaitCursor 'hourglass Cursor.Current = Cursors.Default 'default Cursor.Current = New Cursor(Application.StartupPath & "\myCursor.cur") 'custom Quote Visit...Bassic Software
*Experts* DiverDan Posted February 8, 2004 *Experts* Posted February 8, 2004 I think Robby's code will work after the application has loaded. The .Net programs must first load and setup the Dot Net Framework before opening the selected program. If I am assuming correctly, you want to display a hour glass cursor during this time. To do so you must open a non Dot Net program (as low end as possible) and use an API call, then check when the selected program is opened and change the cursor back to default. Quote Member, in good standing, of the elite fraternity of mentally challenged programmers. Dolphins Software
Moderators Robby Posted February 8, 2004 Moderators Posted February 8, 2004 If it takes that long too load the main page then perhaps you should consider a splash screen to be displayed prior to any taxing process commences. Quote Visit...Bassic Software
FartNocker Posted February 8, 2004 Author Posted February 8, 2004 First off, Thanks for the Ides guys. Robby, I currently know how to do that but it won't work unless there�s a form under the cursor. DiverDan, That is exactly what I would to do but I can only program in VB. Roby, I have a splash screen but this is what is taking so long to load. I have 2 - 2gig Hz computers and on both of them It seems to take way too long for the splash screen to appear. I must not be calling the Slash screen correctly. My program starts up in the Sub Main, which is located in the frmMain code. The splash screen is called from the Form Load Event of frmMain about halfway through the procedure. Should I move the Sub Main to a module and call the Splash Form first like Application.Run(New frmSplash)? And if I do that, how do I do processing on the Main form while the splash form is loading and being displayed. I would also need to call the Main Form from the splash form� How do you guys handle this situation? Mark Quote
*Experts* DiverDan Posted February 9, 2004 *Experts* Posted February 9, 2004 I have made the splash screen a completely separate .exe. The main, large program is called from the splash screen then either a timer or a file watcher closes the splash screen. This works pretty good for my larger programs. Quote Member, in good standing, of the elite fraternity of mentally challenged programmers. Dolphins Software
Moderators Robby Posted February 9, 2004 Moderators Posted February 9, 2004 You can have a look at VolteFace's sample on splash screens here ...http://www.xtremedotnettalk.com/showthread.php?threadid=77706 Quote Visit...Bassic Software
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.