Hi guys,
How do you resize a form in VB. Basically when user drag the form to minimise or maximise, it will resize all the components inside the form.
thanks
3 2320
How do you resize a form in VB. Basically when user drag the form to minimise or maximise, it will resize all the components inside the form.
Probably depends on what version of VB you are using. But generally, the same way you set the size at any other time - by adjusting the Top/Left/Width/Height properties, using the .Move method, or whatever. It's up to you to decide where you want them.
You might also try searching TheScripts for the terms VB and ELASTIC together. There is a class of controls known as "elastic" controls which help to automate this kind of thing.
nev 251
Contributor
public cw as integer = control.width
control.width = form.width - cw
same goes to height
QVeen72 1,445
Recognized Expert Top Contributor
Hi,
Re-sizing the Controls inside the Form, is not a very good Idea. as When you Decrease/Increase the Size of Cotrols, Correspondingly , the Font Size should also decrease/Increase, this may give your form a Clums- Cluttered Look. May be you can just make the Form with fixed set of say 3-4 sizes, and allow users to choose from them.
Regards
Veena
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Kevin Myers |
last post by:
Hello folks,
I am an experienced developer with other languages and applications, but a
neophyte when it comes to MS Access forms. Can someone please help get me
with a solution for the following issue: On a form, I have an object
(ImgEdit control from MS Imaging) that needs to automatically grow and
shrink when a user resizes the form. The object *does not* need to grow and
shrink based on the size of the image that is being...
|
by: Kalvin |
last post by:
I am using a nested table to control different elements of my layout.
The problem I have is that I create the outer table and set the size
properties to what I want them to be, then, if I put another table
into the first cell, when I resize that nested table, it automatically
resizes the other cells also. If I do the same type of thing in
Dreamweaver, this doesn't happen. Is there a setting of some sort in
..NET that I can turn off to...
|
by: Rob Richardson |
last post by:
Greetings!
I have a form with a listview, a menu, and a few text boxes, labels and
command buttons. I want to resize the listview when the form is resized to
that the widths of the spaces between the borders of the listview and the
borders of the form remain constant. I am finding this to be unexpectedly
hard. For one thing, I initialized some values in the form's Load event,
and I'm doing the control resizing in the form's Resize...
|
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 any feasible solution, i need to use a checked listbox
which also has same flickering problem on resize.
Thanks & Regards
|
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 MouseMove,
the form is resized around a 30-100 times in one second. This leads to
a high CPU utilization and all other application comes to a stand
still.
The form does not have any controls i.e. buttons, text boxes etc. It is
completely...
| |
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 under
form1.resize_click
Works when I resize the form and also when I include a call to resize under
form load event
Is this due to vs2005, vista or some other querk?
|
by: Doc John |
last post by:
Assuming I have several child Forms open (not maximized) in my MDI Form,
when I maximize any of them and then close it, all my other Forms
automatically maximize. How come?
Is there an easy solution for this?
Thanks.
VS2005 - Windows Forms
|
by: zacks |
last post by:
I am developing an application in VS2005. I have a form that has a
PictureBox control whose purpose is to be able to plop a User Control
in it. And the User Control can be one of several possible User
Controls and these User Controls are all different in size, some
larger that the picture box it will be added to.
How do I get the form to resize when I add a User Control to the
picture box control when the User Control is larger than the...
|
by: joedalton101 |
last post by:
Is there some piece of code that will make subforms resize automatically according to the amount of records displayed?
For example my main form just contains artist names. Subform1 contains albums. Some artists have 2 albums, some have 20. It looks stupid to have a subform resized manually and made huge when it is only filled up with records sometimes, depending on who is selected in the main form.
Thanks
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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 we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |