473,411 Members | 2,013 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,411 software developers and data experts.

When use click Options on menustrip its opening new form over and over again:

Its not working.

Its working on the program where the user click on the menu Options since for now its only showing na empty new form window.

So when i click on Options its showing the new form when i close the form and click on Options again its showing fhr new form again.

Thats ok.



But on my other program on the new form im creating an graph.

so im not only show(); the new form but also im create(); the graph:

private void Show_satistics_CheckedChanged(object sender, EventArgs e)
{
if (Show_satistics.Checked)
{
if (statform == null || statform.IsDisposed)
{
statform = new StatisticForm();
statform.Show();
statform.CreateGraph();
}
else
{
statform.Show();
}

}

So the problem here is the line : statform.CreateGraph();

Since there is a new instance there so each time im checking the box unchecking and checking again its not opening a new window of the new form but its updating the graph inside the new form over and over again. Since its making the statform.CreateGraph(); so itsl ike creating many graphs in the new form.



Any idea how to solve the problem with the statform.CreateGraph(); ? I solved the problem with the statform.Show(); but now the other problem.



Thanks for help.
Aug 29 '10 #1
1 1367
Solved it. Thanks for the help anyway.
Aug 29 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: John | last post by:
Hi Is there a way to open a form hidden/invisible while it is populating its controls, and then make it visible once it is done? I am using the following code but the form remains visible. ...
12
by: insomniux | last post by:
Hi, In my database (access 2000) everything is done within the main form ("OpenForm"). It has a timer which triggers the code below. It first closes all reports and forms. Then it reopens the main...
0
by: Andrew | last post by:
In the Component I am developing I need to know when the IDE has finished loading the form at design time. Is there an event I can receive to know when the IDE has finished opening the form at...
1
by: Bob Alston | last post by:
Really wierd problem opening a form with selection. I use this code on a button: On Error GoTo Err_Command8_Click Dim stDocName As String Dim stLinkCriteria As String stDocName =...
2
by: Jpipher | last post by:
Let me explain what I am trying to accomplish... Two forms -- we'll call them "Main" and "Related" A command button on "Main" runs a union query. The union query results are shown in "Related"...
42
by: smiler2505 | last post by:
I have a situation where there may be no table for a form; on error, the table is rebuilt and all is good; except to open the form, I have to click the form again. I tried DoCmd.OpenForm...
0
by: oded55 | last post by:
Hi, I'd like to be able to change the right click options i am getting regardless of what is the application running, right click today has the followiing options Restore, Move size etc.... ...
2
DonRayner
by: DonRayner | last post by:
This one has me stumped. I'm getting a "Type Mismatch" error on one of my forms when it's being opened. It's hapening before the forms "On Open" event, I stuck a msgbox in there to check and I'm...
1
!NoItAll
by: !NoItAll | last post by:
I have a small project that may be a big one - I'm really not sure. I want to add some right-click options in windows to certain file types. I don't want to change the default program for these...
1
by: munkee | last post by:
I have a sub form within my main form which displays all records from a table in an overviewed format. Within the design view in the sub form I added a "View full record" button. When you click this...
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: 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
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...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.