Question[help]MSGBOX[Solved]

Posts 1–9 of 9 · Page 1 of 1
[help]MSGBOX[Solved]
Okay, so I made stuff already, but when I see someone's VB work, they have..like a 'help' button or something close to that.

Is this correct?
Code:
Private Sub Button20_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button20.Click
        Dialog1.Enabled = True
    End Sub
or

Code:
Private Sub Button20_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button20.Click
        Dialog1.Text = Time0PassedBy.ToString
    End Sub
Dialog1 is my..public class name, well, when I press on my ''Help'' button, Im trying to get it to show my ''Dialog1'' which explains the stuff, but I don't seem to code it right because the Dialog doesn't show up when I press the help button. So can someone show my the right way?

I know its something like
Code:
Private Sub Button20_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button20.Click
        ___________ <- I dont know how to make that when i press my button20 it has the dialog pop up
   End Sub
All help will be appreciated, I really need the help..

Thanks!
make it with a MsgBox
Yes, you can try Msgbox.

Here is an example:

Code:
Msgbox ("Help content....")
If you want to display the real exception and not a "fake" or 'Created" error, use

[php]
Try
' Your code here , What it is you want to try and do
Catch ex as exception
msgbox (ex.message)
End Catch

[/php]

So an example of use would be

in a button click add

[php]
Try
Dim l as integer = textbox1.text
Textbox1.text = "Food"
Catch Ex as Exception
'If you get an error
msgbox(ex.message)
end catch
[/php]

Im going off the top of my head, but when you Press the button you should now get the real error, because Food is not a Integer.


If that is what you are looking for

Messages in the forms listed above are for errors / comments / warnings, but used in that manner when you know what you want to display

So in a scenerio where you know the message you want to display it is msgbox (message here)

Also for more help on how to use message boxes, I have a tutorial in my tuts sticky

Here is the link
http://www.mpgh.net/forum/33-visual-...damentals.html
Or if you want the Dialog1 to pop up use

[php]Dialog1.Show[/php]
Try this out

[php]Dim myForm As New Form1
myForm.Show()[/php]
Quote Originally Posted by zmansquared View Post
Try this out

[php]Dim myForm As New Form1
myForm.Show()[/php]
Which will work for generating a new instance of form1 and displaying it.

I think he is looking to display real errors however .
Thank you to all those who replied it worked very well!
Posts 1–9 of 9 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us