a few form questions !

  • Thread starter Thread starter Du Dang
  • Start date Start date
D

Du Dang

1. how do i know my form is on top (when topmost == disabled) ?
scenario: user clicked on the notify icon (if form is on top) -> minimize
the form, (if form is not on top) -> bring it to front, else show the
invisible form

2. how do i determine the size of windows resolution ?
i wanna save the form position when exit, and restore the proggy location
when reopen.
manually center the form as a default when no location is found <- this
where teh res come in

3. how do i communicate between forms??
i wanna past a fews var from one form to another, what is the best practise
for this kinna thing

thanks you so much,

Du
 
1. how do i know my form is on top (when topmost == disabled) ?
scenario: user clicked on the notify icon (if form is on top) ->
minimize the form, (if form is not on top) -> bring it to front, else
show the invisible form
this.BringToFront()


2. how do i determine the size of windows resolution ?
i wanna save the form position when exit, and restore the proggy
location when reopen.
manually center the form as a default when no location is found <-
this where teh res come in

this.StartPosition = StartPosition.CenterScreen;
3. how do i communicate between forms??
i wanna past a fews var from one form to another, what is the best
practise for this kinna thing

store a reference to the other form in a member variable.
Or in case of Mdi Windows: Use the Parent Property to communicate via the
ParentForm.
 
Back
Top