List Info

Thread: Re: Moving Focus Between Form




Re: Moving Focus Between Form
country flaguser name
Germany
2007-09-19 13:56:59
Hello,

On Wed, 2007-09-19 at 12:36 -0500, Tri_NguyenDell.com
wrote:
> Thank you for your respond.  You are right that I am
using
> "Form.ShowDialog".  However, I am using it in
both Windows, and Linux.
> The reason I am using "Form.ShowDialog" is
because I want to monitor for
> the return of the form.
> 
> Is there a problem with "Form.ShowDialog"?

No there is no problem with ShowDialog but it blocks all
other Forms of
the Application, like you already noticed.

Howerver, a workaround would be to attach a delegate to the
Closed event
of the Form and then read out the DialogResult manually.
(See the
Attachment for a short sample)

Kind Regards,
Valentin S.

> 
> Thanks.
> 
> -Tri.
> 
> -----Original Message-----
> From: Valentin Sawadski [mailto:valentin.sawadskigmx.de] 
> Sent: Wednesday, September 19, 2007 10:34 AM
> To: Nguyen, Tri
> Cc: mono-winforms-listlists.ximian.com
> Subject: Re: [MonoDevelop] Moving Focus Between Form
> 
> Hello,
> 
> On Fri, 2007-09-14 at 12:41 -0500, Tri_NguyenDell.com
wrote:
> > Hi I am new to Mono, and I not sure this is a
right place to ask this
> > question:
> > 
> > 1.       I am trying to port a C# Windows app to
Mono running on SLES
> > 10.1.  The app starts with one form, and base on
user input , it can
> > launch other forms.  When this happens, the new
form gets focus, and I
> > can click on the previous form (parent?), and get
focus.  On mono, the
> > app behaves differently:  I cannot get focus back
to the previous,
> > unless I close the new form.
> > 
> > Any help on this matter would be appreciated.
> 
> As far as I know there's no bug in Form.Show, so my
guess is that you
> call Form.Show on Windows and changed it to
Form.ShowDialog while
> porting to Linux which would explain the behavior you
mentioned.
> 
> However I you are sure that this is not the cause for
the behavior, then
> please file a bug with a repro at http://bugzilla.novell.co
m.
> 
> Kind Regards,
> Valentin S.
> 
> P.S. I cc'ed this message to the winforms list, so that
more people
> concerned with WinForm will notice to this issue.

_______________________________________________
Mono-winforms-list maillist  -  Mono-winforms-listlists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-winform
s-list

  
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )