A problem with the 'Multiple Document Interface' ??

C

Csharper95

I am currently working on completing a program that someone else
started.

The problem (when the program is running): When more than one
document/file is opened, the mouse changes the active window simply
by moving it (the mouse pointer) over the work area (not the title
bar) of one of the open windows. When of course, it's supposed to
activate when there is a mouse click on the inactive window.

In the Program:

There is a MainForm, which is the Form that one sees when the program
is started and when all the open documents are closed.

and a ProForm, which is the form that is called when a document is
opened (this Form is similar to MainForm, except that it has
additional functions like 'Close', 'Edit Data'..etc).

So, if no document is opened, it's MainForm, if 1 or more is open,
then it's the ProForm.

Now, the Mainform IsMdiContainer = true while the Proform
IsMdiContainer = flase. otherwise an exception is thrown.

Here is a bit of code:

class MainForm
{
...........
private void OpenProfile()
{
string pathName = null;
if(OpenG16File(out pathName) == true)
{
//create form
ProForm proForm = new ProForm();
proForm.MdiParent = this;
proForm.Text = pathName;
.....
proForm.Show();
}
........
}
........
}


I know this is rather vague but did any of this happen to anyone else
before ? Does this have to do with the MDI or perhaps Mouse events?

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
 
U

uebercoder

Check that the previous programmer has not intercepted the MouseEnter or
MouseMove events of the form. (somewhere in the ProForm class might be
something like

MouseEnter += new EventHandler(myMouseEnter);

or similar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top