MatheusFarias Posted August 14, 2013 Report Share Posted August 14, 2013 Não consigo usar a ação da minha barra de mensagem aqui esta o codigo fonte if !file("c:\Chkstru.sys") prog := VERSAO DEFINE MSGBAR oMsgBar Prompt "Acesse www.inteligence.com.br ou Contate-nos por e-mail: suporte@inteligence.com.br" ; OF oWndPrin 2010 KEYBOARD DATE ELSE DEFINE MSGBAR oMsgBar PROMPT "Acesse www.inteligence.com.br" ; OF oWndPrin 2010 KEYBOARD DATE TIME ENDIF cPrompt :="Usuário:"+USUARIO DEFINE MSGITEM oMitem OF oMsgBar ; PROMPT cPrompt SIZE oWndPrin:GetWidth(cPrompt) + 20 ; ACTION msginfo("Último acesso foi em:"+dtoc(vdatausu)+" ás "+vhorausu+". Tempo de Uso:"+".","Informação") ; TOOLTIP "Nome do Usuário Logado no Sistema" DEFINE MSGITEM oMit1 OF oMsgBar ; BITMAP "PRINTER" SIZE 30 ; TOOLTIP "Impressora padrão atual é "+ CRLF+ " " +PrnGetName() + " " ; ACTION PrinterSetup() DRIVE_TR := DISKNAME()+":\"+CURDIR() DEFINE MSGITEM oMit2 OF oMsgBar ; BITMAP IF(LEFT(DRIVE_TR,2) = "C:","COMP","REDE") SIZE 30 ; TOOLTIP "Sistema Está Logado em" + CRLF + DRIVE_TR ; ACTION MsgInfo( "Sistema Está Logado Em" + CRLF + ; "Driver: " + DRIVE_TR , "Informação") DEFINE MSGITEM oOper OF oMsgBar ; BITMAP "LOGOFF" SIZE 30 ; TOOLTIP "Logoff do Sistema" ; ACTION Abertura2() ; * ACTIVATE WINDOW oWndPrin MAXIMIZED Nenhum Action Funciona , nem o padrao que sao a data hora e os atalhos do teclado , alguem ja passou por isso? Obs antes estava usando o set message somente com date time e Keyboard e nao funcionava tambem , na verdade parou de funcionar Quote Link to comment Share on other sites More sharing options...
kapiaba Posted August 14, 2013 Report Share Posted August 14, 2013 // Vamos ver se voce acha as diferencas. // Baixe no \samples e teste... Leia com calma. #include "FiveWin.ch" static oWnd //----------------------------------------------------------------------------// function Main() local lMail := .t., oBar local oMsgItem, oMsgItemMail LOCAL DRIVE_TR, oMit2, oOper DRIVE_TR := DISKNAME()+":\"+CURDIR() DEFINE WINDOW oWnd TITLE "Testing MsgBar with bitmaps" DEFINE BUTTONBAR oBar OF oWnd _3D @ 10,10 CHECKBOX lMail PROMPT "E-Mail" OF oWnd ; SIZE 200, 35 COLOR CLR_BLACK ; ON CHANGE If( ! lMail, oWnd:oMsgBar:DelItem( oMsgItemMail ), ; oWnd:oMsgBar:InsItem( oMsgItemMail, 2 ) ) SET MESSAGE OF oWnd TO "I may use different bitmaps" 2007 DEFINE MSGITEM oMsgItem OF oWnd:oMsgBar ; PROMPT "Lock" ; SIZE 60 ; BITMAPS "..\bitmaps\16x16\lock.bmp", "..\bitmaps\16x16\unlock.bmp" ; ACTION ( oMsgItem:lActive := !oMsgItem:lActive, oMsgItem:Paint() ) DEFINE MSGITEM oMsgItemMail OF oWnd:oMsgBar ; SIZE 24 ; BITMAPS "..\bitmaps\16x16\MAIL.BMP" ; TOOLTIP "Check the email" + CRLF + "Get email" DEFINE MSGITEM OF oWnd:oMsgBar ; BITMAPS "..\bitmaps\16x16\PRINTER.BMP" ; ACTION PrinterSetup() ; TOOLTIP "Setup the printer" // BITMAP IF(LEFT(DRIVE_TR,2) = "C:","COMP","REDE") SIZE 30 ; DEFINE MSGITEM oMit2 OF oWnd:oMsgBar ; BITMAPS "..\bitmaps\16x16\EXIT.BMP" ; TOOLTIP "Sistema Está Logado em" + CRLF + DRIVE_TR ; ACTION MsgInfo( "Sistema Está Logado Em" + CRLF + ; "Driver: " + DRIVE_TR , "Informação") // BITMAP "LOGOFF" SIZE 30 ; DEFINE MSGITEM oOper OF oWnd:oMsgBar ; BITMAPS "..\bitmaps\16x16\BOOKS.BMP" ; TOOLTIP "Logoff do Sistema" ; ACTION Abertura2() oWnd:oMsgBar:DateOn() oWnd:oMsgBar:ClockOn() ACTIVATE WINDOW oWnd return nil //----------------------------------------------------------------------------// FUNCTION Abertura2() ? [LOGOFF DO SISTEMA... ] RETURN NIL Quote Link to comment Share on other sites More sharing options...
MatheusFarias Posted August 17, 2013 Author Report Share Posted August 17, 2013 Kapiaba o exemplo compilado funciona ok porem se colocar dentro da aplicaçao ele não funciona , e o codigo é somente aquele que esta em cima no 1º Post Quote Link to comment Share on other sites More sharing options...
Erciley Junior Posted August 19, 2013 Report Share Posted August 19, 2013 Ninguém alterou a classe do MSGBAR aí do seu sistema? Veja nos eventos Onclick se está fazendo algum AEVAL no bloco bAction Negócio é ir debugando a classe. 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.