kapiaba Posted March 20, 2014 Report Share Posted March 20, 2014 // http://forums.fivetechsupport.com/viewtopic.php?f=3&t=28207 #Include 'Fivewin.Ch' FUNCTION Main() LOCAL oDlg, oBut1, oBut2, nKey := VK_RETURN DEFINE DIALOG oDlg FROM 100 , 100 TO 500 , 500 PIXEL oDlg:lHelpIcon := .F. @ 1 , 10 BTNBMP oBut1 PROMPT "&1.First" SIZE 100 , 20 OF oDlg ; ACTION ( sleep( 1000 ), ; MsgInfo( "OK1" ), ; oBut1:cCaption := "&1.First", ; // back to original promttext oBut1:Refresh() ) ; CENTER oBut1:setcolor( CLR_WHITE , CLR_HBLUE ) @ 30 , 10 BTNBMP oBut2 PROMPT "&2.Second" SIZE 100 , 20 OF oDlg ; ACTION ( sleep( 1000 ), ; MsgInfo( "OK2" ), ; oBut2:cCaption := "&2.Second", ; // back to original promttext oBut2:Refresh() ) ; CENTER oBut2:setcolor( CLR_WHITE , CLR_HRED ) oDlg:bKeyDown := { |nKey| Premi( nKey , oBut1 , oBut2 ) } ACTIVATE DIALOG oDlg CENTERED RETURN NIL // ----------------- FUNCTION PREMI( nKey , oBut1 , oBut2 ) LOCAL cPressed := UPPER( CHR( nKey ) ) DO CASE CASE cPressed = "1" oBut1:cCaption := "Pressed..." oBut1:Refresh() oBut1:Click() CASE cPressed = "2" oBut2:cCaption := "Pressed2.." oBut2:Refresh() oBut2:Click() ENDCASE RETURN( .T. ) Quote Link to comment Share on other sites More sharing options...
vagner Posted March 20, 2014 Report Share Posted March 20, 2014 Olá Kapi,VBtnBmp Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.