Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Making My About Box Show When I Go ["help --> About"], giving myself rightful credits
electriic ink
post Jul 14 2006, 04:05 PM
Post #1


Incest is a game the whole family can play.
Group Icon

Group: [MODERATOR]
Posts: 1,234
Joined: 11-February 05
From: Heaven
Member No.: 3,709
myCENT:15.88



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.
Go to the top of the page
 
+Quote Post
rvalkass
post Jul 14 2006, 06:38 PM
Post #2


apt-get moo
Group Icon

Group: [MODERATOR]
Posts: 2,238
Joined: 28-May 05
From: Devon, England
Member No.: 7,593
Spam Patrol
myCENT:45.20



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?
Go to the top of the page
 
+Quote Post
electriic ink
post Jul 14 2006, 07:29 PM
Post #3


Incest is a game the whole family can play.
Group Icon

Group: [MODERATOR]
Posts: 1,234
Joined: 11-February 05
From: Heaven
Member No.: 3,709
myCENT:15.88



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:



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
Go to the top of the page
 
+Quote Post
rvalkass
post Jul 15 2006, 09:06 AM
Post #4


apt-get moo
Group Icon

Group: [MODERATOR]
Posts: 2,238
Joined: 28-May 05
From: Devon, England
Member No.: 7,593
Spam Patrol
myCENT:45.20



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.
Go to the top of the page
 
+Quote Post
electriic ink
post Jul 15 2006, 09:41 AM
Post #5


Incest is a game the whole family can play.
Group Icon

Group: [MODERATOR]
Posts: 1,234
Joined: 11-February 05
From: Heaven
Member No.: 3,709
myCENT:15.88



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.
Go to the top of the page
 
+Quote Post
tydes
post Oct 5 2006, 06:48 AM
Post #6


Newbie [Level 3]
***

Group: Members
Posts: 41
Joined: 2-October 06
Member No.: 30,918



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

This post has been edited by tydes: Oct 5 2006, 06:51 AM
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Making A Rss Reader(8)


 



- Lo-Fi Version Time is now: 22nd November 2008 - 10:17 PM