Checkbox and Radio are not transparent!?

Postby Antonio Linares » Sun Nov 02, 2008 12:32 am

Ramesh,

Could you please resend it to me as a ZIP file renamed as ZOP ? thanks
regards, saludos

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

Postby anserkk » Sun Nov 02, 2008 3:39 am

Dear Ramesh,

I have not rcvd u'r mail in my Gmail id as said. If u attached a zip file then gmail blocks the mail. Request u to either rename the zip extention or u may send it to my hotmail id anserkk@hotmail.com

Regards

Anser
User avatar
anserkk
 
Posts: 1333
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Postby jose_murugosa » Sun Nov 02, 2008 3:24 pm

Dear Ramesh,

Thanks for your contribution, could you please send me the code to jmurugosa (at) gmail.com, I really need of your solution.

Thanks in advance.
Saludos/Regards,
José Murugosa
"Los errores en programación, siempre están entre la silla y el teclado y la IA!!"
User avatar
jose_murugosa
 
Posts: 1180
Joined: Mon Feb 06, 2006 4:28 pm
Location: Uruguay

Postby RAMESHBABU » Sun Nov 02, 2008 5:06 pm

Hello Anser Bhai,

Could be please provide an alternate e-mail. I got the mail bounced back.

Regards

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

Postby RAMESHBABU » Sun Nov 02, 2008 5:12 pm

Mr.Murugosa,

Please check your inbox.

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

Postby jose_murugosa » Sun Nov 02, 2008 5:53 pm

RAMESHBABU wrote:Mr.Murugosa,

Please check your inbox.

- Ramesh babu P


Thanks Ramesh, but I didn´t recieve the mail, If you are sending a zip file or rar file, please rename it as .zzz or .rrr so I can recieve it.

Thanks again for your kind help
Saludos/Regards,
José Murugosa
"Los errores en programación, siempre están entre la silla y el teclado y la IA!!"
User avatar
jose_murugosa
 
Posts: 1180
Joined: Mon Feb 06, 2006 4:28 pm
Location: Uruguay

Postby Antonio Linares » Sun Nov 02, 2008 7:18 pm

Dear Ramesh,

I have not received it, probably due to the same reasons as Jose explains.
regards, saludos

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

Postby RAMESHBABU » Mon Nov 03, 2008 2:12 am

Mr.Antonio, Jose and Anser

I am extremely sorry for the inconvenience. Here is the link to download.

http://www.aksharasoft.com/gradtest.zip

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

Postby anserkk » Mon Nov 03, 2008 4:52 am

Thankyou Ramesh Bhai,

Regards

Anser
User avatar
anserkk
 
Posts: 1333
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Postby StefanHaupt » Mon Nov 03, 2008 9:17 am

Dear Ramesh,

could you send me your solution, too.

Thanks
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Postby StefanHaupt » Mon Nov 03, 2008 9:20 am

Ramesh,

I just found the download link :oops:

Thanks
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Postby Antonio Linares » Mon Nov 03, 2008 9:35 am

Ramesh,

Ok, so basically what you do is to create a bitmap from the painted gradient and then use the bitmap for a brush.

We could implement a method to automatically do it, without having to use any external tool :-)
regards, saludos

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

Postby Horizon » Mon Nov 03, 2008 10:18 am

Hi Ramesh,

Thank you for sending gradtest.zip.

If I am not wrong, The function in prg uses the external EXE files. BMPtoJPG and NCONVERT.

Can you also provide these files if it is possible?. I try find them from net. but i think different versions can not works like your function wanted.
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Postby byte-one » Mon Nov 03, 2008 11:43 am

Hello All!
I found a solution for this problem. Not very elegant, but usable. This could functioning on all OS.
Antonio, this should inserted in dialog-class! The real size of a redefined dialog is only to see, when activated.


Code: Select all  Expand view  RUN
DEFINE DIALOG oDlg........
.
dlg_brush(oDlg,CLR_BLUE,CLR_HBLUE)
.
ACTIVATE oDlg

//--------------------------------------------------------

function dlg_brush(oDlg,nColorTop,nColorBottom)

   local oDlg_temp,oBr,nWidth,nHeight,cRes := "",cFile:= "back.bmp"
   DEFAULT nColorTop := nRGB( 219, 230, 244 ) , nColorBottom := nRGB( 207, 221, 239 )

if !empty(oDlg)

   cRes := oDlg:cResName

        if !empty(cRes)
      cFile:= cRes+"_back.bmp"
      DEFINE DIALOG oDlg_temp RESOURCE cRes
      ACTIVATE DIALOG oDlg_temp ;
      ON INIT ;
      (oDlg_temp:hide(),;
      nHeight := oDlg_temp:nHeight(),;
      nWidth := 1,; //oDlg_temp:nWidth(),;
      oDlg_temp:end())

        else

      nHeight := oDlg:nBottom
                                nWidth := 1

        endif

      DEFINE DIALOG oDlg_temp FROM 0,0 TO nHeight,nWidth PIXEL STYLE nOr(WS_POPUP,4)
      ACTIVATE DIALOG oDlg_temp ;
      ON PAINT ;
      (GradientFill( oDlg_temp:hDC, 0, 0, oDlg_temp:nHeight(), oDlg_temp:nWidth(), {{ 1,nColorTop,nColorBottom}} ),;
      oDlg_temp:SaveToBmp(cFile),;
      oDlg_temp:end())

      if file( cFile )
         DEFINE BRUSH oBr FILE cFile
         oDlg:oBrush := oBr
         ferase( cFile )
      endif

endif

return NIL

//-------------------------------------------------------------
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Postby StefanHaupt » Mon Nov 03, 2008 12:23 pm

Hi all,

some time ago I enhanced the TBrush class, you can use like the original one. It creates brushes with a gradient on the fly.

I hope, it´s helpful.

Usage:
Code: Select all  Expand view  RUN
...
oBrushX := TBrushX():New ( ... )

DEFINE DIALOG ... BRUSH oBrushX


and the class:
Code: Select all  Expand view  RUN
// ============================================================================
// CLASS TBrushX Version  May 2008
// Authors: Stefan Haupt
//          Silvio Falconi
// you can freely use this class, please don´t remove these lines
//============================================================================
// Erweiterte TBrush-Class für Brushes mit Gradient
// (Enhanced brush class to create brushes with a gradient)
// Parameter
//       nColorFrom  : Startfarbe bzw. Array {Startfarbe, Endfarbe} für oberen Gradient
//                     startcolor or array with start- endcolor for upper gradient
//       nColorTo    : Endfarbe bzw. Array {Startfarbe, Endfarbe} für unteren Gradient
//                     endcolor or array with start- endcolor for lower gradient
//       lVGrad      : .t. für vertikal, .f. für horizontal
//                     .t. for vertical, .f. for horizontal
//       l2007       : Office-Look mit 2 Gradienten
//                     Look2007 with 2 gradients
//-----------------------------------------------------------------------------
#include "Fivewin.ch"

CLASS TBrushX FROM TBrush

      METHOD New( nColor, nColor2, lVGrad ) //CONSTRUCTOR
ENDCLASS


  METHOD New( nWidth, nHeight, nColorFrom, nColorTo, lVGrad, l2007 ) CLASS TBrushX

    ::lSystem   = .f.

    ::hBitmap := CreateExtBrush (nWidth, nHeight, nColorFrom, nColorTo, lVGrad, l2007 )
    ::hBrush = If( ::hBitmap != 0, CreatePatternBrush( ::hBitmap ), )
    ::nCount := 1
    AAdd( ::aBrushes, Self )

return Self


//-----------------------------------------------------------------//
FUNCTION CreateExtBrush ( nWidth, nHeight, nColorFrom, nColorTo, lVGrad, l2007 )

LOCAL hDC     := CreateDC( "DISPLAY",0,0,0 )
LOCAL hDCMem  := CreateCompatibleDC( hDC )
LOCAL hBmp    := CreateCompatibleBitmap( hDC, nWidth, nHeight )
LOCAL hOldBmp := SelectObject( hDCMem, hBmp )
LOCAL aRC0    := {0,0,nHeight/2,nWidth}
LOCAL aRC     := {nHeight/2,0,nHeight,nWidth}
LOCAL nClrUpperFrom, nClrLowerFrom, nClrUpperTo, nClrLowerTo


DEFAULT lVGrad   := .t.            // vertikaler Gradient (vertical gradient)
DEFAULT nColorTo := nColorFrom     //
DEFAULT l2007    := .t.            // Office-Look mit 2 Gradienten (Look2007 with 2 gradients)

  IF Valtype (nColorFrom) == "A"
    nClrUpperFrom := nColorFrom[1]
    nClrUpperTo   := nColorFrom[2]
  ELSE
    nClrUpperFrom := nColorFrom
    nClrUpperTo   := nColorFrom
  ENDIF

  IF Valtype (nColorTo) == "A"
    nClrLowerFrom := nColorTo[1]
    nClrLowerTo   := nColorTo[2]
  ELSE
    nClrLowerFrom := nColorTo
    nClrLowerTo   := nColorTo
  ENDIF

  IF l2007
    lVGrad := .t.
    Gradient( hDCMem, {aRC0[1],aRC0[2],aRC0[3]+2,aRC0[4]}, nClrUpperFrom, nClrUpperTo, lVGrad )
    Gradient( hDCMem, {aRC[1],aRC[2],aRC[3]+2,aRC[4]}, nClrLowerFrom, nClrLowerTo, lVGrad )
  ELSE
     Gradient( hDCMem, {0,0,nHeight,nWidth}, nClrUpperFrom, nClrLowerTo, lVGrad )
  ENDIF

SelectObject( hDCMem, hOldBmp )
DeleteDC( hDCMem )
DeleteDC( hDC )

RETURN (hBmp)


//-------------------------------------------------------------------//
DLL32 FUNCTION CREATECOMPATIBLEBITMAP( hDC AS LONG,;
                                              nWidth AS LONG,;
                                              nHeight AS LONG) AS LONG;
      PASCAL FROM "CreateCompatibleBitmap" LIB "gdi32.dll"
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 46 guests