473,513 Members | 2,454 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Lost focus on form Resize event

Hi all,

I have an MDI form in which i open some other forms.

I dont want the Control Box (having minimize, restore/maximize and
close button)
Even though I have set the controlbox property of my child forms as
false & the respective minimize & maximize box property to false, i get
the control box with restore button as enabled (when i dock my child
form in the MDI form with dockstyle as fill) which restores the
position on my child form which i need always in maximized state.

So in order to prevent the rerstoring of the window, in the form's
resize event i have written the following code:

this.WindowState = FormWindowState.Maximized;
this.ControlBox = false;

Due to this the control box doesnt appear :-)
But now the focus has shifted from my application to somewhere else.
i.e the title bar of my application is not highlited.
If i click anywhere in my application it becomes highlited.

If i remove the code from the resize event the focus remains on the
tittle bar but the control box re-appears.

Kindly Help !!!!

Warm Regards
Sumit

Nov 17 '05 #1
1 2889
Have you had a look at the form property 'FormBorderStyle'. It has several
options and there are several that won't display a minimize,
maximize\restore buttons.

HTH

Ollie Riches

"Sumit" <vo********@gmail.com> wrote in message
news:11*********************@g47g2000cwa.googlegro ups.com...
Hi all,

I have an MDI form in which i open some other forms.

I dont want the Control Box (having minimize, restore/maximize and
close button)
Even though I have set the controlbox property of my child forms as
false & the respective minimize & maximize box property to false, i get
the control box with restore button as enabled (when i dock my child
form in the MDI form with dockstyle as fill) which restores the
position on my child form which i need always in maximized state.

So in order to prevent the rerstoring of the window, in the form's
resize event i have written the following code:

this.WindowState = FormWindowState.Maximized;
this.ControlBox = false;

Due to this the control box doesnt appear :-)
But now the focus has shifted from my application to somewhere else.
i.e the title bar of my application is not highlited.
If i click anywhere in my application it becomes highlited.

If i remove the code from the resize event the focus remains on the
tittle bar but the control box re-appears.

Kindly Help !!!!

Warm Regards
Sumit

Nov 17 '05 #2

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

Similar topics

6
28450
by: Patrick De Ridder | last post by:
How do I connect to an event being thrown when a field has lost focus? Could you please give a code example? -- Patrick De Ridder ngmail@freeler.nl
0
1133
by: pinocchio | last post by:
Hello, in my application I need manual resize a form. I used following algirthm: 1) On event MouseDown I get mouse position 2) On event MouseMove I get new mouse position and resize form in two...
0
1084
by: henrycortezwu | last post by:
Hi, I would like to inquire on how to make an event that will simulate the browser loosing focus, or the browser deactivate or inactive state event. Like in Windows Form, there are several events...
3
3819
by: Tom | last post by:
I have a VB .NET application that has a text box with the following code to handle the leave event. Private Sub txtIDiscountRate_TextChanged(ByVal sender As System.Object, ByVal e As...
6
2412
by: Ellis Yu | last post by:
Hi all, I've a form containing some textbox fields. I wrote a simple code to check if the field is blank in lost focus event, an msg box will be shown to remind user about it. But don't why the...
0
1695
by: Nick | last post by:
I have a situation wherein i have a text box, that has abc() being executed whenever the lost focus event is triggered. However, there is an exceptional case where, if a button click causes the...
1
4732
by: ravikumar2007 | last post by:
I am working with .NET 3.5 framework within an WPF application. I have a windows application where for a textbox, I have defined the lost focus event. I need to call the Focus() method of any other...
3
2653
by: =?Utf-8?B?SmVzc2U=?= | last post by:
I have searched and searched, with no luck. I have a Form that has several event listeners in it (Keypresses, speech recognition, afew others). When I click a component in the form (such as a...
1
4346
by: BrenB | last post by:
I'm trying to trap for an event in my user control so that I can manage the state of the user interface. The control is used to enter data into a database. The control contains a tab control...
0
7259
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
7158
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
7380
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,...
1
7098
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
7523
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...
0
4745
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
3232
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...
1
798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
455
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.