|
-
Oct 5th, 2008, 06:28 PM
#1
Thread Starter
Addicted Member
[2008] Message box help
I made a right click menu but i named a button there close so before article is closed i want message box to show and ask are you sure you want to exit..
can some one help me on this..?!
also for the code to make the article exit at all and close the Notification icon also...
Last edited by TetovaBoy; Oct 5th, 2008 at 06:31 PM.
< advertising link removed by moderator >
-
Oct 5th, 2008, 06:37 PM
#2
Re: [2008] Message box help
try this:
vb Code:
If MessageBox.Show("Are you sure you want to exit?", "Exit?.....", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly, False) = DialogResult.OK Then
Application.Exit()
End If
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Oct 5th, 2008, 06:41 PM
#3
Thread Starter
Addicted Member
Re: [2008] Message box help
thanks mate but the system try icon still dont hides...!!!
< advertising link removed by moderator >
-
Oct 5th, 2008, 06:49 PM
#4
Re: [2008] Message box help
move your mouse over it. does it disappear?
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Oct 5th, 2008, 06:50 PM
#5
Thread Starter
Addicted Member
Re: [2008] Message box help
nope it donts still it uses even the right click menu
again i do same click exit on it asks the box i click yah
from desktop the panel exits but on system try its icon stays
< advertising link removed by moderator >
-
Oct 5th, 2008, 06:51 PM
#6
Thread Starter
Addicted Member
Re: [2008] Message box help
Code:
Private Sub Form1_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
e.Cancel = True
Me.Hide()
End Sub
i used this for x maybe do u think this can do not let it exit at all..?!
< advertising link removed by moderator >
-
Oct 5th, 2008, 06:52 PM
#7
Thread Starter
Addicted Member
Re: [2008] Message box help
i fixed thanks for your helps..
< advertising link removed by moderator >
-
Oct 6th, 2008, 06:39 AM
#8
Lively Member
Re: [2008] Message box help
Code:
If MessageBox.Show("Do you really want to exit", "Exit?", MessageBoxButtons.YesNo) = Windows.Forms.DialogResult.Yes Then Application.Exit()
Should work for you.
-
Oct 6th, 2008, 06:40 AM
#9
Lively Member
Re: [2008] Message box help
-
Oct 6th, 2008, 06:45 AM
#10
Thread Starter
Addicted Member
Re: [2008] Message box help
< advertising link removed by moderator >
-
Oct 6th, 2008, 06:48 AM
#11
Lively Member
Re: [2008] Message box help
Code:
If MessageBox.Show("Do you really want to exit", "Exit?", MessageBoxButtons.YesNo) = Windows.Forms.DialogResult.Yes Then Application.Exit()
Works perfectly for me. Do this:
Code:
Try
If MessageBox.Show("Do you really want to exit", "Exit?", MessageBoxButtons.YesNo) = Windows.Forms.DialogResult.Yes Then Application.Exit()
Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try
See if that spits out an error for you. If so, copy the messagebox text and paste it here so we know what the problem is. That code should def be working for you though.
-
Oct 6th, 2008, 07:18 AM
#12
Thread Starter
Addicted Member
Re: [2008] Message box help
nope mate can u upload my project u download and check.>?!
because not working...
< advertising link removed by moderator >
-
Oct 6th, 2008, 07:22 AM
#13
Lively Member
Re: [2008] Message box help
upload it and ill check it out.
-
Oct 6th, 2008, 07:29 AM
#14
Re: [2008] Message box help
you said you've fixed it in post #7
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Oct 6th, 2008, 07:35 AM
#15
Thread Starter
Addicted Member
Re: [2008] Message box help
i fixed as i delete this code
Code:
Private Sub Form1_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
e.Cancel = True
Me.Hide()
End Sub
< advertising link removed by moderator >
-
Oct 6th, 2008, 07:39 AM
#16
Thread Starter
Addicted Member
Re: [2008] Message box help
< advertising link removed by moderator >
-
Oct 6th, 2008, 10:14 AM
#17
Thread Starter
Addicted Member
Re: [2008] Message box help
can u check this now and help me..?!
< advertising link removed by moderator >
-
Oct 6th, 2008, 02:25 PM
#18
Frenzied Member
Re: [2008] Message box help
If you remove this:
Code:
e.Cancel = True
Me.Hide()
then that should make it exit. Replace it with code to unload all your objects. (I cant test it as I dont have the same controls installed.)
And just for future reference you can zip it up and host it on the forum its self. And if its too large (500k is the limit for a zipped folder i think), then please don't use a site you need to register with in order to download.
-
Oct 6th, 2008, 03:19 PM
#19
Thread Starter
Addicted Member
Re: [2008] Message box help
i know when i remove it it works 
but can u tell me how 2 make when user click x the x on window how cna i make else the article go down on system try and when user right clicks and selects exit the Application to exit..!!
< advertising link removed by moderator >
-
Oct 6th, 2008, 03:21 PM
#20
Frenzied Member
Re: [2008] Message box help
Im not sure what you mean?
-
Oct 6th, 2008, 03:23 PM
#21
Re: [2008] Message box help
sounds easy enough. post it on the forum
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Oct 6th, 2008, 03:32 PM
#22
Re: [2008] Message box help
 Originally Posted by TetovaBoy
i know when i remove it it works
but can u tell me how 2 make when user click x the x on window how cna i make else the article go down on system try and when user right clicks and selects exit the Application to exit..!!
you need to set a form level boolean flag to check why the form is attempting to close. upload your project to the forum and i'll have another look.
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|