473,320 Members | 2,202 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Showing the message box twice problem

lotus18
866 512MB
Hello World!

I have this code:

Expand|Select|Wrap|Line Numbers
  1. Private Sub mnuItemExit_Click(ByVal sender As Object, ByVal e As EventArgs) Handles mnuItemExit.Click
  2.         If MessageBox.Show("Are you sure you want to exit system?", "Exit System", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
  3.             Global.System.Windows.Forms.Application.Exit()
  4.         End If
  5. End Sub
How can I prevent it to show it twice everytime I clicked the Yes button?

Rey Sean
May 22 '08 #1
2 1438
Plater
7,872 Expert 4TB
EDIT:
Hmm, I have no idea why it would show your messagebox twice?
Have you put a breakpoint in there and stepped through the code to see the path the code takes? It might tell you why/how you are getting the message twice.
May 22 '08 #2
lotus18
866 512MB
EDIT:
Hmm, I have no idea why it would show your messagebox twice?
Have you put a breakpoint in there and stepped through the code to see the path the code takes? It might tell you why/how you are getting the message twice.
Ahh.. OK. Atlast I solved the problem. I just reviewed the codes and delete the unnecessary lines.

Rey Sean
May 23 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Vishnu | last post by:
I have a strange problem on WindowsXP proffessional with IE6 ,when i try to display a tiff file ,it is not showing ,small red x is comming up. I tried by dowloading latest IE from microsoft but...
7
by: Chris | last post by:
hello, I have a small module which only contains some utility functions. when running this standalone I would like to show the module docs and each function docs, as if doing import M help(M)...
1
by: Jorge Godoy | last post by:
Hi. I have created an interface where I have a QDataBrowser and all of its editing and navigating controls and one of the displayed controls is in a QSpinBox. I have the navigation from...
2
by: tshad | last post by:
I have a Datagrid that has no rows in it, but I want the title to show, and they aren't. Is there a way to make them visible even if the Datagrid is empty? Thanks, Tom
5
by: Josh Golden | last post by:
3 forms. form 1, when button clicked instantiates form 2 which opens but is not shown. form 2 instantiates form 3 as showdialog. form 3 finishes, raises an event that form 2 catches. during the...
4
by: Blasting Cap | last post by:
I have some code where I populate some items in a listbox. The code is: ListBoxDomesticExport.Items.Insert(0, "Domestic (Commercial)") ListBoxDomesticExport.Items(0).Value = "0" ...
11
usafshah
by: usafshah | last post by:
in My Computer > Properties .. The processor is showing twice i mean two time although there is only one processor in my computer. that is 2.0 Ghz and its showing .. ...
1
by: acehigh1983 | last post by:
hello fellow coders i'll try and explain this as best as i can... I have created a .shtml page, all this does is mimic another webpage (i.e. same variables, textboxes etc) its just a different...
1
by: =?iso-8859-1?B?R2VhcvNpZA==?= | last post by:
Strange problem... Have a gridview on a page (within an update panel) for displaying event dates. GridView loads fine first time around with the PageLoad. There are 2 text fields a user can...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.