Page 1 of 1
Showing wait cursor
Posted: Tue Jun 13, 2006 10:53 am
by MarkRichards
Quick question. Is possible to force InstallAware (I'm on v5.3) to show a wait cursor?
I'm running a sizable chunk of custom installation code (a .NET 2.0 executable) in the middle of my InstallAware setup, and it can take a few seconds to launch (especially if CLR isn't in memory yet). I'd like to show a simple wait cursor (or some other simple progress indicator) while the EXE is launching.
Any ideas?
Thanks!
Posted: Tue Jun 13, 2006 2:43 pm
by jimo
Create a non modal dialog window, call it right before you call your custom executable, then use the hide window command right after.
That should do it.
Posted: Wed Jun 14, 2006 9:14 am
by Gizm0
Or simply call the API to Set the cursor on wait icon..
Posted: Wed Jun 14, 2006 10:52 am
by MarkRichards
When you say that I should call "the API", are you referring to the underlying Windows API? Do I have to write a plug-in for this, or is there a simpler way? Can you show me an example?
Thanks for your help!
Posted: Wed Jun 14, 2006 12:51 pm
by Gizm0
MarkRichards wrote:When you say that I should call "the API", are you referring to the underlying Windows API? Do I have to write a plug-in for this, or is there a simpler way? Can you show me an example?
Thanks for your help!
Yes, i'm reffering to the Windows API.
Using the
Call function from DLL on user32.dll, first call the
LoadCursor API, info
http://msdn.microsoft.com/library/defau ... cursor.asp
and then using the
Call function from DLL again on user32.dll call the SetCursor on the handle you got from the previous command, to change the cursor state.More info
http://msdn.microsoft.com/library/defau ... cursor.asp
Unfortunately, i don't have InstallAWARE installed on this pc (i'm on vacation) to create a sample script for you.
Showing wait cursor
Posted: Fri Feb 05, 2010 10:56 am
by Lin
Does anyone have an example of using the user32.dll to change the cursor. I am currently using the CallDLLFunction to Load the cursor and Set the cursor but the cursor doesn't change.
Posted: Sat Feb 06, 2010 4:06 pm
by MichaelNesmith
There might be a better idea for this. Just make a custom dialog, and put a panel or something similar on it; setting its Cursor property to the hourglass cursor, or anything else you like. That'll get the point across without having to mess with API calls.
Posted: Mon Feb 08, 2010 9:31 am
by Lin
Thank you for the quick reply. That won't really work for me because I have a dialog with a couple different buttons on it and with each button it returns and runs some code and then goes back to the dialog, it might only take 2 seconds to run the code so I don't want it to go back and forth between the dialog with buttons on it and a wait dialog and I need it to show that it is doing something so they don't keep clicking the button.