Showing wait cursor

Got a problem you cannot solve? Try here.
Post Reply
MarkRichards
Posts: 47
Joined: Tue Apr 18, 2006 8:39 am

Showing wait cursor

Post 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!
jimo
Posts: 342
Joined: Fri Aug 19, 2005 10:59 am
Location: Atlanta, GA
Contact:

Post 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.
Jim Oswell
Software Engineering Manager, Dental
Greenway Health, LLC
http://greenwaymedical.com
Gizm0
Posts: 339
Joined: Wed Nov 09, 2005 8:47 pm

Post by Gizm0 »

Or simply call the API to Set the cursor on wait icon..
Panagiotis Kefalidis
Software Design Team Lead
\"In order to succeed, your desire for success should be greater than your fear of failure\"
Install[b]Aware[/b] Software Corporation
MarkRichards
Posts: 47
Joined: Tue Apr 18, 2006 8:39 am

Post 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!
Gizm0
Posts: 339
Joined: Wed Nov 09, 2005 8:47 pm

Post 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.
Panagiotis Kefalidis
Software Design Team Lead
\"In order to succeed, your desire for success should be greater than your fear of failure\"
Install[b]Aware[/b] Software Corporation
Lin
Posts: 29
Joined: Mon Apr 16, 2007 12:53 pm

Showing wait cursor

Post 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.
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post 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.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Lin
Posts: 29
Joined: Mon Apr 16, 2007 12:53 pm

Post 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.
Post Reply