FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour CODE: Transparencies and movements
Posts: 310
Joined: Sun Jan 08, 2006 10:09 PM
CODE: Transparencies and movements
Posted: Mon Apr 14, 2008 03:39 AM
Friends,

Compile, run and click on left corner on top.

Here the code:
/*
 *
 * *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
 * 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


Here the bitmaps:
http://www.5volution.com/forum/transpr.zip
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
CODE: Transparencies and movements
Posted: Mon Apr 14, 2008 05:51 AM

Rochinha,

have you tested it in Vista ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
CODE: Transparencies and movements
Posted: Mon Apr 14, 2008 07:04 AM

Hi Rochinha,

In Vista OS, I saw it same transpr2.bmp

Regards,

richard

Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
Posts: 310
Joined: Sun Jan 08, 2006 10:09 PM
CODE: Transparencies and movements
Posted: Mon Apr 14, 2008 01:01 PM

Friends,

Yes, tested in Windows server 2003 and Windows Vista ultimate.

The bitmaps have a background diference.

Works fine.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
CODE: Transparencies and movements
Posted: Wed Apr 16, 2008 08:23 AM

Rochinha,

Could you please post a screenshot of it running in Vista ? Thanks

Here it is not working fine,

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 310
Joined: Sun Jan 08, 2006 10:09 PM
CODE: Transparencies and movements
Posted: Fri Apr 18, 2008 12:48 AM
Here,

Image
Posts: 310
Joined: Sun Jan 08, 2006 10:09 PM
CODE: Transparencies and movements
Posted: Fri Apr 18, 2008 01:40 AM
Here,

One more sample:

Download

Press a mouse on top and left corner to hide and move on screen.
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
CODE: Transparencies and movements
Posted: Fri Apr 18, 2008 05:43 AM
Attached a screen shot from my VISTA PC business.

The left is compiled on my PC the right is your exe.
Regards,
Otto


Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
CODE: Transparencies and movements
Posted: Fri Apr 18, 2008 12:08 PM

Rochinha,

Please notice in Otto's screenshots that the lower left corner is black.

Have you done some modifications in your classes ? Thanks,

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion