From: yxq on
Hello,
I want to build a form with a details button, when click the details button,
the form will become bigger, and show details on the bigger form, how to do?
any examples? thank you.


From: zzz on

"yxq" <gayxq(a)163.net> ha scritto nel messaggio
news:%23cuC57V4KHA.5084(a)TK2MSFTNGP02.phx.gbl...
> Hello,
> I want to build a form with a details button, when click the details
> button, the form will become bigger, and show details on the bigger form,
> how to do? any examples? thank you.
>

pressing the button, modify the size of form ;)


From: Onur Güzel on
On Apr 21, 5:28 pm, "yxq" <ga...(a)163.net> wrote:
> Hello,
> I want to build a form with a details button, when click the details button,
> the form will become bigger, and show details on the bigger form, how to do?
> any examples? thank you.

In Button's Click handler, instantiate a new Size structure and pass
bigger values like this:

' to make it 600x480
Me.Size = New Size(600, 480)

HTH,

Onur Güzel
From: Phill W. on
On 21/04/2010 15:28, yxq wrote:

> I want to build a form with a details button, when click the details button,
> the form will become bigger, and show details on the bigger form, how to do?
> any examples? thank you.

1) Use a CheckBox, not a Button but with the "button" style.
IMHO, it gives a better visual indicator:
button "up" -> Summary
button "down" -> Details

2) Work out the difference in height between the big and small versions
of your form. The form itself may (should?) be resizeable so you only
need to know how much to increase/decrease it by.

3) Use the CheckedChanged event for your CheckBox to control the
changeover. When the Checkbox is checked, increase the height of the
form and make the "detail" controls visible. When the Checkbox is
unchecked, shrink the form and hide the "details" controls.

4) Read up on the Screen object, specifically the WorkingArea property.
When you increase the size of your form, make sure it's [all] still
visible within the working area. Nothing more embarrassing than given
the user a whole bunch of useful stuff to play with, but half of it's
fallen off the bottom of the screen. :-)

HTH,
Phill W.