Jump to content
Fivewin Brasil

Set Message ou DEFINE MSGBAR com problema


MatheusFarias

Recommended Posts

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

Link to comment
Share on other sites

// 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


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...