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

disable double click on form caption

Hi

I have a form with minimize,maximize button=false and startup window
state= maximized but when the user double click on the form title bar
caption the form's size changes

How do i prevent that?

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #1
3 6042
tolisss wrote:
Hi

I have a form with minimize,maximize button=false and startup window
state= maximized but when the user double click on the form title bar
caption the form's size changes

How do i prevent that?


Is the goal not to allow them to resize the form at all? If so, set the
border to one of the fixed options such as fixed dialog. Then set the
StartPosition to CenterScreen. Finally in the load set the MinimumSize as
follows:

this.MinimumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width,
Screen.PrimaryScreen.WorkingArea.Height);
--
Tom Porterfield
Nov 17 '05 #2


your approach still allow the form to be change its size even if its a
small change i cannot allow it .

I need a subclassing way i suppose but i cannot find any

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #3
tolisss wrote:

your approach still allow the form to be change its size even if its a
small change i cannot allow it .

I need a subclassing way i suppose but i cannot find any


Then in load set this.MinimumSize = this.Size. Override OnResize. In your
override set this.WindowState = FormWindowState.Maximized.
--
Tom Porterfield
Nov 17 '05 #4

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

Similar topics

1
by: yair | last post by:
hey all i have a page with a table, and when the user doubleclicks a row in it, a window is opened. The problem is, if he doubleclicked a text in the row, it's becoming selected. what i want is...
3
by: snake_2k | last post by:
I need to know how to intercept and neutralize the doubleclick event that happens when someone double clicks the titlebar of a window. I borrowed some encapsulation code that keeps the user from...
5
by: sparks | last post by:
This morning I was adding some fields in a database. I double clicked on the control source field to highlight and copy the control name into the name of the control..well I have done this a...
3
by: Jeff | last post by:
I have a payment form with a submit button. A large percentage of users double-click the submit button thus submitting their payment information twice. I would like to use javascript to disable...
7
by: Pam | last post by:
When I double click on a event in a form I want it to bring up another form and load the same data so it can be edited. I'm having a hard time doing this. The new form loads;but my file can't...
4
by: Buddy Ackerman | last post by:
If I put client side code to disable a button (so that a user doesn't click it twice and double post the form) then teh button doesn't get posted with the form and the button's server-side click...
0
by: Franky | last post by:
I have a MDI form open and two child forms open in it. Each of the children contains a usercontrol which contains a richtextbox. The topmost form's caption bar is highlighted but I click on the...
2
by: richard.nigro | last post by:
When you double-click on a control in the designer window, it creates the 'default' event for that control. Is there any way to disable this functionality?
3
by: Venturini | last post by:
I am trying to put together a web page where the customer makes choices of products and is then given a total. I am extremely new to Javascript and have managed to get as far as I have from web...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
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...
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...

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.