TRANSPARENT IMAGE

TRANSPARENT IMAGE

Postby RAMESHBABU » Thu Oct 15, 2020 3:06 am

Hi Friends,

I am happy to show you a completely transparent image with alpha channel generated from FWH Functions.

Image

Hope you like it. :D

-Ramesh Babu P
User avatar
RAMESHBABU
 
Posts: 624
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Re: TRANSPARENT IMAGE

Postby Antonio Linares » Thu Oct 15, 2020 4:56 pm

Dear Ramesh,

Congratulations!

Would you mind to share its source code with us ? thank you
regards, saludos

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

Re: TRANSPARENT IMAGE

Postby RAMESHBABU » Thu Oct 22, 2020 12:54 am

Dear Antonio,

Congratulations!


Thank you,

I was out of city for a while. Hence I could respond soon.
Here is the code :

Code: Select all  Expand view


********************************************************************************
*** FUNCTION Single_SMS() - To Send an SMS Simply to a Single No.            ***
********************************************************************************

FUNCTION Single_SMS()

LOCAL oDlg, oIcon, oFont, oFont1, oLockUnLock, oLock, oText, oHelp, oFinish,;
      oMobile_No, nMobile_No := 0, oMessage, cMessage := SPACE(256)
LOCAL nWidth, nHeight, nLeft, nTop, nRight, nBottom, hBitmap

DEFINE FONT  oFont   NAME "Tahoma" SIZE 0, -9
DEFINE FONT  oFont1  NAME "Tahoma" SIZE 0, -14
DEFINE FONT  oFont2  NAME "Tahoma" SIZE 0, -16

DEFINE IMAGE oMobile FILENAME "MOBILE.BMP"

nWidth  := nBmpWidth(oMobile:hBitmap)
nHeight := nBmpHeight(oMobile:hBitmap)

DEFINE    DIALOG oDlg SIZE nWidth, nHeight PIXEL              ;
          OF oMainWindow                                      ;
          STYLE nOr(WS_POPUP)                                 ; // For Frameless Dialog
          COLOR CLR_BLACK, 1

@ 063,041 SAY oSay1 PROMPT "Mobile No. :" SIZE 35,10 OF oDlg  ;
          COLORS CLR_GRAY, nRGB(246,250,251) PIXEL

@ 063,083 GET oMobile_No VAR nMobile_No SIZE 50,12 OF oDlg    ;
          COLORS CLR_BLUE, nRGB(210,255,255) RIGHT PIXEL      ;
          FONT oFont1

@ 070,041 SAY oSay2 PROMPT "Message :" SIZE 35,10 OF oDlg     ;
          COLORS CLR_GRAY, nRGB(246,250,251) PIXEL

@ 080,041 GET oMessage VAR cMessage SIZE 91,90      OF oDlg   ;
          COLORS CLR_BLUE, nRGB(210,255,255) MEMO PIXEL       ;
          FONT oFont2

@ 180,045 BTNBMP oSend RESOURCE "KEYBOARD"                    ;
          TOOLTIP "Lang."                                     ;
          SIZE 10,10 OF oDlg                                  ;
          ACTION Open_Google_Input_Tools_Page()               ;
          NOROUND CENTER NOBORDER                             ;
          GRADIENT Paint_GButton(nRGB(231,236,240),nRGB(231,236,240))

@ 180,117 BTNBMP oSend RESOURCE "QUIT1"                       ;
          TOOLTIP "Close"                                     ;
          SIZE 10,10 OF oDlg ACTION oDlg:End()                ;
          NOROUND CENTER NOBORDER                             ;
          GRADIENT Paint_GButton(nRGB(217,220,225),nRGB(217,220,225))

@ 196,077 BTNBMP oSend PROMPT "&Send" RESOURCE "SEND"         ;
          SIZE 20,20 OF oDlg FONT oFont                       ;
          ACTION Send_Single_SMS(nMobile_No, cMessage)        ;
          NOROUND CENTER NOBORDER                             ;
          GRADIENT Paint_GButton(nRGB(220,223,228),nRGB(220,223,228))

* This line does the magic of showning transparent Background
oDlg:nSeethroClr := 1

* Now paint the required Alphachannel Bitmap on Dialog
oDlg:bPainted    := {||oDlg:DrawImage("MOBILE.BMP")}

ACTIVATE DIALOG oDlg CENTERED

RELEASE FONT oFont

RETURN nil
 
User avatar
RAMESHBABU
 
Posts: 624
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Re: TRANSPARENT IMAGE

Postby Antonio Linares » Thu Oct 22, 2020 9:23 am

many thanks!
regards, saludos

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 39 guests