Logo on MDI window.
Posted: Sat Jan 02, 2021 11:27 pm
I use to do this using the old Harbour compiler. But since I moved to Borland my program gets hung up when clicking on the menu.
Here is the old code I used in the main program just before the Activate Window:
@ 0,0 Bitmap oLogo File Mcs_AppPath() + "Images\EocwdLogo.bmp" of oWnd:oWndClient PIXEL NOBORDER
oWnd:CoorsUpdate()
oWnd:bPainted := {|| SetLogo( oLogo,oWnd )}
Here is the function that runs during the paint event.
Function SetLogo( oLogo,oWnd )
Local nX,nY
oWnd:CoorsUpdate()
oWnd:oWndClient:CoorsUpdate()
oLogo:CoorsUpdate()
oLogo:Hide()
nX := oWnd:oWndClient:nWidth() - oLogo:nWidth() - 10
nY := oWnd:oWndClient:nHeight() - oLogo:nHeight() - 10
oLogo:Move( nY,nX,oLogo:nWidth(), oLogo:nHeight(),.t. )
oLogo:Show()
return NIL
Here is the old code I used in the main program just before the Activate Window:
@ 0,0 Bitmap oLogo File Mcs_AppPath() + "Images\EocwdLogo.bmp" of oWnd:oWndClient PIXEL NOBORDER
oWnd:CoorsUpdate()
oWnd:bPainted := {|| SetLogo( oLogo,oWnd )}
Here is the function that runs during the paint event.
Function SetLogo( oLogo,oWnd )
Local nX,nY
oWnd:CoorsUpdate()
oWnd:oWndClient:CoorsUpdate()
oLogo:CoorsUpdate()
oLogo:Hide()
nX := oWnd:oWndClient:nWidth() - oLogo:nWidth() - 10
nY := oWnd:oWndClient:nHeight() - oLogo:nHeight() - 10
oLogo:Move( nY,nX,oLogo:nWidth(), oLogo:nHeight(),.t. )
oLogo:Show()
return NIL