[Mono-winforms-list] SendKeys

Jackson Harper jackson at ximian.com
Fri Feb 16 09:40:15 EST 2007


Hi Martin,

Do you mind supplying a full compilable test case?  That will make it
easier for the people trying to fix your problem.  Just attach a small
C# file so people can easily compile and see your problem.


Cheers,
Jackson



On Fri, 2007-02-16 at 09:00 +0100, martin at fony.sk wrote:
> Hi
> 
> so 1.2.3 version is here and I tried to implement SendKeys.Send() into my
> application, but it doesnt work.
> 
> My application looks like this:
> 
> ...
> 
> //window
> Window win = new Window ("...");
> VBox vbox = new VBox (false, 1);
> win.Add (vbox);
> HBox entry_bar = new HBox (false, 1);
> //entry widget
> Entry entry = new Entry ("");							entry_bar.PackStart (entry, true,
> true, 1);
> vbox.PackStart (entry_bar, false, false, 1);
> //keyboard widget
> HBox keyboard = new HBox (false, 1);
> Button q = new Button ("Q");
> q.CanFocus = false;
> q.Clicked += new EventHandler (q_clicked);
> keyboard.PackStart (q, false, false,1);
> vbox.PackStart (keyboard,false,false,1);
> 
> ...
> 
> void q_clicked (object obj, EventArgs args)
> {
> System.Windows.Forms.SendKeys.Send("a");
> }
> 
> ...
> 
> There are no errors during compilation and start, I can write into entry
> widget using keyboard, but when I click Q button, nothing happens. Cursor
> stays in entry all the time (q.canfocus=false) but "a" is not written into
> it.
> Is there something missing in my code? I tried a lot of button and entry
> properties and methods but nothing helped.
> 
> Thanks for you advise. I am just a beginner.
> 
> Martin
> 
> _______________________________________________
> Mono-winforms-list maillist  -  Mono-winforms-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-winforms-list



More information about the Mono-winforms-list mailing list