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

Restricting Control Height

I have seen some controls that disable the height option at design time, you
cannot drag and change it's height how can this be done?

Thanks
Nov 20 '05 #1
3 931
override the OnResize event and set the height in it that will disable it in
a simple way.

"T Cordon" <tc******@hotmail.com> wrote in message
news:ux**************@TK2MSFTNGP09.phx.gbl...
I have seen some controls that disable the height option at design time, you cannot drag and change it's height how can this be done?

Thanks

Nov 20 '05 #2
Thanks. I did that but the control flickers when resized. I wish to find a
way to totally disable the option for the developer to resize it at design
time dragging from the top or bottom.

Thanks

"Brian Henry" <br**********@newsgroups.nospam> wrote in message
news:Ou**************@TK2MSFTNGP09.phx.gbl...
override the OnResize event and set the height in it that will disable it in a simple way.

"T Cordon" <tc******@hotmail.com> wrote in message
news:ux**************@TK2MSFTNGP09.phx.gbl...
I have seen some controls that disable the height option at design time,

you
cannot drag and change it's height how can this be done?

Thanks


Nov 20 '05 #3
Try overriding the WndProc and trap the WM_SIZING message. Also to prevent
flickering of your control, add this in your Sub New:

Me.SetStyle(ControlStyles.DoubleBuffer, True)
Me.SetStyle(ControlStyles.ResizeRedraw, True)
Me.SetStyle(ControlStyles.AllPaintingInWmPaint, True)
Me.SetStyle(ControlStyles.UserPaint, True)
Me.UpdateStyles()

"T Cordon" <tc******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Thanks. I did that but the control flickers when resized. I wish to find a
way to totally disable the option for the developer to resize it at design
time dragging from the top or bottom.

Thanks

"Brian Henry" <br**********@newsgroups.nospam> wrote in message
news:Ou**************@TK2MSFTNGP09.phx.gbl...
override the OnResize event and set the height in it that will disable it
in
a simple way.

"T Cordon" <tc******@hotmail.com> wrote in message
news:ux**************@TK2MSFTNGP09.phx.gbl...
I have seen some controls that disable the height option at design

time, you
cannot drag and change it's height how can this be done?

Thanks



Nov 20 '05 #4

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

Similar topics

6
by: Bruce Rusk | last post by:
I'm using Stephen Lebans' RTF2 control in a report, and have discovered what may be a slight bug in it. I have a lot of non-Western language (Chinese) text in my RTF field, and such records get...
0
by: Chris Millar | last post by:
I have a user control that i wish to extend to change the date when the user selects the numeric up down button. The code explains itself, hope someone can help. any ideas appreaciated.. ...
11
by: trinitypete | last post by:
Hi all, I have a user control that uses control literal to build a heading with a link, and a div containing links below. As the link heading is hit, I want to change the style of the div,...
5
by: Eric | last post by:
Given System.Web.UI.Control Control Can I determine the height of Control without knowing specifically what it is?
1
by: Tebogo Tefo via .NET 247 | last post by:
Hi I have a user control that contains three dropdownlists that I populate according to what was selected in the other dropdownlist (i.e. populate dropdownlist2 after selecting a value in...
1
by: ratnakarp | last post by:
Hi, I have a search text box. The user enters the value in the text box and click on enter button. In code behind on button click i'm writing the code to get the values from the database and...
0
by: Brian Henry | last post by:
Ok I've never implemented a snap location before so I dont really know what im doing wrong here... anyways, I am making a custom slider control that takes dates as its values instead of integers......
1
by: John | last post by:
Hi I am doing a report to print invoices on pre-printed laser invoice forms. The invoices can go on more than one page potentially depending on the amount of details. On my report the detail...
9
by: Nathan Sokalski | last post by:
I am using ASP.NET 2.0's ImageMap Control to create 2 imagemaps, one directly below the other. When I do this a thin blank space appears between them. After several days of frustration I realized...
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: 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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.