Cutom Keyboard On windows CE
I have coded a custom keyboard on CF 35. , Windows CE 6.0 . It is created and added to form on BaseForm and all forms inherit from this one. So my problem is : custom keyboard takes 1-2 second to be created and located on every form load. how can i 开发者_运维技巧get solve this?
Here is the Constructor of Keyboard
public KeyBoard()
{
InitializeComponent();
panelNumeric.SendToBack();
panelNumeric.Visible = false;
this.Visible = false;
//Click event
for (int i = 0; i < this.Controls.Count; i++)
this.Controls[i].Click += new EventHandler(ButtonClick);
panelNumeric.Click -= ButtonClick;
for (int i = 0; i < panelNumeric.Controls.Count; i++)
panelNumeric.Controls[i].Click += new EventHandler(ButtonClick);
//Caps Lock
btnListForCaps = new List<Control>(){btnQ,btnW,btnE,btnR,btnT,btnY,btnU,btnI,btnO,btnP,btnP,btnTRG,btnTRU,btnA,btnS,btnD,btnF,btnG,btnH,btnJ,btnK,btnL,btnTRS,btnTRI,btnZ,btnX,btnC,btnV,btnB,btnN,btnM,btnTRO,btnTRC};ButtonClick(btnShift, null);
}
i found the solution. i added a new form and locate keyboard buttons on it. Create keyboard form on application load and declare it as a static global variable. Call "GlobalParameters.Keyboard.CustomShow();" on each form i need. hope it helps
精彩评论