THANK YOU Mister Nages. Simplesmente, perfecto!!
Code: Select all | Expand
// C:\FWH\SAMPLES\NAGESMDI.PRG
#Include "Fivewin.ch"
#Define aPubGrad {| lInvert | If( lInvert, ;
{ { 1 / 3, nRGB( 255, 253, 222 ), nRGB( 255, 231, 151 ) }, ;
{ 2 / 3, nRGB( 255, 215, 84 ), nRGB( 255, 233, 162 ) } ;
}, ;
{ { 1 / 2, nRGB( 219, 230, 244 ), nRGB( 207 - 50, 221 - 25, 255 ) }, ;
{ 1 / 2, nRGB( 201 - 50, 217 - 25, 255 ), nRGB( 231, 242, 255 ) } ;
} ) }
STATIC oWnd, lOpenWind := .F., lOpenWind2 := .F., lSalida := .F., ;
lSalida2 := .F.
STATIC oFont, nHFont, cFont, nWFont, cFontH, oBrush, oFnt, oFont40
FUNCTION Main()
LOCAL oBar, cTitle
HB_GCALL( .F. )
cFont := "Segoe UI Symbol" //"Calibri"
cFontH := -14 //-10 //-12 //-16 //-18 //-20
IF !IsWin8() .and. !IsWindows10()
cFont := "Calibri" //"Tahoma"
ENDIF
SetBalloon( .T. ) // Balloon shape required for tooltips
SkinButtons()
cTitle := "PLENOIND: DEMO"
DEFINE BRUSH oBrush FILE "..\bitmaps\sea.bmp" RESIZE
DEFINE FONT oFont NAME cFont SIZE 0, cFontH WEIGHT 300
DEFINE FONT oFont40 NAME 'Tahoma' SIZE 0, -40 BOLD
DEFINE WINDOW oWnd MDI TITLE cTitle BRUSH oBrush
oWnd:SetFont( oFont )
DEFINE BUTTONBAR oBar BUTTONSIZE 100, 32 _3DLOOK TOP OF oWnd 2007
WITH OBJECT oBar
oBar:bClrGrad := aPubGrad // Preferi assim.
oBar:bRClicked := { || ( NIL ) } // Mouse Direito
oBar:bLClicked := { || ( NIL ) } // Mouse Esquerdo
oBar:SetFont( oFont )
oBar:nClrText := CLR_HBLUE
oBar:Adjust()
END
DEFINE BUTTON OF oBar PROMPT "Child1-Dialog" CENTER ;
ACTION ( DlgAsMdiChild() )
DEFINE BUTTON OF oBar PROMPT "Child2-Dialog" CENTER ;
ACTION ( Dlg2_AsMdiChild() )
DEFINE BUTTON OF oBar PROMPT "Salida" CENTER ;
ACTION ( ENCERRA() )
SET MESSAGE OF oWnd TO "© Contato Sistemas: (11) 2941-6446 / 3569-6446 " ;
+ "- Skype: joao@pleno.com.br" + " - www.pleno.com.br" FONT oFont ;
NOINSET CLOCK DATE KEYBOARD COLOR CLR_HBLUE, CLR_WHITE 2007
ACTIVATE WINDOW oWnd MAXIMIZED ;
ON INIT( oWnd:oMenu:End() )
RETURN NIL
FUNCTION ENCERRA() // END
oWnd:End()
oFont:End()
lOpenWind := .F.
lOpenWind2 := .F.
DbCommitAll()
DbUnLockAll()
DbCloseAll()
FreeResources()
Release All
SysRefresh()
HB_GCALL( .T. )
CLEAR MEMORY
PostQuitMessage( 0 )
QUIT
RETURN NIL
FUNCTION DlgAsMdiChild()
LOCAL oDlg, oFont, hFont, hDC, oIncluir, oSalida
LOCAL aVar := { PadR( "get1", 10 ), PadR( "edit", 10 ), Space( 10 ), PadR( "pwd", 10 ) }
LOCAL aGet[ 4 ]
// Para Impedir Uma 2¦ Abertura de Janela!!!
IF lOpenWind = .F.
lOpenWind := .T.
ELSE
RETURN NIL
ENDIF
DEFINE FONT oFont NAME "TAHOMA" SIZE 0, - 14
DEFINE DIALOG oDlg RESOURCE "TESTGETS" FONT oFont
oDlg:SetColor( 0, CLR_WHITE )
REDEFINE GET aGet[ 1 ] VAR aVar[ 1 ] ID 101
REDEFINE EDIT aGet[ 2 ] VAR aVar[ 2 ] ID 102
REDEFINE EDIT aGet[ 3 ] VAR aVar[ 3 ] ID 103
REDEFINE GET aGet[ 4 ] VAR aVar[ 4 ] ID 104
REDEFINE BUTTONBMP oIncluir ID 301 OF oDlg RESOURCE "FLOPPY2" TEXTRIGHT ;
ACTION ( GRABAR() )
oIncluir:cToolTip := "Grabar Todo"
REDEFINE BUTTONBMP oSalida ID 302 OF oDlg RESOURCE "EXIT" TEXTRIGHT ;
ACTION ( lOpenWind := .F., lSalida := .T., oDlg:End() ) CANCEL
oSalida:cToolTip := "Salida - Exit - Cancelar"
oDlg:bPainted := { || oDlg:SayText( "CHILD WINDOW-1" ) }
ACTIVATE DIALOG oDlg AS MDICHILD VALID( lSalida ) // X del dialogo
lSalida := .F.
RELEASE FONT oFont
RETURN NIL
FUNCTION Dlg2_AsMdiChild()
LOCAL oDlg, oFont, hFont, hDC, oIncluir, oSalida
LOCAL aVar := { PadR( "get1", 10 ), PadR( "edit", 10 ), Space( 10 ), PadR( "pwd", 10 ) }
LOCAL aGet[ 4 ]
// Para Impedir Uma 2¦ Abertura de Janela!!!
IF lOpenWind2 = .F.
lOpenWind2 := .T.
ELSE
RETURN NIL
ENDIF
DEFINE FONT oFont NAME "TAHOMA" SIZE 0, - 14
DEFINE DIALOG oDlg RESOURCE "TESTGETS" FONT oFont
oDlg:SetColor( 0, CLR_WHITE )
REDEFINE GET aGet[ 1 ] VAR aVar[ 1 ] ID 101
REDEFINE EDIT aGet[ 2 ] VAR aVar[ 2 ] ID 102
REDEFINE EDIT aGet[ 3 ] VAR aVar[ 3 ] ID 103
REDEFINE GET aGet[ 4 ] VAR aVar[ 4 ] ID 104
REDEFINE BUTTONBMP oIncluir ID 301 OF oDlg RESOURCE "FLOPPY2" TEXTRIGHT ;
ACTION ( GRABAR() )
oIncluir:cToolTip := "Grabar Todo"
REDEFINE BUTTONBMP oSalida ID 302 OF oDlg RESOURCE "EXIT" TEXTRIGHT ;
ACTION ( lOpenWind2 := .F., lSalida2 := .T., oDlg:End() ) CANCEL
oSalida:cToolTip := "Salida - Exit - Cancelar"
oDlg:bPainted := { || oDlg:SayText( "CHILD WINDOW-2" ) }
ACTIVATE DIALOG oDlg AS MDICHILD VALID( lSalida2 )
lSalida2 := .F.
RELEASE FONT oFont
RETURN NIL
FUNCTION GRABAR()
? [GRABAR AQUI EN NAGESMDI.PRG]
RETURN NIL
/*
// NAGESMDI.RC
TESTGETS DIALOG 210, 80, 194, 250
STYLE DS_ABSALIGN | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "TESTGETS By Nages"
FONT 8, "MS Sans Serif"
{
EDITTEXT 101, 33, 51, 131, 12, WS_BORDER | WS_TABSTOP
EDITTEXT 102, 33, 71, 131, 12, WS_BORDER | WS_TABSTOP
EDITTEXT 103, 33, 91, 131, 12, WS_BORDER | WS_TABSTOP
EDITTEXT 104, 33,111, 131, 12, ES_PASSWORD | WS_BORDER | WS_TABSTOP
PUSHBUTTON "&Grabar", 301, 35, 229, 60, 14
PUSHBUTTON "&Salida", 302, 98, 229, 60, 14
}
EXIT BITMAP
{
'42 4D 96 01 00 00 00 00 00 00 76 00 00 00 28 00'
'00 00 18 00 00 00 18 00 00 00 01 00 04 00 00 00'
'00 00 20 01 00 00 3E 0D 00 00 3E 0D 00 00 10 00'
'00 00 10 00 00 00 00 00 00 00 32 32 32 00 00 19'
'50 00 00 25 73 00 7A 7A 7A 00 00 00 80 00 00 7A'
'B9 00 80 00 80 00 00 92 DC 00 6B C6 FF 00 80 80'
'80 00 FF D4 8E 00 FF E2 B1 00 B1 E2 FF 00 C0 C0'
'C0 00 FF FF FF 00 71 00 00 00 00 00 00 00 00 00'
'00 77 77 35 55 55 53 32 02 D8 02 02 00 77 77 73'
'55 55 33 20 20 D8 60 20 20 77 77 77 35 53 32 02'
'02 D8 66 02 00 77 77 77 73 33 20 20 20 D8 66 60'
'20 77 77 77 77 11 11 11 11 D8 66 66 00 77 77 77'
'77 1B BB BB BB D8 66 66 60 77 77 77 77 1B BB BB'
'BB D8 66 66 60 77 77 77 77 1B BB BC BB D8 66 66'
'60 77 77 77 77 1C CC CF CC D8 66 66 60 77 77 77'
'77 01 CC CC CC D8 65 66 60 77 77 77 77 04 1C CC'
'CC D8 6D 66 60 77 70 00 00 0E 41 CC CC D8 66 66'
'60 77 70 44 44 4E E4 1C CC D8 66 66 60 77 7B FF'
'FF FF FF 41 CC D8 66 66 60 77 70 AA AA AF EA 1C'
'CC D8 66 66 60 77 70 00 00 0E A1 CC CC D8 66 66'
'60 77 77 77 77 0A 1C CC CC D9 86 66 60 77 77 77'
'77 01 CC CC CC CD 98 66 60 77 77 77 77 1C CC CC'
'CC CC D9 86 60 77 77 77 77 1C CC CC CC CC CD 98'
'60 77 77 77 77 1C CC CC CC CC CC D9 80 77 77 77'
'77 1C CC CC CC CC CC CD 90 77 77 77 77 11 11 11'
'11 11 11 11 11 77'
}
FLOPPY2 BITMAP
{
'42 4D F6 06 00 00 00 00 00 00 36 00 00 00 28 00'
'00 00 18 00 00 00 18 00 00 00 01 00 18 00 00 00'
'00 00 C0 06 00 00 00 00 00 00 00 00 00 00 00 00'
'00 00 00 00 00 00 FF 00 FF FF 00 FF FF 00 FF FF'
'00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00'
'FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF'
'00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00'
'FF FF 00 FF FF 00 FF 88 88 88 FF 00 FF FF 00 FF'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF'
'00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00'
'FF FF 00 FF FF 00 FF FF 00 FF 88 88 88 FF 00 FF'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF 30 30 30 31'
'31 31 29 79 C0 24 94 FB 22 90 FB 20 8C FB 1D 88'
'FB 1B 84 FB 19 80 FB 16 7C FB 15 78 FB 12 74 FB'
'10 70 FB 0E 6C FB 0B 68 FB 09 64 FB 07 60 FB 11'
'4F BF 35 35 35 34 34 34 FF 00 FF FF 00 FF FF 00'
'FF FF 00 FF 25 25 25 28 28 28 A8 B0 B7 E0 EB F6'
'DF EA F5 DE E9 F4 DE E8 F4 DD E7 F3 DC E6 F3 DB'
'E5 F2 DA E5 F2 DA E3 F1 D9 E3 F0 D8 E2 F0 D7 E1'
'EF D6 E0 EF D6 DF EE A0 A7 B2 46 46 46 42 42 42'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF 30 30 30 32'
'32 32 B6 B6 B6 F3 F3 F3 F2 F2 F2 F1 F1 F1 F1 F1'
'F1 F0 F0 F0 F0 F0 F0 EF EF EF EE EE EE EE EE EE'
'ED ED ED ED ED ED EC EC EC EB EB EB EB EB EB B1'
'B1 B1 31 31 31 31 31 31 FF 00 FF FF 00 FF FF 00'
'FF FF 00 FF 30 30 30 32 32 32 B6 B6 B6 ED ED ED'
'EC EC EC EC EC EC EB EB EB EB EB EB EA EA EA E9'
'E9 E9 E9 E9 E9 E8 E8 E8 E8 E8 E8 E7 E7 E7 E7 E7'
'E7 E6 E6 E6 E6 E6 E6 B1 B1 B1 31 31 31 31 31 31'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF 30 30 30 32'
'32 32 B6 B6 B6 EB EB EB EA EA EA E9 E9 E9 E9 E9'
'E9 E8 E8 E8 E8 E8 E8 E8 E8 E8 E7 E7 E7 E6 E6 E6'
'E6 E6 E6 E5 E5 E5 E5 E5 E5 E4 E4 E4 E4 E4 E4 B1'
'B1 B1 31 31 31 31 31 31 FF 00 FF FF 00 FF FF 00'
'FF FF 00 FF 30 30 30 32 32 32 B6 B6 B6 F8 F8 F8'
'F7 F7 F7 F7 F7 F7 F6 F6 F6 F5 F5 F5 F5 F5 F5 F4'
'F4 F4 F3 F3 F3 F3 F3 F3 F2 F2 F2 F2 F2 F2 F1 F1'
'F1 F0 F0 F0 F0 F0 F0 B2 B2 B2 31 31 31 31 31 31'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF 30 30 30 32'
'32 32 B6 B6 B6 EC EC EC EB EB EB EB EB EB EA EA'
'EA EA EA EA E9 E9 E9 E9 E9 E9 E8 E8 E8 E8 E8 E8'
'E7 E7 E7 E7 E7 E7 E6 E6 E6 E6 E6 E6 E5 E5 E5 B2'
'B2 B2 31 31 31 31 31 31 FF 00 FF FF 00 FF FF 00'
'FF FF 00 FF 31 31 31 32 32 32 B7 B7 B7 FA FA FA'
'F9 F9 F9 F8 F8 F8 F8 F8 F8 F7 F7 F7 F6 F6 F6 F6'
'F6 F6 F5 F5 F5 F5 F5 F5 F4 F4 F4 F3 F3 F3 F3 F3'
'F3 F2 F2 F2 F1 F1 F1 B4 B4 B4 31 31 31 31 31 31'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF 33 33 33 34'
'34 34 B6 B6 B6 ED ED ED ED ED ED EC EC EC EC EC'
'EC EB EB EB EB EB EB EA EA EA EA EA EA E9 E9 E9'
'E9 E9 E9 E8 E8 E8 E8 E8 E8 E7 E7 E7 E6 E6 E6 B3'
'B3 B3 31 31 31 31 31 31 FF 00 FF FF 00 FF FF 00'
'FF FF 00 FF 34 34 34 36 36 36 B7 B7 B7 FB FB FB'
'FB FB FB FA FA FA F9 F9 F9 F9 F9 F9 F8 F8 F8 F7'
'F7 F7 F7 F7 F7 F6 F6 F6 F6 F6 F6 F5 F5 F5 F4 F4'
'F4 F4 F4 F4 F3 F3 F3 B5 B5 B5 32 32 32 32 32 32'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF 36 36 36 38'
'38 38 B7 B7 B7 FC FC FC FB FB FB FB FB FB FA FA'
'FA F9 F9 F9 F9 F9 F9 F8 F8 F8 F8 F8 F8 F7 F7 F7'
'F6 F6 F6 F6 F6 F6 F5 F5 F5 F4 F4 F4 F4 F4 F4 B5'
'B5 B5 34 34 34 34 34 34 FF 00 FF FF 00 FF FF 00'
'FF FF 00 FF 38 38 38 39 39 39 71 71 71 A2 A2 A2'
'A1 A1 A1 A1 A1 A1 A1 A1 A1 A0 A0 A0 A0 A0 A0 A0'
'A0 A0 9F 9F 9F 9F 9F 9F 9F 9F 9F 9F 9F 9F 9F 9F'
'9F 9E 9E 9E 9E 9E 9E 72 72 72 3A 3A 3A 36 36 36'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF 3A 3A 3A 37'
'37 37 37 37 37 37 37 37 37 37 37 37 37 37 38 38'
'38 39 39 39 3B 3B 3B 3D 3D 3D 3F 3F 3F 41 41 41'
'43 43 43 45 45 45 46 46 46 48 48 48 49 49 49 4A'
'4A 4A 49 49 49 3D 3D 3D FF 00 FF FF 00 FF FF 00'
'FF FF 00 FF 3C 3C 3C 38 38 38 33 33 33 33 33 33'
'33 33 33 63 63 63 87 87 87 82 82 82 7C 7C 7C 77'
'77 77 72 72 72 7D 7D 7D 8A 8A 8A 8B 8B 8B 89 89'
'89 81 81 81 46 46 46 4D 4D 4D 4E 4E 4E 4E 4E 4E'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF 3E 3E 3E 36'
'36 36 2F 2F 2F 2F 2F 2F 2F 2F 2F C0 C0 C0 E5 E5'
'E5 D0 D0 D0 BA BA BA A4 A4 A4 91 91 91 85 85 85'
'3F 3F 3F 3F 3F 3F 9E 9E 9E F3 F3 F3 55 55 55 50'
'50 50 51 51 51 51 51 51 FF 00 FF FF 00 FF FF 00'
'FF FF 00 FF 40 40 40 38 38 38 32 32 32 32 32 32'
'31 31 31 C2 C2 C2 E5 E5 E5 D0 D0 D0 BA BA BA A4'
'A4 A4 91 91 91 80 80 80 32 32 32 32 32 32 97 97'
'97 F3 F3 F3 57 57 57 52 52 52 53 53 53 53 53 53'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF 41 41 41 3A'
'3A 3A 36 36 36 36 36 36 35 35 35 C3 C3 C3 E5 E5'
'E5 D0 D0 D0 BA BA BA A4 A4 A4 91 91 91 81 81 81'
'36 36 36 36 36 36 99 99 99 F3 F3 F3 56 56 56 4C'
'4C 4C 47 47 47 55 55 55 FF 00 FF FF 00 FF FF 00'
'FF FF 00 FF 42 42 42 3D 3D 3D 3A 3A 3A 3A 3A 3A'
'3A 3A 3A C4 C4 C4 E5 E5 E5 D0 D0 D0 BA BA BA A4'
'A4 A4 91 91 91 82 82 82 3A 3A 3A 3A 3A 3A 9A 9A'
'9A F3 F3 F3 53 53 53 23 23 23 28 28 28 52 52 52'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF 33 33 33 40'
'40 40 40 40 40 40 40 40 40 40 40 C5 C5 C5 E5 E5'
'E5 D0 D0 D0 BA BA BA A4 A4 A4 91 91 91 83 83 83'
'40 40 40 40 40 40 9C 9C 9C F3 F3 F3 57 57 57 4D'
'4D 4D 48 48 48 56 56 56 FF 00 FF FF 00 FF FF 00'
'FF FF 00 FF 34 34 34 44 44 44 48 48 48 48 48 48'
'48 48 48 C6 C6 C6 E5 E5 E5 D0 D0 D0 BA BA BA A4'
'A4 A4 91 91 91 99 99 99 8D 8D 8D 97 97 97 C6 C6'
'C6 F3 F3 F3 58 58 58 56 56 56 57 57 57 6B 6B 6B'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF'
'00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00'
'FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF'
'00 FF 9C 9C 9C FF 00 FF FF 00 FF FF 00 FF FF 00'
'FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF'
'FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF'
'00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00'
'FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF FF 00 FF'
'FF 00 FF FF 00 FF'
}
*/
// FIN / END
Regards, saludos.