I probably should know how to do this, but I don't. I need to make a program that uses multiple forms. Say that I have FormA, that opens when you compile, and when you push button1, it closes FormA and opens FormB.
8 2286
I probably should know how to do this, but I don't. I need to make a program that uses multiple forms. Say that I have FormA, that opens when you compile, and when you push button1, it closes FormA and opens FormB.
Forms have a close method, and a show method. Should be pretty apparent how to use them in your handler.
Forms have a close method, and a show method. Should be pretty apparent how to use them in your handler.
Could you post an example?
I tried that, but the output sais that FormB is an undeclared identifier. Is there some sort of declaration that I need, or am I doing is wrong?
I tried that, but the output sais that FormB is an undeclared identifier. Is there some sort of declaration that I need, or am I doing is wrong?
No. Use formB's Show method, not the current instance's. -
FormB ^ MyFormB = gcnew FormB;
-
MyFormB->Show();
-
this->Close();
-
No. Use formB's Show method, not the current instance's. -
FormB ^ MyFormB = gcnew FormB;
-
MyFormB->Show();
-
this->Close();
-
Thanks, but when I am editing FormA, it wont work when I try to make it open FormB. Is there some other type of declaration, or something I need to do to FormB? They are both in the same project.
Thanks, but when I am editing FormA, it wont work when I try to make it open FormB. Is there some other type of declaration, or something I need to do to FormB? They are both in the same project.
Could you be a bit more specific? Does it not compile? Does it run, but not the way you thought it would?
It doesnt compile, and the error says FormB: undeclared identifier.
It doesnt compile, and the error says FormB: undeclared identifier.
Did you declare your "FormB" object like I did? I confirmed that the way I declared the form works. Something tells me that either the way you declared it wasn't correct, or else it's out of scope by the time you try to use it's method. You should be placing the code I gave you in the event method of FormA which will open FormB.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: epigram |
last post by:
I'm creating a series of web pages that I will display sequentially in IE 6
(for an internal application). I'd like to have nice transitions between
them. The only thing I have found thus far are...
|
by: Harshal |
last post by:
Hello,
I have following html file
<html>
<head>
<script>
var flag = true;
function LoadNewImage()
|
by: Stu |
last post by:
Hi, I've been looking through the archives but can't find what I'm
looking for, or due to my limited experience with Access97, didn't
recognize it...
I've created a database that is going to be...
|
by: Bern McCarty |
last post by:
Our project consists of some mixed .dlls and recently we noticed that it had slowed down. When I
investigated I figured out that some inlineable methods of a native C++ type were compiled into (not...
|
by: Dan |
last post by:
Hi,
I was wondering if anyone could come up with a cross browser image
transition that I could use... I have already made one that works in IE
but i know it doesn't work in Mozilla Firefox.
...
|
by: cb.brite |
last post by:
Hello,
I have tried this using the MouseEnter/MouseLeave events. However these
events do not really refer to the rectangular shape of the form, but
the client area (form area minus children...
|
by: =?Utf-8?B?R3JlZ29yeU5lbHNvbg==?= |
last post by:
How do I get the beatuful Plus! Movie Maker transitions that I had on XP to
work with Vista version of Movie Maker. I'd hate to think I lost a product I
invested in beacuse I actually upgraded my...
|
by: Inny |
last post by:
Hello, Im using the background image change script below and I want to change each image with a transition, swipe, circle in, circleout etc randomly.
Not sure how to make random transitions with...
|
by: Warrick Wilson |
last post by:
I'm new to C# and I'm trying to get some "toy" programs running to get
familliar with it. So I want to make a slideshow program that will display
one image after another, and have some sort of...
|
by: Ebucel |
last post by:
I need to create a screensaver that detects the resolution of one or 2 monitors and then selects the correct picture for that resolution and then uses transitions to make it like a slideshow with...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |