Thank You very much for the response
the defined EXE-names
RGB.exe
Colorpick.exe
The following lines are included in RGB.prg the time I added the Colorpick-button, but doesn't work
..
DEFINE DIALOG oDlg RESOURCE "RGB" PIXEL ;
FONT oFont TITLE "RGB-colors and Gradients => Release 4.3 / 10.02.2015" OF oDlg
..
exit button in RGB.prgREDEFINE BTNBMP oSBtn[16] OF oDlg ;
ID 580 PIXEL 2007 ;
NOBORDER ;
PROMPT "&Exit RGB-colors" ;
FILENAME c_path1 + "Exit.Bmp" ;
ACTION ( SendMessage( FindWindow( 0, "COLORPICK" ), WM_CLOSE ), oDlg:End() ) ;
FONT oFont1 ;
LEFTthe defined Line in RGB.prg, to keep the colorpicker on top using minimize / maximize of RGB.exe oDlg:bResized := {|| ON_TOP() }
ACTIVATE DIALOG oDlg CENTERED
..
..
RETURN NIL
// ----
FUNCTION ON_TOP()
CFILENAME := "COLORPICK.exe"
IF ISEXERUNNING( CFILENAME( HB_ARGV( 0 ) ) )
SHOWWINDOW( FINDWINDOW( 0, "COLORPICK" ), 9 )
SETFOREGROUNDWINDOW( FINDWINDOW( 0, "COLORPICK" ) )
ENDIF
RETURN NILboth are not working
The main-lines from Colorpick.prg
..
..
DEFINE WINDOW oWnd FROM 10, 10 TO 270, 290 PIXEL TITLE "COLOR-PICKER 1.1"
..
..
DEFINE TIMER oTimer OF oWnd ;
INTERVAL 70 ACTION ( nRGB := GetColor(), ;
nRed := nRGBRed( nRGB ), ;
nGreen := nRGBGreen( nRGB ), ;
nBlue := nRGBBlue( nRGB ), ;
cRGB := "nRGB( " + ALLTRIM(STR(nRed)) + ", " + ;
ALLTRIM(STR(nGreen)) + ", " + ;
ALLTRIM(STR(nBlue)) + " )", ;
oSay2:Refresh(), oSay3:Refresh() )
oTimer:Activate()
oWnd:bKeyDown := {|nKey| IF(nKey = nWKey, SAVE_COLOR(), ) }
ACTIVATE WINDOW oWnd CENTER
oTimer:DeActivate()
RETURN NILI tested including the Colorpick-source, but I noticed some problems ( maybe the timer )
I think a extra EXE-file is the better solution.
best regards
Uwe