** ****************************************************************************************** * **EndUser4gl : Exemple d'un langage de 4 ème génération ** ******************************************************************************************* ** ** pictureBmp : ** #include "c:\EndUser4gl\4gl\hlp\IncludeSysEU\includesyseu.h" integer : exit_trans1 ,x ; char : WWWAdresse:128; begin_transaction : Trans1 Execute Transaction with exit_trans1 != 1 begin_dialog **BACKGROUNDHATCHBRUSH : HS_DIAGCROSS color(0,0,255)**color(180,250,94) Backgroundcolor : color(98,120,250) WinExtendstyle : :WS_EX_DLGMODALFRAME Winstyle : :WS_OVERLAPPED & :WS_CAPTION & :WS_SYSMENU & :WS_THICKFRAME & :WS_MINIMIZEBOX & :WS_MAXIMIZEBOX & CENTERDIALOG 300,300, 450,300 , " EndUser 4 GL : Internet SendEmail ",UserDialog Rectangle 55, 15,250, 250, BkColor15 Attribut : FillColor : 230,242,218 FrameColor : 230,242,218 Rectangle 50, 10,250, 250, BkColor16 Attribut : FillColor : 144,208,213 FrameColor : 0,0,255 ButtonIconDrawLabel width Icon: 42 ,height Icon : 42 , 50,150, 1,1, "c:\EndUser4gl\4gl\hlp\pgmicon\outlook.ico" , Boutonexpl ButtonRegionChild 50,150,42,41, BoutonRegion create : use Cursor "c:\EndUser4gl\4gl\hlp\PgmCursor\hand-l.cur" , Create : Info " Internet @ SendEmail. ....... " Rectangle 96, 156,310, 20, BkColor41 Attribut : FillColor : 0,145,145 FrameColor : 0,145,145 TextBox : WinExtendstyle : :0 Winstyle : :ES_LEFT 100, 160, 300, 18, ZoneTexte1 create : like WWWAdresse PushButton 1, 250, 88, 21, "Cancel", BoutonCancel end_dialog /* ------------------- INIT (optional) --------------------------------- */ Begin_Initialize IconDialog(UserDialog:"c:\EndUser4gl\4gl\hlp\pgmicon\outlook.ico"); WWWAdresse := "bergou@club-internet.fr"; SetColorText (ZoneTexte1 :red,-1); ** no background End_Initialize /* ------------------- SHOW DIALOGUE --------------------------------- */ OpenDialog (UserDialog) ; require GetPush(Boutonregion ) returning (x); if( x Not_Void ) then SendMail(UserDialog: "bergou@club-internet.fr", "Objet: Info","bergou@club-internet.fr Message to Ph Bergougnoux : "); end_if; isOnSetCursor( Boutonregion) returning (x); if( x Not_Void ) then DrawFocusRect(Boutonregion); end_if; require GetPush(BoutonCancel) returning (x); if( x Not_Void ) then MsgBox : TITLE "My First SendEmail" Message : " Push is ok : Cancel Transaction" button : MB_OK icon : MB_ICONEXCLAMATION returning (x) ; exit_trans1 := 1 ; end_if; end_transaction ;