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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setredraw, focus goes to another windows application

Status
Not open for further replies.

miguelleeuwe

Programmer
Oct 17, 2007
242
NL
Hello,

At the company I work now, there's an application using the advance guicontrols, base on a Canvas.pbx and outlike-like menus. The app is filled with setredraw() and I found myself with a Problem:

- user clicks on menu-button and: (lbutton-up event)
1) main window, setredraw(false)
2) a window is opened dynamically.
3) main window, setredraw(true)

so far fine.
problem I have is when user DOUBLE-clicks the button:
a) main window, setredraw(false)
b) a window is about to be opened dynamically.
c) second click goes to any application that might be opened also in windows (like Excel for example) behind my application.
d) main window, setredraw(true), but since focus is halfway/fully gone. The screen shows half of my application and half of excel.

Since not using Setredraw doesn't seem to be an option, lots of flikkering, I'd like to now if anyone remembers which windows API to use to make make app regain focus 'automatically' ???

I'm also thinking of putting my main window inside another window, or all of it's controls in a custom userobject and do the redraw only on that, but that means a lot of work I don't have at the time.

The application is also launched from Citrix and some of the canas' redraws (OnPaint events), are very very slow, I think it has to do with the previously described app-focus problem, but concentrate first on regaining focus / avoiding it to leave when using setredraw(false).


TIA,
Miguel


regards,
Miguel L.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top