473,395 Members | 1,386 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Opening/Closing(Hiding) Forms

Hi,
I am writing a Jeopardy-like game that contains three
forms. One is the Jeopardy board, another is the
Question/Answer displayer, and the last is the
scoreboard. I need to find a way to open the scoreboard
as hidden when the program starts. This is because the
scoreboard must constantly keep score, even when it is
not in use. I cannot seem to cause my program to access
the scoreboard from my question/answer displayer, which
is supposed to open it. I also do not know how to hide
or close the forms when I am not using them. I am
relatively new, so I do not have much expertise in these
simple areas.

-Thanks
Nov 15 '05 #1
2 4466
Hello

May I suggest that you do something a little different. Consider putting
all of the information on a single form. Ask the questions in one part of
the form, keep score in another. If you are as new as you appear to be, you
will be better off avoiding the complexity.

Now, to answer your original question:

if your score form is called "ScoreForm" then simply code:
ScoreForm.Hide;
in your main form code (assuming you created the ScoreForm from the main
form).
Good luck.
--- Nick

"Guest" <an*******@discussions.microsoft.com> wrote in message
news:08****************************@phx.gbl...
Hi,
I am writing a Jeopardy-like game that contains three
forms. One is the Jeopardy board, another is the
Question/Answer displayer, and the last is the
scoreboard. I need to find a way to open the scoreboard
as hidden when the program starts. This is because the
scoreboard must constantly keep score, even when it is
not in use. I cannot seem to cause my program to access
the scoreboard from my question/answer displayer, which
is supposed to open it. I also do not know how to hide
or close the forms when I am not using them. I am
relatively new, so I do not have much expertise in these
simple areas.

-Thanks

Nov 15 '05 #2
You show or hide a form by calling it's Show() and Hide() and close it
with Close();

Another way to show scoreboard only when needed is to keep track of the
score in your question/answer class. When you need to show the score you
create a new scoreboard and pass the current score as a parameter. Then
use Show/ShowDialog on it.

public class Parent
{
int score;

private void ShowScore()
{
ScoreBoard sb = new ScoreBoard(score);
sb.ShowDialog(); // score.Show(); will open the scoreboard as modeless
instead
}
}

Or you could create it once and save the reference to sb, and then call
sb.Show()/sb.Hide() when you need it.
--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Alasdair | last post by:
Friends, I'm an old C programmer who upgraded to C++ but was never comfortable with it. I've recently moved to C# and love it but I obviously am missing some of the subtleties. I thought the...
2
by: Keith | last post by:
Moving from form to form seems straight forward - but how would one go about closing a form FROM another form? I use me.close - to close out a form and the following to open ("jump to") a new...
9
by: G .Net | last post by:
Hi I'm wondering if anybody can help me with the following problem. Suppose I have 3 forms: A, B and C. Pressing a button on form A, shows (using ShowDialog) form B. Pressing a button on...
3
by: Arne Beruldsen | last post by:
The migration from VB6 is anything but easy. Ok...I have an introductory form (start-up is via sub main) and then several succeeding forms which gather some info. As soon as the info is gathered...
1
by: robertmeyer1 | last post by:
Hey, I am having a problem with opening some forms. I have several forms. The forms are based off the same table, tblClient. Each form has a sbf inserted into it. These sbf’s are each based...
2
by: John | last post by:
Hi I have a number of forms which open like this; Dim frm1 As frmForm1 = New frmForm1 Dim frm2 As frmForm2 = New frmForm2 Dim frm3 As frmForm3 = New frmForm3 Dim frm4 As frmForm4 = New...
21
by: Dan Tallent | last post by:
In my application I have a form (Customer) that I want to be able to open multiple copies at once. Within this form I have other forms that can be opened. Example: ZipCode. When the user enters...
2
by: =?Utf-8?B?RXRoYW4gU3RyYXVzcw==?= | last post by:
I am (still) relatively new to Windows applications, most of my experience has been Web based, and I am confused about what exactly happens when the Main() method is called and how to manipulate...
13
by: SvenV | last post by:
Hello, Currently I'm developing an application for a Windows CE 4.0 device. This application contains a lot of different forms. The application jumps from one form to another. And I close the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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...
0
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
Oralloy
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.