vb .net Message Box

  • Thread starter Thread starter Peter
  • Start date Start date
P

Peter

Hi guys

Does anybody have a solution to my problem?
Here it goes. I have a message box poping up when the filename entered
by the user already exists. Closing the Message box will close the
Parent window loosing all the settings. Is there a way to close the
MsgBox only???

Appreciate your help
 
* (e-mail address removed) (Peter) scripsit:
Does anybody have a solution to my problem?
Here it goes. I have a message box poping up when the filename entered
by the user already exists. Closing the Message box will close the
Parent window loosing all the settings. Is there a way to close the
MsgBox only???

"Post code!"
 
* (e-mail address removed) (Peter) scripsit:

"Post code!"

If (MsgBox("File already exist OK to overwrite Cancel to Rename",
MsgBoxStyle.MsgBoxSetForeground, "File Name Error") = MsgBoxResult.OK)
Then
Me.Close()
Else If
 
Peter,
If (MsgBox("File already exist OK to overwrite Cancel to Rename",
MsgBoxStyle.MsgBoxSetForeground, "File Name Error") = MsgBoxResult.OK)
Then
Me.Close()
Else If

Me.close is the same as this(class).close what is probably your form.

There is no reason to close the messagbox, because it closes automaticly. I
think that Herfried was as curious as me how you did close that messagebox
by hand.

:-)

I hope this helps?

Cor
 
* (e-mail address removed) (Peter) scripsit:
If (MsgBox("File already exist OK to overwrite Cancel to Rename",
MsgBoxStyle.MsgBoxSetForeground, "File Name Error") = MsgBoxResult.OK)
Then
Me.Close()

Get rid of the 'Me.Close()' line. 'MsgBox' will return when the message
box is closed automatically.
 
Cor Ligthert said:
Peter,


Me.close is the same as this(class).close what is probably your form.

There is no reason to close the messagbox, because it closes automaticly. I
think that Herfried was as curious as me how you did close that messagebox
by hand.

:-)

I hope this helps?

Thanks guys

I really appreciate your help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top