Hello,
Ive got a form with 3 textboxes - one under the other. When I set the anchor
to top, left, right, and bottom for each of them and resize the form at
runtime, they change size in relation to the bottom of the form. This means
the textbox on top stretches underneath the textbox below it... if you get
my drift.
Is there a webpage or something that shows how to correctly set up a form to
maximise? Can it be set through the IDE? I cant get the damn thing to resize
properly.
Thankd for any help. 8 7115
Hi Grant,
Don't know of any web pages, but you might want to put groups of controls in panels, and have the panels resize based on form change, and have the controls resize based on panel change.
--
Happy coding!
Morten Wennevik [C# MVP]
Grant,
I usually create a TestForm in design mode, and will place controls and set
achor as well as other properties. Then i will copy paste the generated code
inside "InitializeComp onent".
Shak.
"Grant" <gp*****@hotmai l.com> wrote in message
news:ut******** ******@TK2MSFTN GP11.phx.gbl... Hello,
Ive got a form with 3 textboxes - one under the other. When I set the
anchor to top, left, right, and bottom for each of them and resize the form at runtime, they change size in relation to the bottom of the form. This
means the textbox on top stretches underneath the textbox below it... if you get my drift.
Is there a webpage or something that shows how to correctly set up a form
to maximise? Can it be set through the IDE? I cant get the damn thing to
resize properly.
Thankd for any help.
kewl so what are those other properties that you set? If I have two text
boxes on my form and set the top textbox anchor to left, right and top - and
the bottom text box anchor to bottom, left, right - they get this big gap in
the middle when the form maximises. How do I get it so the two text boxes
look proportinally the same size no matter what size the form?
Thanks for your suggestions. sorry for my slow uptake.
"Shakir Hussain" <sh**@nodomain. com> wrote in message
news:OW******** ******@tk2msftn gp13.phx.gbl... Grant,
I usually create a TestForm in design mode, and will place controls and set achor as well as other properties. Then i will copy paste the generated code inside "InitializeComp onent".
Shak.
"Grant" <gp*****@hotmai l.com> wrote in message news:ut******** ******@TK2MSFTN GP11.phx.gbl... Hello,
Ive got a form with 3 textboxes - one under the other. When I set the anchor to top, left, right, and bottom for each of them and resize the form at runtime, they change size in relation to the bottom of the form. This means the textbox on top stretches underneath the textbox below it... if you get my drift.
Is there a webpage or something that shows how to correctly set up a form to maximise? Can it be set through the IDE? I cant get the damn thing to resize properly.
Thankd for any help.
Ok...
textbox1, textbox2, textbox3 must have the same anchor properties
left,top,right. Place textbox1, textbox2 and textbox3 one under other.
Add textbox3.width = textbox2.width = textbox1.width, during form load.
Now if you maximize the form....both will perfectly align, with same width
and no gaps.
Shak.
"Grant" <gp*****@hotmai l.com> wrote in message
news:ut******** *****@TK2MSFTNG P09.phx.gbl... kewl so what are those other properties that you set? If I have two text boxes on my form and set the top textbox anchor to left, right and top -
and the bottom text box anchor to bottom, left, right - they get this big gap
in the middle when the form maximises. How do I get it so the two text boxes look proportinally the same size no matter what size the form?
Thanks for your suggestions. sorry for my slow uptake.
"Shakir Hussain" <sh**@nodomain. com> wrote in message news:OW******** ******@tk2msftn gp13.phx.gbl... Grant,
I usually create a TestForm in design mode, and will place controls and set achor as well as other properties. Then i will copy paste the generated code inside "InitializeComp onent".
Shak.
"Grant" <gp*****@hotmai l.com> wrote in message news:ut******** ******@TK2MSFTN GP11.phx.gbl... Hello,
Ive got a form with 3 textboxes - one under the other. When I set the anchor to top, left, right, and bottom for each of them and resize the form at runtime, they change size in relation to the bottom of the form. This means the textbox on top stretches underneath the textbox below it... if you get my drift.
Is there a webpage or something that shows how to correctly set up a
form to maximise? Can it be set through the IDE? I cant get the damn thing to resize properly.
Thankd for any help.
Hi Grant, Hello,
Ive got a form with 3 textboxes - one under the other. When I set the anchor to top, left, right, and bottom for each of them and resize the form at runtime, they change size in relation to the bottom of the form. This means the textbox on top stretches underneath the textbox below it... if you get my drift.
Is there a webpage or something that shows how to correctly set up a form to maximise? Can it be set through the IDE? I cant get the damn thing to resize properly.
Thankd for any help.
Did your form should look like below?
+--------+---------+
| text1 | text2 |
+--------+---------+
| text3 |
| |
+--------+---------+
If your answer is yes.... then i can propose you to set anchors:
text1.Anchor=An chorStyles.Top | AnchorStyles.Le ft;
text2.Anchor=An chorStyles.Top | AnchorStyles.Le ft | AnchorStyles.Ri ght;
text3.Anchor=An chorStyles.Top | AnchorStyles.Le ft
| AnchorStyles.Ri ght | AnchorStyles.Bo ttom;
Give me feedback if "design" vision doesn't look like yours.
Regards
Marcin
Hey Marcini - this is what my form looks like:
The poroblem is the middle textbox.
+--------+---------+
| text1 |
+--------+---------+
| text2 |
+--------+---------+
| text3 |
+--------+---------+
cheers,
Grant
"Marcin Grzębski" <mg*******@taxu ssi.no.com.spam .pl> wrote in message
news:ca******** **@nemesis.news .tpi.pl... Hi Grant,
Hello,
Ive got a form with 3 textboxes - one under the other. When I set the anchor to top, left, right, and bottom for each of them and resize the form at runtime, they change size in relation to the bottom of the form. This means the textbox on top stretches underneath the textbox below it... if you get my drift.
Is there a webpage or something that shows how to correctly set up a form to maximise? Can it be set through the IDE? I cant get the damn thing to resize properly.
Thankd for any help.
Did your form should look like below?
+--------+---------+ | text1 | text2 | +--------+---------+ | text3 | | | +--------+---------+
If your answer is yes.... then i can propose you to set anchors:
text1.Anchor=An chorStyles.Top | AnchorStyles.Le ft; text2.Anchor=An chorStyles.Top | AnchorStyles.Le ft | AnchorStyles.Ri ght; text3.Anchor=An chorStyles.Top | AnchorStyles.Le ft | AnchorStyles.Ri ght | AnchorStyles.Bo ttom;
Give me feedback if "design" vision doesn't look like yours.
Regards
Marcin
Hi Grant,
<snip> :) Hey Marcini - this is what my form looks like:
The poroblem is the middle textbox.
+--------+---------+ | text1 | +--------+---------+ | text2 |
+--------+---------+ | text3 | +--------+---------+
text1.Anchor=An chorStyles.Top | AnchorStyles.Le ft | AnchorStyles.Ri ght;
text3.Anchor=An chorStyles.Top | AnchorStyles.Le ft
| AnchorStyles.Ri ght | AnchorStyles.Bo ttom;
text2.Anchor=An chorStyles.Bott om | AnchorStyles.Le ft
| AnchorStyles.Ri ght;
Cheers!
Marcin
Hi Grant,
<snip> :) Hey Marcini - this is what my form looks like:
The poroblem is the middle textbox.
+--------+---------+ | text1 | +--------+---------+ | text2 |
+--------+---------+ | text3 | +--------+---------+
text1.Anchor=An chorStyles.Top | AnchorStyles.Le ft | AnchorStyles.Ri ght;
text2.Anchor=An chorStyles.Top | AnchorStyles.Le ft
| AnchorStyles.Ri ght | AnchorStyles.Bo ttom;
text3.Anchor=An chorStyles.Bott om | AnchorStyles.Le ft
| AnchorStyles.Ri ght;
(I replaced text2 with text3! - my fault!)
Cheers!
Marcin This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 they are too big and wind up
covering up some of the fields on the main form.
Is there any good code out there that works in a similar fashion that will
also either a) stretch the form width wise on widescreens or b), rely on
height rather than...
|
by: Terry |
last post by:
I've seen several posts from people who have seen this flashing in
TreeView's when resizing a form. I've noticed it in my app, but only in the
child windows. For example, my main form has a splitter with a TreeView and
I do not get the flickering with it.
I created a new Form based Windows app. Added a TreeView (dock left), then
a splitter and a property grid on the right (dock fill). For this test, I
added a panel and button at the...
|
by: Jaikumar |
last post by:
Hi,
1) I have created one windows application, In the main form ( form1) i have added one usercontrol (usercontrol1), In that user control i am drawing one image.
2) In the UserControl1 i am showing one transparent form (form3) when ever user preseed left mouse button.
3) The form3 has one transparent user control (usercontrol2) that paints circles. That measn the circles will show on top the usercontrol1 image.
4) The form3 border style...
|
by: Sřren Reinke |
last post by:
Hi there
I have a little problem.
How do i make sure that a graph is not redrawn while the form with the graph
is being resized ?
I have tried to add a mouse up/down event handler on the form1, but it
dosn't get called when resizing :(
I would like to be able to resize my form, but also make sure the graph is
|
by: John Bowman |
last post by:
Hi All,
I must be missing something really obvious, so I'd appreciate someone
helping me out. I have a simple Windows form that currently only has a title
bar (aka the Text Property is set) and the MinmizeBox, ControlBox and
MaximizeBox(es) are all set to false. It's FormBorderStyle is set to "Fixed
Single". Eventually this form will have a nice background image. I need to
use this form as sort of back drop while other forms/operations...
| |
by: Alex K. |
last post by:
I need to call some procedures after user resized the form.
Not while he is resizing it, but AFTER resizing is finished, i.e. user
released mouse button.
Any ideas how to do this?
Thank you
|
by: 23s |
last post by:
Is there any way I can send a vertical value to a form's scroll position?
I have a full-screen form that, at launch, contains an empty tab sheet.
At run time, the user can dynamically append a rich textbox to the tab
sheet. The rich textbox is placed at 0,0 (upper left corner) within the tab
sheet and is initially 1 "line" tall to accomodate the user's first line of
text.
The rich text box is, in actuality, a user control of mine...
|
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: JDeats |
last post by:
I have a WinForms based application written for the .NET Framework 2.0
and in this application I need to be able to be able to take some
action in code when the user finishes resizing the form.
I can easily create an event handler for the SizeChanged form level
event, the problem is if the user is using a mouse drag to resize the
form this event is firing every few milliseconds or what have you
until the user stops the drag process.
...
|
by: Peter Anthony |
last post by:
It seems kind of strange that if a Form is just moved that Resize events
fire. This makes it hard to tell the difference betweeen resizing and moving
a Form.
I can understand why resizing might also be considered a move (since the
Form's location can be thought to be based on one from Top/Bottom and one
from Left/Right, and some of these WILL change when resizing), but can't
understand why JUST moving is considered resizing. I was trying...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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: 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: 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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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: 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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |