Reinaldo,
You can use
oDlg:Hide() and
oDlg:Show()I use it, to switch between Window- and Dialog-preview :
Maybe there is still another possible Solution, but it works fine for me.
// Shows the hidden Dialog from a Main-window-action ( Button )...
...
DEFINE WINDOW oWnd ;
TITLE 'Background-, Title-, xBrowse-, Logo-, Border- and Font-editor => Release 1.1 / June 2011'
@ nSHeight - 130, nSWidth - 260 BTNBMP oBtn1 OF oWnd ;
SIZE 100, 50 PIXEL 2007 ;
NOBORDER ;
PROMPT " &Tools" ;
FILENAME c_path + "\Bitmaps\Select.Bmp" ;
ACTION
oDlg:Show() ;
FONT oFont1 ;
LEFT
oBtn1:lTransparent := .t.
oBtn1:cToolTip = { "Exit " + CRLF + "Title and Border","EXIT", 1, CLR_BLACK, 14089979 }
oBtn1:SetColor( 0, )
...
...
// The Main-window is visible // The Dialog is called ON INIT,
oDlg is defined in the Main-window
ACTIVATE WINDOW oWnd MAXIMIZED ;
ON INIT ( WND_BRUSH( nWStyle, lWGrad, nWColorF, nWColorB, nWPos, cWBrush, cWImage ) , ;
SHOW_DLG(oDlg) ,
oDlg:Hide() ) ;
ON PAINT ( ABPaint( hDC, 50, 50, oLogo, 255 ), ;
NEW_LOGO(hDC) )
oLogo:End()
oWndLogo:End()
oFont1:End()
oBrwFont:End()
oTitleFont:End()
RETURN NIL
// -----
FUNCTION
SHOW_DLG(oDlg)Local oBtn1, oBtn2
DEFINE DIALOG oDlg SIZE 950, 600 OF oWnd PIXEL TRANSPARENT ;
FONT oFont1 TITLE 'Title- / xBrowse- and Border-painter'
...
...
...
// Hide the Dialog and show the Main-window@ 265, 355 BTNBMP oBtn1 OF oDlg ;
SIZE 60, 30 PIXEL 2007 ;
NOBORDER ;
PROMPT " &Close" + CRLF + " Painter" ;
FILENAME c_path + "\Bitmaps\Quit.Bmp" ;
ACTION (
oDlg:Hide(),oWnd:Refresh() ) ;
FONT oFont1 ;
LEFT
oBtn1:lTransparent := .t.
oBtn1:cToolTip = { "Switch to " + CRLF + "Main-window","SWITCH-Preview", 1, CLR_BLACK, 14089979 }
oBtn1:SetColor( 0, )
@ 265, 423 BTNBMP oBtn16 OF oDlg ;
SIZE 45, 30 PIXEL 2007 ;
NOBORDER ;
PROMPT " Exit" ;
FILENAME c_path + "\Bitmaps\Quit.Bmp" ;
ACTION (
oDlg:End(), oWnd:End() ) ;
FONT oFont1 ;
LEFT
oBtn16:lTransparent := .t.
oBtn16:cToolTip = { "Exit " + CRLF + "Title and Border","EXIT", 1, CLR_BLACK, 14089979 }
oBtn16:SetColor( 0, )
ACTIVATE DIALOG oDlg CENTERED
NOWAIT RETURN NIL
Hides the Dialog ( Visible on Button-action ) :
Something about the new Tool :
The Userlogo ( Olga.jpg ) is converted to a Alphablended BMP with Pixelformer,
to show a transparent-level.
From inside the Tool, the BMP is resized ( possible from -50% to + 20% ) and a transparent-level is defined.
As well it is possible, to adjust the Position on Screen.
Best Regards
Uwe