Solved

Windows Form

Posted on 2006-06-14
7
249 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 63

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 63

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

726 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