Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Windows Form

Posted on 2006-06-14
7
Medium Priority
?
251 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 64

Accepted Solution

by:
Fernando Soto earned 2000 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 64

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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

688 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