Solved

Windows Form

Posted on 2006-06-14
7
246 Views
Last Modified: 2012-05-05
This is probabbly a really simple question.  I have created blank application.  On this I've added a context menu.  I added a few menu choices to this.

Can someone explain how I navigate to different areas of the application.  For example say if the opening form would have a label displaying the text "Form1". what would I need to do if I wanted to cick a button in the menu that would change the form and display a button instead ?

I'm guess I'm asking if I would need two forms ?

If this is the case is the best pratice to create a template so that if I did this and then changed the orginal design all the other forms I've created would automatically update ?

Thanks.
0
Comment
Question by:andyw27
  • 2
7 Comments
 
LVL 7

Expert Comment

by:foobarr
ID: 16906620
In your menu click event you would put your code that you want to happen

so if you want something to happen when you press a button you put it in the button click event.  If you want it to happen when you click on the menu put it in the menu click event.  There are more events then just clicking VS lists a whole bunch of em


You don't necessarily need two forms you coupld simply just hide the label and make the button visible


in the menu click

label1.visible = false
button1.visible = true


if you want to change to a new form you can go
frmOld.hide()
frmNew.show()

and in the design of the frmNew have your button added to it

0
 

Author Comment

by:andyw27
ID: 16906699

Okay thanks.  I tried the code you suggested however I get a name not declared error ?
0
 
LVL 62

Accepted Solution

by:
Fernando Soto earned 500 total points
ID: 16906775
Hi andyw27;

You need to have created the Button or Form before you can use the Visible = True or False or created the Form before you can Hide or Shoe.

Fernando
0
 
LVL 62

Expert Comment

by:Fernando Soto
ID: 17072978
Hi Bob;

I would like to see a resolution to this question seeming that the help that foobarr and myself gave andyw27 must have solve the issue seeming no more questions.

Thanke;

Fernando
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question