G
Guest
Nearly all the guys in my team found a problem
If an assembly contains more than one instance of SIP in different forms, when you hit a textbox in a non-mainform when the SIP is enabled, the textbox will got focus but you can't type anything on it. This situation happens on both the TextBox and TextBox in a DataGrid. You need to hit the screen again to get the "real focus"
By further study with it, I found that if the pen press the display a little longer or make the pen move in the textbox, the problem will not come out. As you can't require your customer to "press the textbox a little longer" because it seems ridiculous, I tried many ways to solve it but all failed
First, I supposed that the TextBox doesn't get the focus really and I add the .Focus() in textbox_getfocus event, but it doesn't work
Then I supposed that maybe the Form doesn't get the focus and I add the this.Focus() ... failed again, even failed when I set the focus to another form before this.focus()
Finally I try to make the instances of SIP in different Forms disposed before showing another form and making a new instance of SIP in that form ... failed like before
As I need to get the size of visible desktop without sip, I can't just use SipShowIM API. If there is a way to work out the problem in pure .NET code
The following is a simple sample of my source code in the second form
private void sip_EnabledChanged(...
redock(); // This function is to make the current TextBox visible by moving it in vertical way
// There is only codes of .left = xxx and VScrollBar.Visible = xx
private void tb_GotFocus(...
checkInput(); // This function is to check whether the input with the current "node"
//(like datetime in a datetimePicker control) is validate, and copy the context in the "node" objec
nodeEnabled = false; // Make the forecolor of labels, textbox and datetimePicker with the current "node"
// from Red to Black
i = arrTxt.IndexOf(sender); // Get the index of the "new" current "node
i++; // Fix the inde
currentNode = oc; // set the current nod
nodeEnabled = true; // Turn black to Re
if (sip.Enabled == false) sip.Enabled = true
Any suggests?
If an assembly contains more than one instance of SIP in different forms, when you hit a textbox in a non-mainform when the SIP is enabled, the textbox will got focus but you can't type anything on it. This situation happens on both the TextBox and TextBox in a DataGrid. You need to hit the screen again to get the "real focus"
By further study with it, I found that if the pen press the display a little longer or make the pen move in the textbox, the problem will not come out. As you can't require your customer to "press the textbox a little longer" because it seems ridiculous, I tried many ways to solve it but all failed
First, I supposed that the TextBox doesn't get the focus really and I add the .Focus() in textbox_getfocus event, but it doesn't work
Then I supposed that maybe the Form doesn't get the focus and I add the this.Focus() ... failed again, even failed when I set the focus to another form before this.focus()
Finally I try to make the instances of SIP in different Forms disposed before showing another form and making a new instance of SIP in that form ... failed like before
As I need to get the size of visible desktop without sip, I can't just use SipShowIM API. If there is a way to work out the problem in pure .NET code
The following is a simple sample of my source code in the second form
private void sip_EnabledChanged(...
redock(); // This function is to make the current TextBox visible by moving it in vertical way
// There is only codes of .left = xxx and VScrollBar.Visible = xx
private void tb_GotFocus(...
checkInput(); // This function is to check whether the input with the current "node"
//(like datetime in a datetimePicker control) is validate, and copy the context in the "node" objec
nodeEnabled = false; // Make the forecolor of labels, textbox and datetimePicker with the current "node"
// from Red to Black
i = arrTxt.IndexOf(sender); // Get the index of the "new" current "node
i++; // Fix the inde
currentNode = oc; // set the current nod
nodeEnabled = true; // Turn black to Re
if (sip.Enabled == false) sip.Enabled = true
Any suggests?