Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stop users from pressing other buttons until code is finished?

Status
Not open for further replies.

dalchri

Programmer
Apr 19, 2002
608
US
I've got a preview button in my app that runs a crystal report. For the first few seconds all is well. You can't click anything on the form and the cursor is an hourglass (as set by my code). But then the form becomes responsive again, the hourglass turns back into a pointer, and the user can select File, Close for example.

So for example, the user can open an order, print it, and close the order before the crystal report code finishes printing, causing an error.

I've tried this.Enabled = false; This does work but it makes all the controls greyed out. Its not that I want to prevent form events from firing as much as I want to ignore user mouse and keyboard input.

Is there a simple way to do this?
 
what about moving the report to a new window(if you haven't already put it there). Then let the report run in the background while the user can continue to interact with the app?

Bastien

Cat, the other other white meat
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top