473,466 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Full-Screen Forms question.

Hi,

How can we run the app on full-screen. I mean all the controls such as,
text boxes, data grids on the form would also be resized or re-located
automatically when we press maximize button on the top right corner
of the form.

Currently, when I maximize the form.. controls on the form are not
relocating.
How can we do this..

Cheers,

Naveen.
Nov 17 '05 #1
16 6969
Naveen Mukkelli wrote:
Hi,

How can we run the app on full-screen. I mean all the controls such as,
text boxes, data grids on the form would also be resized or re-located
automatically when we press maximize button on the top right corner
of the form.

Currently, when I maximize the form.. controls on the form are not
relocating.
How can we do this..

Cheers,

Naveen.

check out the dock and anchor properties on the controls.
JB
Nov 17 '05 #2
You have to figure out how you want them to relocate, and execute code to
change their position and/or size. (This may require an appreciable amount
of thought.) I think the event you want to handle is called OnResize.

"Naveen Mukkelli" <Na************@discussions.microsoft.com> wrote in
message news:4D**********************************@microsof t.com...
Hi,

How can we run the app on full-screen. I mean all the controls such as,
text boxes, data grids on the form would also be resized or re-located
automatically when we press maximize button on the top right corner
of the form.

Currently, when I maximize the form.. controls on the form are not
relocating.
How can we do this..

Cheers,

Naveen.

Nov 17 '05 #3
i think you must to listen to john b....

there are 2 ways, the simple or the complicated...

component one, they have a component, that calls elastic (if i remember
well) its like a table on html, and you can put % width and hights... its
really good one...

or put on your application a cuple of panels, and use the dock property, and
in the panels put your controls with dock property set to full...
salute!

"Michael A. Covington" wrote:
You have to figure out how you want them to relocate, and execute code to
change their position and/or size. (This may require an appreciable amount
of thought.) I think the event you want to handle is called OnResize.

"Naveen Mukkelli" <Na************@discussions.microsoft.com> wrote in
message news:4D**********************************@microsof t.com...
Hi,

How can we run the app on full-screen. I mean all the controls such as,
text boxes, data grids on the form would also be resized or re-located
automatically when we press maximize button on the top right corner
of the form.

Currently, when I maximize the form.. controls on the form are not
relocating.
How can we do this..

Cheers,

Naveen.


Nov 17 '05 #4


"Rothariger" wrote:
i think you must to listen to john b....

there are 2 ways, the simple or the complicated...

component one, they have a component, that calls elastic (if i remember
well) its like a table on html, and you can put % width and hights... its
really good one...


Is elastic a .net 2.0 addition? I can't find it in 1.1. In my case I had 2
group boxes with a vertical row of buttons between them. I was able to
automatically resize the contents of the gbs, but had to resort to using
OnResize to move the boxes and button stack the way I wanted (buttons
centered horizontally and fixed in size with both GBs scaling to fit the
available space on thier side)
Nov 17 '05 #5
..NET 2.0 Windows Forms comes with (I believe) layout managers like
those in Java, to allow more control over form layout. Until then, use
Panels-within-Panels, and the Anchor and Dock properties to get the
effect you want.

Nov 17 '05 #6


"Bruce Wood" wrote:
..NET 2.0 Windows Forms comes with (I believe) layout managers like
those in Java, to allow more control over form layout. Until then, use
Panels-within-Panels, and the Anchor and Dock properties to get the
effect you want.


Will doing it that way give me anything that stuffing collections of
controls I want to move together inside of groupboxes won't? I wasted
several hours trying to do what I wanted that way.
Nov 17 '05 #7
Using the current system of panels-within-panels, anchoring, and
docking, you can achieve any effect except for the _proportional_
resizing of things (which, unfortunately, is often what you want).

For example, if you have two halves to your form, and you want the
controls on one side to stay a fixed size as you resize the form and
the controls on the other to stretch with the resizing, you can do
this. If you want the two sides to both resize with the form so that
they always take up half of the form each, then you can't (without
writing custom code).

The layout manager system in .NET 2.0 will solve this problem, allowing
you to design layouts to your taste.

Nov 17 '05 #8


"Bruce Wood" wrote:
Using the current system of panels-within-panels, anchoring, and
docking, you can achieve any effect except for the _proportional_
resizing of things (which, unfortunately, is often what you want).

For example, if you have two halves to your form, and you want the
controls on one side to stay a fixed size as you resize the form and
the controls on the other to stretch with the resizing, you can do
this. If you want the two sides to both resize with the form so that
they always take up half of the form each, then you can't (without
writing custom code).

The layout manager system in .NET 2.0 will solve this problem, allowing
you to design layouts to your taste.


Cool. The proportional resizing was exactly what I needed to do. At least
now I know I didn't waste my time on something I could've done easier.
Nov 17 '05 #9
I've still managed to do this with relatively little pain.

I just put all of the controls into two panels, then overrode the
OnResize method for the form and resized the two panels to keep them
proportional. Inside those two panels I did all of the other control
resizing using anchoring and docking, and panels-within-panels.

I try to do as much work as I can using the standard .NET features,
then write that little bit of code to go the last mile.

All of this will be much easier with .NET 2.0!

Nov 17 '05 #10


"Bruce Wood" wrote:
I've still managed to do this with relatively little pain.

I just put all of the controls into two panels, then overrode the
OnResize method for the form and resized the two panels to keep them
proportional. Inside those two panels I did all of the other control
resizing using anchoring and docking, and panels-within-panels.


I did most of my work similarly using groupboxes to hold most of the
controls. I didn't think to use a panel to work with the row of buttons down
the center my boss didn't want boxed. One of the things that cost me the
most time with the onresize event was working out magic numbers for things
like border and titlebar thicknesses to compute the usable dimensions of the
dialog. The second was that if the dialog was sized small enough the buttons
needed moved closer together to all fit, but I couldn't leave them packed up
in the top part if the dialog was normal sized. A layout manager with
autospacing would've been a real lifesaver there.
Nov 17 '05 #11
Did you check out the ClientSize property of the dialog? This should
give you the usable space. The only hitch is at start-up, in the form's
constructor, ClientSize hasn't yet taken into account the menu bar. It
first starts telling the truth in the OnLoad event, I think.

After that, it gives you the usable space in the Form.

Nov 17 '05 #12
Dan Neely wrote:
Is elastic a .net 2.0 addition? I can't find it in 1.1.


Elastic is a third-party control from a company called ComponentOne.
(I've used the ActiveX version, and I assume there is a .Net version
as well.) http://componentone.com/

This is NOT an endorsement -- in fact, if control position/size is
the only thing you want from them, I would recommend NOT using
ComponentOne, even if the .Net 2.0 stuff doesn't do what you want.
Control repositioning just isn't that hard to do manually, with a
little thought.

(On the other hand, their grid is a LOT better than anything else in
ActiveX land; I don't have any experience with .Net DataGrid yet, but
I suspect that Component One's FlexGrid still blows it away.)

Nov 17 '05 #13
Did you check out the ClientSize property of the dialog? This should
give you the usable space. The only hitch is at start-up, in the form's
constructor, ClientSize hasn't yet taken into account the menu bar. It
first starts telling the truth in the OnLoad event, I think.

After that, it gives you the usable space in the Form.

Nov 17 '05 #14
Dan Neely wrote:
Is elastic a .net 2.0 addition? I can't find it in 1.1.


Elastic is a third-party control from a company called ComponentOne.
(I've used the ActiveX version, and I assume there is a .Net version
as well.) http://componentone.com/

This is NOT an endorsement -- in fact, if control position/size is
the only thing you want from them, I would recommend NOT using
ComponentOne, even if the .Net 2.0 stuff doesn't do what you want.
Control repositioning just isn't that hard to do manually, with a
little thought.

(On the other hand, their grid is a LOT better than anything else in
ActiveX land; I don't have any experience with .Net DataGrid yet, but
I suspect that Component One's FlexGrid still blows it away.)

Nov 17 '05 #15


"Bruce Wood" wrote:
Did you check out the ClientSize property of the dialog? This should
give you the usable space. The only hitch is at start-up, in the form's
constructor, ClientSize hasn't yet taken into account the menu bar. It
first starts telling the truth in the OnLoad event, I think.


I didn't know it existed. I'll keep it in mind if/when something changes
that makes me need to revist the code.
Nov 17 '05 #16


"Bruce Wood" wrote:
Did you check out the ClientSize property of the dialog? This should
give you the usable space. The only hitch is at start-up, in the form's
constructor, ClientSize hasn't yet taken into account the menu bar. It
first starts telling the truth in the OnLoad event, I think.


I didn't know it existed. I'll keep it in mind if/when something changes
that makes me need to revist the code.
Nov 17 '05 #17

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

Similar topics

0
by: daking | last post by:
I'm trying to track down a Java performance issue, and believe it may be related to GC behavior. Quick background: j2se app server running Caucho Resin 2.1.12, on RHEL3 with Sun JDK 1.4.2_04,...
0
by: Tracey | last post by:
Hi there, I want to search Japanese characters with Full Text search function. I created a table (tbSearch) for Full-text search on SQL 2000, English Win2k Server. The table contains 4 fields,...
0
by: Denise | last post by:
Hi I have set up a full text index on one of my database tables and created a catalog. Then I started a full population on my catalog and got a message "Population of full text index started...
0
by: reneecccwest | last post by:
SELECT d.code, d.description, v.code AS divCode, v.descripton AS divDescript, b.code AS brhCode, b.description AS brhDescript FROM Department d FULL OUTER JOIN Division v
7
by: alexcn | last post by:
I have the following query: SELECT dbo.tSymExch.exCode, dbo.tSymGrp.sgCode, dbo.tSymMain.smCode FROM dbo.tSymExch FULL OUTER JOIN dbo.tSymGrp ON dbo.tSymExch.exID =...
1
by: onewebclick | last post by:
Is there a way to detect a browser cache is full using javascript or HTML thorugh a web page and inform the user to clear the cache to improve performance of the website. It looks like google's...
11
by: rh00667 | last post by:
hi all, i'm confused now. how i can get the full path of an application? if myapp is in a directory which belongs to PATH, argv gives me the first token of cmd line, and not the real path of...
5
by: =?Utf-8?B?TWFydHluIEZld3RyZWxs?= | last post by:
Hi there. I posted an earlier issue under the name "That assembly does not allow partially trusted callers" but have now identified what the issue is. As explained before I am working in...
4
by: Neil | last post by:
Just found out that the Microsoft Rich Textbox does not support full text justification, since it's based on Version 1.0 of the RichEdit Window Class, and full text justification is only available...
4
by: Brian D | last post by:
In MS SQL 2005 when you do a Full Backup does it also backup and truncate the transaction logs or do I need to back the transaction logs up separately? Thanks. Brian
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
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
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...
1
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
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.