473,473 Members | 1,510 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

two forms

I am working on an app(C#) with two forms A and B. form A is the main
form and form B is created in A's constructor. when I minimize both of
them. they all shown on taskbar as A and B. my problem is when I click
B, A is always maximized. but I want click B and B maximized. click A
and A maximized.

Is there a good way to correct my problem? thanks

Sep 20 '06 #1
6 1572
Show your code.

Are you using B.Show() or B.ShowDialog() ?
Try Show()

Sep 20 '06 #2
Steven,

Are you sure of that, is it not to use ShowDialog with in that form the
property ShowInTaskbar set to false

http://windowssdk.msdn.microsoft.com...intaskbar.aspx

Cor

"Steven Nagy" <le*********@hotmail.comschreef in bericht
news:11**********************@e3g2000cwe.googlegro ups.com...
Show your code.

Are you using B.Show() or B.ShowDialog() ?
Try Show()

Sep 20 '06 #3
Hi Cor,

I'm not quite sure what the question is you are asking.
And I am not quite sure what the relevance of "ShowInTaskbar" is to the
OP's question.
The OP asked about why A gets maximised when B is clicked on from the
task bar.
To my knowledge they do not want to hide/show items on the taskbar.

I apologise if I have misunderstood anything about the posts from
yourself or the OP.

Regards,
Steven
Are you sure of that, is it not to use ShowDialog with in that form the
property ShowInTaskbar set to false

http://windowssdk.msdn.microsoft.com...intaskbar.aspx
Sep 20 '06 #4
Steven,

I am as well not sure from the question from the OP therefore I directed it
too you, sorry for any confusing from my side.

Cor

"Steven Nagy" <le*********@hotmail.comschreef in bericht
news:11**********************@e3g2000cwe.googlegro ups.com...
Hi Cor,

I'm not quite sure what the question is you are asking.
And I am not quite sure what the relevance of "ShowInTaskbar" is to the
OP's question.
The OP asked about why A gets maximised when B is clicked on from the
task bar.
To my knowledge they do not want to hide/show items on the taskbar.

I apologise if I have misunderstood anything about the posts from
yourself or the OP.

Regards,
Steven
>Are you sure of that, is it not to use ShowDialog with in that form the
property ShowInTaskbar set to false

http://windowssdk.msdn.microsoft.com...intaskbar.aspx

Sep 20 '06 #5

Stormy のメッセージ:
I am working on an app(C#) with two forms A and B. form A is the main
form and form B is created in A's constructor. when I minimize both of
them. they all shown on taskbar as A and B. my problem is when I click
B, A is always maximized. but I want click B and B maximized. click A
and A maximized.

Is there a good way to correct my problem? thanks
Properties of win form state can be maximized when the Click on form is
detected ?

Sep 20 '06 #6
Thank you very much for the reply.

Here is my code: Form A's maximize property set as true, and B's
minimize property set as true. I create a button on each of the form,
when you click it, its form will be minimized and another form will be
maximized.
I use B.WindowState = FormWindowState.Maximized;

public class A : System.Windows.Forms.Form
{

//FormB derived from System.Windows.Forms.Form
private FormB B;

public A()
{
B= new FormB();
B.Owner = this;
B.Show();
}
}

Here is my new found.
1 . if I enable maximize button of both forms. when I minimize both
of them and click A on taskbar(not notifyicon), the B form will be pop
up.
2. if I disable maximize button of both forms, when I minimize both
of them. some time only A displayed on taskbar, if I click it, B will
pop up. sometime they both displayed on taskbar, click one of them and
it will pop up right form.

Sep 20 '06 #7

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

Similar topics

19
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate...
3
by: Joshua Russell | last post by:
Hi, Both the methods below open up a windows form called MasterForm. However, one works better than the other. Method 1 opens the form correctly but I don't have any reference to the instance of...
7
by: Mike Bulava | last post by:
I have created a base form that I plan to use throughout my application let call the form form1. I have Built the project then add another form that inherits from form1, I add a few panel controls...
13
by: MD | last post by:
I have been converting a program from VB6 to VB.Net and enhancing it as well. All has been progressing OK although its been hard work. Now, all of a sudden, when I try to execute a ShowDialog()...
15
by: Joshua Kendall | last post by:
I have a script in which it keeps opening the same form instead of only one instance. I also need help with a form that has a password. Where do I put the actual password? can I use a database for...
3
by: Lloyd Sheen | last post by:
I have the following situation: Need a user resizable user control. After much trying with user control I came across the idea of hosting the controls in a form marked as not TopLevel = false. ...
8
by: Stephen Rice | last post by:
Hi, I have a periodic problem which I am having a real time trying to sort. Background: An MDI VB app with a DB on SQL 2000. I have wrapped all the DB access into an object which spawns a...
3
by: Geraldine Hobley | last post by:
Hello, In my project I am inheriting several forms. However when I inherit from a form and add additional subroutines and methods to my inherited form I get all sorts of problems. e.g. I sometimes...
6
by: dbuchanan | last post by:
I have a Windows Forms application that accesses SQL Server 2k from a small local network. The application has been used for weeks on other systmes but a new install on a new machine retruns...
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...
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
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...
1
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...
1
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.