473,401 Members | 2,127 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,401 software developers and data experts.

Form Resize

Ash
Hi,

I am just starting to switch from VB6 to VB.NET.

I am trying to resize controls on my form and recently found out that
ScaleWidth, ScaleHeight etc is no longer supported.

I have used docking with some controls and that works fine for some
but not on others.

When I use like Me.Width, some of the control is hidden under the form
borders.

Is there anything like ScaleWidth/Height that I can use?

Thanks for your help,
Ash
Nov 21 '05 #1
5 5155
The Form's ClientSize property gives you the width and height of the client
area of the form. There's also a ClientRectangle property from which the
same information can be retrieved.

Forms no longer have a ScaleMode property; the values in the ClientSize and
ClientRectangle objects are always in pixels.

Tom Dacon
Dacon Software Consulting

"Ash" <as**********@gmail.com> wrote in message
news:f8*************************@posting.google.co m...
Hi,

I am just starting to switch from VB6 to VB.NET.

I am trying to resize controls on my form and recently found out that
ScaleWidth, ScaleHeight etc is no longer supported.

I have used docking with some controls and that works fine for some
but not on others.

When I use like Me.Width, some of the control is hidden under the form
borders.

Is there anything like ScaleWidth/Height that I can use?

Thanks for your help,
Ash

Nov 21 '05 #2
Ash,

Beside the dock is the anchor, very usefull property.

With the dock property you have to take care at the Z order from adding it
to the form controls.
(from the end to the start)

(when you add controls using the designer you can see that almost at the
bottom of the designer generated code. When you do it right it gives
normally no problem when you rearange that part)

I hope this helps?

Cor

"Ash"

I am just starting to switch from VB6 to VB.NET.

I am trying to resize controls on my form and recently found out that
ScaleWidth, ScaleHeight etc is no longer supported.

I have used docking with some controls and that works fine for some
but not on others.

When I use like Me.Width, some of the control is hidden under the form
borders.

Is there anything like ScaleWidth/Height that I can use?

Thanks for your help,
Ash

Nov 21 '05 #3
Hi,
Check out the Anchor and Dock properties of the control for
resizing/docking.

"Ash" <as**********@gmail.com> wrote in message
news:f8*************************@posting.google.co m...
Hi,

I am just starting to switch from VB6 to VB.NET.

I am trying to resize controls on my form and recently found out that
ScaleWidth, ScaleHeight etc is no longer supported.

I have used docking with some controls and that works fine for some
but not on others.

When I use like Me.Width, some of the control is hidden under the form
borders.

Is there anything like ScaleWidth/Height that I can use?

Thanks for your help,
Ash
Nov 21 '05 #4
* as**********@gmail.com (Ash) scripsit:
I am just starting to switch from VB6 to VB.NET.

I am trying to resize controls on my form and recently found out that
ScaleWidth, ScaleHeight etc is no longer supported.

I have used docking with some controls and that works fine for some
but not on others.

When I use like Me.Width, some of the control is hidden under the form
borders.

Is there anything like ScaleWidth/Height that I can use?


'Me.ClientSize.Height', 'Me.ClientSize.Width'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #5
Ash
Thanks Everyone!
Nov 21 '05 #6

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

Similar topics

1
by: Roger | last post by:
Hi All, I have an app where I change the size of the form at run time using controls and I do not want the user to be able to resize the form, I have removed the min and max buttons. I have tried...
11
by: Jozef | last post by:
I have some old code that I use from the Access 95 Developers handbook. The code works very well, with the exception that it doesn't seem to recognize wide screens, and sizes tab controls so that...
1
by: Kent | last post by:
Hi, I have a form which contain 2 panels, Master and Detail, Master panel is on top and Detail panel is at the bottom. In the form, I set Detail panel to Dock to the bottom and Master panel...
0
by: Patrick Lioi | last post by:
We have form that is used as the base class of all of our forms, let's call it BaseApplicationForm. We have another form, say ChildApplicationForm that inherits from BaseApplicationForm. The...
8
by: nirdeshonline | last post by:
Hi, I have added a simple listbox in windows form under c# 2.0. It contains a collection of approx 10 strings as list items. Now when i resize the form whole listbox flickers. Please tell me...
11
by: Ajith Menon | last post by:
I have created a windows application in which the form needs to be resized on the MouseMove event. The windows resize function takes a lot of CPU cycles. And as the resize function is called on the...
2
by: Smitty | last post by:
Did a search & found nothing on this. VB6 did a resize on form load according to what I've read. I Resized screen under vista & now the text box doesn't resize to form's clientarea. Code exists...
1
by: Bob Alston | last post by:
I have a system where many subforms are used. Often the size of the subform had to be larger than could be displayed without scrolling. I set the height of the subform to the typical height...
6
by: Funky | last post by:
Hello! I have a problem. I have to change the size of a control added to a Form when the user resizes the Form. I use the Resize event and change the size of the control in the method which is...
10
by: =?Utf-8?B?UmljaA==?= | last post by:
A lot of users at my workplace use different screen resolutions, and I build apps to use 1680 x 1050 pixels res by default. But some users are using 800 x 600, and the apps are too large for their...
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: 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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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.