Code: Select all
cMainTitle := "MyApp ."
...
DEFINE WINDOW oWnd_pagr MDI FROM 10, 10 TO nVerRes / 3.5, ;
nHorRes / 1.5 TITLE cMainTitle + alltrim( cUserName ) + " . " ;
MENU BuildMenu() PIXEL
With best regards ! Rimantas .
Code: Select all
cMainTitle := "MyApp ."
...
DEFINE WINDOW oWnd_pagr MDI FROM 10, 10 TO nVerRes / 3.5, ;
nHorRes / 1.5 TITLE cMainTitle + alltrim( cUserName ) + " . " ;
MENU BuildMenu() PIXEL
Code: Select all
#include "Fivewin.ch"
#define GW_HWNDFIRST 0
#define GW_HWNDLAST 1
#define GW_HWNDNEXT 2
#define GW_HWNDPREV 3
#define GW_OWNER 4
#define GW_CHILD 5
#define SW_NORMAL 1
FUNCTION MAIN()
LOCAL hWnd := FINDWND( "Excel" )
IF !EMPTY( hWnd )
? GETWINDOWTEXT( hWnd )
SHOWWINDOW( hWnd, SW_NORMAL )
ELSE
? "Window not found"
ENDIF
RETURN NIL
FUNCTION FINDWND( cTitle )
LOCAL hWnd := GETWINDOW( GETDESKTOPWINDOW(), GW_CHILD )
WHILE hWnd != 0
IF UPPER( cTitle ) $ UPPER( GETWINDOWTEXT( hWnd ) )
RETURN hWnd
ENDIF
hWnd = GETWINDOW( hWnd, GW_HWNDNEXT )
ENDDO
RETURN NIL
Thanks ! Works fine !EnricoMaria wrote:
FUNCTION FINDWND( cTitle )
LOCAL hWnd := GETWINDOW( GETDESKTOPWINDOW(), GW_CHILD )
WHILE hWnd != 0
IF UPPER( cTitle ) $ UPPER( GETWINDOWTEXT( hWnd ) )
RETURN hWnd
ENDIF
hWnd = GETWINDOW( hWnd, GW_HWNDNEXT )
ENDDO
RETURN NIL