der Witz : ich habe es auch in der AppSys und da funktioniert es d.h. das Programm wird in den Vordergrund geholt.
so bekommt man es vom "blinken" tatsächlich in den Vordergrund ... nicht schön aber so geht es (wieder)
Code: Alles auswählen
#define SW_HIDE 0
#define SW_SHOWNORMAL 1
#define SW_NORMAL 1
#define SW_SHOWMINIMIZED 2
#define SW_SHOWMAXIMIZED 3
#define SW_MAXIMIZE 3
#define SW_SHOWNOACTIVATE 4
#define SW_SHOW 5
#define SW_MINIMIZE 6
#define SW_SHOWMINNOACTIVE 7
#define SW_SHOWNA 8
#define SW_RESTORE 9
#define SW_SHOWDEFAULT 10
#define SW_FORCEMINIMIZE 11
#define SW_MAX 11
#define SW_PARENTCLOSING 1
#define SW_OTHERZOOM 2
#define SW_PARENTOPENING 3
#define SW_OTHERUNZOOM 4
METHOD EditForm:SwitchFocus()
IF ::lHaveFocus = .F.
SetForegroundWindow(::nHwnd)
BringWindowToTop(::nHwnd)
// minimieren
ShowWindow(::nHwnd, SW_MINIMIZE )
// wiederherstellen
ShowWindow(::nHwnd, SW_RESTORE )
// Xbase++ Dialog
SetAppWindow(::_EditForm)
// XbPart
SetAppFocus( ::oValues )
ENDIF
RETURN NIL