473,416 Members | 1,548 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.

Relocate control after Maximize form

hi
How can we run the app on full-screen. I mean all the controls such as,
pictureboxe, button on the form would also be re-located when run application at maximize window state

Currently, when I maximize the form.. controls on the form are not
relocating.
How can we do this..
Nov 12 '08 #1
6 3112
Plater
7,872 Expert 4TB
attach a handler to one(or more?) of the window size events (resize, resizebegin, resizeend, sizechanged) and recompute where the controls sit
Nov 12 '08 #2
Thanx alot Mr. Plater

is it posible to solve this problem by using .Net function

this.ScaleControl(new SizeF(15, 30), BoundsSpecified.All);
If yes please explain how can I do that.
Nov 15 '08 #3
joedeene
583 512MB
For your situation when the form is maximized, do you want the controls to get bigger also? If not, you can just use the Control.Dock Property.

joedeene
Nov 15 '08 #4
The problem was solved by using Scale function for each control with Maximize Scale Factor which calculate by divide size of form in case of maximize over size of form in case of normal .

Question is this solution need to add about a pixel or 2 for location of control,

How to can I make it accurate (without adding pixel)?


Second Question How to prevent editing of Textbox?


Last Question , when I set text at Textbox and minimize form then return to it again all text at textbox was clear. Do you know why something like this happen ?

Thanks for advance.
Nov 16 '08 #5
balabaster
797 Expert 512MB
You know, you'd think someone would have developed something that would do this by now but I've yet to come across anything useful.

I tend to use a combination of sizable panels, dockable panels and basic math to complete this task. I create a "RenderControl" method that places and sizes my controls according to the form size and then in my load and resize event handlers I call my RenderControl method.
Nov 17 '08 #6
Plater
7,872 Expert 4TB
To bala: I believe WPF or whatever their latest shebang is does it, I know I had a heck of time placing controls with it.

As for preventing textbox editing, set the ReadOnly property to true.
As to why the contents are getting lost, I would say it is something to do with how you handle your resizing.
Nov 17 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: lauren quantrell | last post by:
I have an Access 2K popup form to which I have added buttons to run DoCmd.Maximize The problem is the form opens full height on the screen, with the bottom of the form hidden under the Windows...
2
by: Sharon | last post by:
In the Form there is the Control/System menu. I wish to prevent this system menu from poping-up although the minimize, maximize and close buttons is still shown on the Form caption bar. How can...
3
by: guy | last post by:
VB2005 I have an MDI application, which displays modal forms correctly, and starts up with the MDI form maximized however for non modal forms behavious is unusual all forms have MaximizeBox,...
1
by: Kenneth Siewers Møller | last post by:
Hi there I have a custom label control (GradientLabel) which enherits from Label and basically just paints the background of a label in a gradient. In my code I have the following for the...
5
by: Mrozu | last post by:
Hi When I maximize a form in VB.Net 2003 the bottom of the form gets hidden by the start bar (so my status bar is invisible). How can I get my app to maximize to the usable screen area above...
1
by: PW | last post by:
Hi, Is it possible to make a control bigger or maximize it also when the user maximizes the form? I have a calendar control on a form and I would like to automatically make it bigger when the...
15
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt...
1
by: JDeats | last post by:
I have a WinForm with three Splitter controls on it. The form divides up in this order: Tab Control (docked to the left): Splitter1: RichTextBox (docked to the left): Splitter2 After Splliter2...
3
by: Joseph Gruber | last post by:
Hi all -- I have two questions. First, I'm adding a control to my form at runtime and the control/form seems to ignore the anchor property of the runtime control. Any idea how I can get a...
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:
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
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
jinu1996
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...
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.