Jump to content
Sign in to follow this  
jafm

[Resolvido] Fechar janela MsgBox

Recommended Posts

jafm

Olá,

Gostaria que a Msgbox que apresente se fechasse automaticamente. Ser ser necessário clicar em ok

Estava a experimentar algo deste gênero, mas não resulta.

MsgBox("Com Sucesso!")
               'System.Threading.Thread.Sleep("100")
               Me.Close()

Edited by thoga31
GeSHi

Share this post


Link to post
Share on other sites
jafm

Não me parece que funciona.

Coloquei da seguintes forma,

Private Sub AutoCloseMsgBox(Mensagem As String, Titulo As String, Segundos As Integer)
       Dim oSHL = CreateObject("WScript.Shell")
       oSHL.PopUp(Mensagem, Segundos, Titulo, vbOKOnly + vbInformation)
   End Sub

depois no chamei da seguinte forma, mas dá erro de sintaxe...

AutoCloseMsgBox("MsgBox - Com Sucesso!", 2)

Edited by thoga31
GeSHi

Share this post


Link to post
Share on other sites
NunoDinis

Estive a testar e consegui. Falta passar um parâmetro, o titulo:

 AutoCloseMsgBox("MsgBox - Com Sucesso!", "nuno", 2)

Edited by NunoDinis

Estranha forma de vida que tem a capacidade de transformar comandos em mensagens de erro.

ndsotware.org

Share this post


Link to post
Share on other sites
jafm

O erro é o seguinte:

Argument not specified for parameter 'Segundos' of 'Private Sub AutoCloseMsgBox (Mensagem As String, Titulo As String, Segundos As Integer)

Share this post


Link to post
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.   Restore formatting

  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.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.