Byron Hopp,
I would like to bring the dialog to the front of the desktop.
I have tried oDlg:GoTop()
Tried BringWindowToTop( oDlg:hWnd )
oDlg:SetFocus()
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT SETWINDOWPOS( oDlg:hWnd, -1, 0, 0, 0, 0, 3 )
A possible usage :
I added a switch to change from
on top to
taskbar to the installer
connected to the internet You can stay on top of a website or move to the taskbar on focus-change
If You want to switch between top and taskbar at runtime here is the needed little exe
Usage :
WINEXEC( "RESTART Install.exe " + Str( oWnd:hWnd ), 0 )
( replace < install.exe > with Your program-name and change < oWnd:hWnd > to the used name )
http://www.pflegeplus.com/DOWNLOADS/Restart.exe
// ---------- Close ( position saved to INI )
@ 15, oWnd:nWidth - 45 BTNBMP oBtnClose ;
FILE c_path1 + "Closew1.bmp", "", "", ;
c_path1 + "Closew2.bmp" ;
FLAT NOBORDER NOROUND ACTION ( nWndTop := oWnd:nTop, nWndLeft := oWnd:nLeft, ;
SAVE_INI(), oWnd:End() ) SIZE 24, 24
oBtnClose:lTransparent := .T.
oBtnClose:cToolTip := { "Exit installer", "EXIT", 1, CLR_BLACK, 14089979 }
@ 390, 305 RADIO oPRadio2 VAR nWndPos ITEMS "on TOP", "normal" OF oWnd SIZE 70, 30 PIXEL ;
ON CHANGE { || SAVE_INI(), WINEXEC( "RESTART Install.exe " + Str( oWnd:hWnd ), 0 ) } UPDATE // close and restart
AEval( oPRadio2:aItems, { | oRad | oRad:lTransparent := .T., ;
oRad:SetFont ( oFontSys ), ;
oRad:nClrText := 0 } )
// windows or dialog
// moves on restart to the saved position from INI
ACTIVATE WINDOW oWnd ;
ON INIT ( oWnd:Move( nWndTop, nWndLeft, oWnd:nWidth, oWnd:nHeight, .F. ), ;
BACKGRD( oWnd, nBackgrd, nWColorB, nWGradpos, cWBrush ), ;
IIF( nWndPos = 1, SETWINDOWPOS( oWnd:hWnd, -1, 0, 0, 0, 0, 3 ), ; // TOP
SETWINDOWPOS( oWnd:hWnd, -3, 0, 0, 0, 0, 3 ) ), ; // TASKBAR
SET_MENUE( oWnd ), ;
DRAWROUND( oWnd ) )
regards
Uwe
