Jump to content
Fivewin Brasil

Como Travar o Teclado e destravar


PONTON

Recommended Posts

Olá Amigos.

Vagner e Gilmer fiz como voces me indicaram mais nao tive resultados, gostaria que postasem um pequeno exemplo pois realmente uso para o tef, que pede para travar o teclado enquanto estar imprimindo e outros casos. Me ajudem por favor.

Abraços a Todos.

NILTON.

niltonponton@yahoo.com.br

Link to comment
Share on other sites

Boa tarde Nilton,

Como disse o Gilmer;

>Se você esta querendo fazer isto por causa do TEF, crie >uma Dialog NOWAIT e feche somente no final do processo.

Segue abaixo um exemplo de como fazer: Gere um arquivo .prg deste exemplo, compile e veras o que o Gilmer quis dizer...

#include "FiveWin.ch"

*************

function MAIN

*************

local ODLG_PRINC

*define dialog ODLG from ...

CUPOMTEF( ODLG_PRINC )

return NIL

*****************

function CUPOMTEF( ODLG_PRINC )

*****************

private aRet

aRet := T_ESPERA()

aRet[1]:SetFocus()

* aqui processar suas rotinas do tef...

*.

*.

*.

syswait(5)

aRet[1]:SetFocus()

aRet[2,2]:SetText( padc( "Finalizando TEF. Aguarde 5 Segundos...", 70 ) )

syswait(5)

FINAL_TEF( ODLG_PRINC )

return NIL

*************************

static function FINAL_TEF( ODLG_PRINC )

*************************

aRet[1]:End()

*ODLG_PRINC:setfocus()

*ODLG_PRINC:show()

sysrefresh()

return NIL

************************

static function T_ESPERA

************************

local ODLGESP, oSay[2], oFont

define font oFont name "MS Sans Serif" size 12, 24 bold

CursorWait()

define dialog ODLGESP from 00, 00 to 100, 500 ;

style nOr( DS_MODALFRAME, WS_POPUP ) pixel color nrgb(000,000,00), nrgb(247,214,115)

@10, 01 say oSay[1] prompt padc( space(65) , 65 ) of ODLGESP font ofont color nrgb(255,000,00), nrgb(247,214,115) update pixel

@30, 01 say oSay[2] prompt padc( "Acionando o TEF. Aguarde 5 Segundos...", 65 ) of ODLGESP font ofont color nrgb(255,000,00), nrgb(247,214,115) update pixel

activate dialog ODLGESP centered NOWAIT

return { ODLGESP, oSay }

=======================================================

Espero ter te ajudado,

Abraços,

Rossine.

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