Compile, run and click on left corner on top.
Here the code:
Code: Select all
/*
*
* *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
* Descricao..: Modulo de PDV
* Programador: Jose Carlos da Rocha
* CopyRights.: 5Volution.COM
* *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
*
*/
#include "fivewin.ch"
#define SRCPAINT 15597702
#define SRCAND 8913094
function main()
PUBLIC lNoPaint := .f.
DEFINE BRUSH oBrush STYLE NULL
DEFINE DIALOG oWnd TITLE "Transparence" SIZE 800,600 BRUSH oBrush STYLE WS_POPUP
@ 0,0 BITMAP filename "" OF oWnd NOBORDER PIXEL SIZE 10,10 ON LEFT CLICK WindowMove()
ACTIVATE DIALOG oWnd CENTERED ;
ON PAINT ShowBmp( oWnd, "transpr1.bmp", "transpr2.bmp" ) ;
VALID iif(MsgYesNo('Certeza?','Atencao'),.t.,.f.)
function ShowBmp( oDlg, cBmp1, cBmp2 )
local hDC := oDlg:hDC
local oBmp1, oBmp2
DEFINE BITMAP oBmp1 FILENAME cBmp1
DEFINE BITMAP oBmp2 FILENAME cBmp2
DrawBitmap( hDC, oBmp2:hBitmap, 0, 0, 0, 0, SRCPAINT )
DrawBitmap( hDC, oBmp1:hBitmap, 0, 0, 0, 0, SRCAND )
oBmp1:End()
oBmp2:End()
return nil
function WindowMove()
Do while GetKeyState(VK_LBUTTON)
onde:=GetCursorpos()
MoveWindow( oWnd:hWnd, onde[1], onde[2], 20, 20, .t. )
SysRefresh()
If !GetKeyState(VK_LBUTTON)
Exit
Endif
Enddo
MoveWindow( oWnd:hWnd, onde[1], onde[2], 800, 600, .t. )
Return nil
http://www.5volution.com/forum/transpr.zip