CODE: Transparencies and movements

CODE: Transparencies and movements

Postby Rochinha » Mon Apr 14, 2008 3:39 am

Friends,

Compile, run and click on left corner on top.

Here the code:
Code: Select all  Expand view  RUN
/*
*
* *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
* 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
Rochinha
 
Posts: 310
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo

Postby Antonio Linares » Mon Apr 14, 2008 5:51 am

Rochinha,

have you tested it in Vista ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby richard-service » Mon Apr 14, 2008 7:04 am

Hi Rochinha,

In Vista OS, I saw it same transpr2.bmp

Regards,

richard
User avatar
richard-service
 
Posts: 804
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Postby Rochinha » Mon Apr 14, 2008 1:01 pm

Friends,

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

The bitmaps have a background diference.

Works fine.
Rochinha
 
Posts: 310
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo

Postby Antonio Linares » Wed Apr 16, 2008 8: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Rochinha » Fri Apr 18, 2008 12:48 am

Here,

Image
Rochinha
 
Posts: 310
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo

Postby Rochinha » Fri Apr 18, 2008 1:40 am

Here,

One more sample:

Download

Press a mouse on top and left corner to hide and move on screen.
Rochinha
 
Posts: 310
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo

Postby Otto » Fri Apr 18, 2008 5: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


Image
User avatar
Otto
 
Posts: 6344
Joined: Fri Oct 07, 2005 7:07 pm

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], nageswaragunupudi and 59 guests