473,387 Members | 1,540 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,387 software developers and data experts.

Activating Windows Forms

Hi,

Let me see if I can explain this, I have noticed that when I create new
windows forms (within my larger window form which serves as the primary
interface with dropdown menus etc) that sometimes you can activate more
than one window at once if you click back and forth enough. Normally I
wouldn't care but it actually causes me huge problems down the line
because when I try to get the ActiveMdiChild.ActiveControl it could be
either of the two forms which are active. My code assumes that this
can not happen so a whole bunch of things break.

Is there a way to make sure that all the other windows get disactivated
when one is activated?

Any suggestions? Thank you!

Joy

Feb 16 '06 #1
2 1126
You just have to verify which form is actually active prior to doing
anything with it. This is the envrionment in which you program. Your
code's assumption is wrong - never assume anything!

Tom

si***********@yahoo.com wrote:
Hi,

Let me see if I can explain this, I have noticed that when I create new
windows forms (within my larger window form which serves as the primary
interface with dropdown menus etc) that sometimes you can activate more
than one window at once if you click back and forth enough. Normally I
wouldn't care but it actually causes me huge problems down the line
because when I try to get the ActiveMdiChild.ActiveControl it could be
either of the two forms which are active. My code assumes that this
can not happen so a whole bunch of things break.

Is there a way to make sure that all the other windows get disactivated
when one is activated?

Any suggestions? Thank you!

Joy

Feb 17 '06 #2
No I do check to make sure the form is active before doing anything -
the problem is there are two forms active at one time.

Feb 17 '06 #3

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

Similar topics

1
by: Ole Kramer, SFS GmbH | last post by:
We have installed PHP 5.0.1 on a Windows 2003 Server with IIS6 in ISAPI mode. The processing of .php files works fine with our basis version of the php.ini file. But, as soon as we edit the php.ini...
1
by: Jeppe 1971 | last post by:
Hi Does anyone know of a way to load a HTML-page and examine the document without activating the code? I am trying to create a search-function in javascript. The idea is that the function...
1
by: Scott Davies | last post by:
Hi, I'm looking for some help on a small program that I'm trying to develop in VB.NET. I'm having trouble getting the code that I've written to work, can anyone shed some light as to where I'm...
0
by: Scott Davies | last post by:
Hi, I'm looking for some help on a small program that I'm trying to develop in VB.NET. The program I'm trying to develop needs to be able to do the following: - Select remote server -...
4
by: Rod Gill | last post by:
Hi, I have a form that when opened in the designer appears of the screen. The form selector can't be dragged (or resized) and if I scroll right and down to centralise it the form simply jumps...
1
by: mfunkmann | last post by:
Hi, I recently got an error and I don't know how to fix it: Error 1 'System.Data.DataColumn' does not contain a definition for 'Windows' C:\c#\CsharpPRO\Form1.Designer.cs 304 77 CsharpPRO I...
3
by: Diego F. | last post by:
Hello. I have a multi threaded application (I use threadpool). The main thread has some timers. In some circumstances, I need to activate one of these timers from other thread. I activate the...
2
by: =?Utf-8?B?TWlja3lQ?= | last post by:
Ok, so I have a HP xw4200 with a valid XP Pro registration key, in fact it came on it already installed. I then bought a second-hand computer that needed Wnidows installed on, but that also had...
2
by: george | last post by:
I'm have a little trouble understanding how to do this, but what i wanna do is have it so when the user clicks on an item in the menustrip, it activates the column click event in a listview that i...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
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...
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
marktang
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,...
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
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...

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.