Nov 21, 2009

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

free web hosting
Open Discussion > MODERATED AREA > Computers > Programming Languages > VB Programming

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

electriic ink
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:

CODE

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.

 

 

 


Comment/Reply (w/o sign-up)

rvalkass
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.
CODE

Public Class Form1

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

    End Sub
End 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?

 

 

 


Comment/Reply (w/o sign-up)

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

CODE
    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:

Click to view attachment

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

Comment/Reply (w/o sign-up)

rvalkass
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.

Comment/Reply (w/o sign-up)

electriic ink
Thank you. It works now biggrin.gif It turns out that the actual name of the form was About so the code About.Show() works.

Comment/Reply (w/o sign-up)

tydes
yahhhhhhhhhhhh

1st. we must make a new form and design it!
2nd. now click help ==> about and enter code here
CODE
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!

wink.gif

Comment/Reply (w/o sign-up)



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)


Searching Video's for making, box, show, giving, rightful, credits
See Also,
advertisement


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

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com