Jump to content
xisto Community
Sign in to follow this  
electriic ink

Making My About Box Show When I Go ["help --> About"] giving myself rightful credits

Recommended Posts

I've just finished downloading Visual Basic 2005 Express Edition and I love it. I've improvised upon their beginners tutorial about creating a browser except I want to create an About Box to go with it.

 

I've done the box itself (it's called AboutBox1) I just need the code to display it when you click Help --> About. So far I've got:

 

Private Sub AboutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AboutToolStripMenuItem.Click	    ' NEEDS TO GO HERE	End Sub

I've tried AboutBox1.Show() , Show.AboutBox1() , Show(AboutBox1) and AxCommonDialog1.ShowAbout()

 

Thanks in advance.

Share this post


Link to post
Share on other sites

I have just created an app with a menu bar and a spearate form with a label. The following code worked perfectly to load Form2 when the Help > About button was clicked on the menu strip.

Public Class Form1	Private Sub AboutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AboutToolStripMenuItem.Click		Form2.Show()	End SubEnd Class

I also just tried this using a specific about box (rather than just a standard form) and that also worked fine.

 

The correct accepted code to load a form, with the current form you are viewing as its parent form, is FORMNAME.Show() so that should work for you. Are you sure that your about box is not getting loaded somewhere else in the code or is being loaded at the startup and just being hidden?

Share this post


Link to post
Share on other sites

Thank you for expressing an interest in helping. The code I have used is as follows:

Private Sub AboutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AboutToolStripMenuItem.Click		AboutBox1.Show()	End Sub

Which isn't dissimilar to what you gave me. This is a screenshot of what the screen looks like after I type the code:



I can't think want the problem is as an online tutorial told me to do exactly the same thing as you have. <_<

Share this post


Link to post
Share on other sites

I reckon, due to that blue underline on the code (the same sort of thing you get for spelling mistakes in Word etc) that form doesn't actually exist. You have named the file AboutBox1, however the form's name is probably still something like Form2 and it is this that you need to put in the code. Go into the design view of AboutBox1 and click anywhere on the main form area and look at the properties. Make sure the form name is also set to AboutBox1 rather than Form2 or something.

Share this post


Link to post
Share on other sites

yahhhhhhhhhhhh

 

1st. we must make a new form and design it!

2nd. now click help ==> about and enter code here

Private Sub AboutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AboutToolStripMenuItem.Click		xxx.Show()End Sub

you just change xxx with form name you want to show

 

its very easy!

 

:)

Edited by tydes (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.