PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 25 → Dica: erro ao fechar tela vision no X
Dica: erro ao fechar tela vision no X
Débuté par ANDRE MARTINI / IS2, 13 avr. 2016 20:32 - 3 réponses
Membre enregistré
212 messages
Popularité : +25 (25 votes)
Posté le 13 avril 2016 - 20:32
Olá pessoal,

verifiquei que por padrão se o usuário fechar a janela de uma vision no botão X ocorre um erro no sistema porque a propriedade MyWindow..ReturnedValue retorna um valor NULL para a chamada nCodigoGrupo is int = Open(WIN_Grupo_De_Produtos_Vision)

para resolver isso fiz o seguinte:

closing WIN_Grupo_de_Produtos_Vision
IF MyWindow..ReturnedValue = Null THEN
MyWindow..ReturnedValue = 0
END


--
André Martini
IS2 Automotive http://www.is2.inf.br/is2automotive/index.html
IS2 Construtive http://www.is2.inf.br/is2construtive/index.html
IS2 Store http://www.is2.inf.br/is2store/index.html
IS2 Gerent http://www.is2.inf.br/is2gerent/index.html
Membre enregistré
3 659 messages
Popularité : +175 (223 votes)
Posté le 21 avril 2016 - 12:56
:merci:

--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 9949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.blogspot.com.br/
Posté le 21 avril 2016 - 15:09
Acredito que faltou setar um valor para MyWindow..ReturnedValue por isso retorna NULL,
se colocar no load do Vision MyWindow..ReturnedValue = 0 deve resolver
Membre enregistré
212 messages
Popularité : +25 (25 votes)
Posté le 22 avril 2016 - 19:59
no final da inicialização do form vision o valor é setado
// Default return value
MyWindow..ReturnedValue = 0


mas se abrir o form vision e clicar direto no botão X para fechar dá um erro. Colocando o código abaixo no fechamento do form o erro não acontece
IF MyWindow..ReturnedValue = Null THEN
MyWindow..ReturnedValue = 0
END


--
André Martini
IS2 Automotive http://www.is2.inf.br/is2automotive/index.html
IS2 Construtive http://www.is2.inf.br/is2construtive/index.html
IS2 Store http://www.is2.inf.br/is2store/index.html
IS2 Gerent http://www.is2.inf.br/is2gerent/index.html