Strange Problem Regarding TabIndex
-
Hello Devs, I'm facing a very strange problem in Windows Form Application using Visual Studio 2005. I have a lot of controls on my Windows Forms like TableLayoutPanels, TextBoxes, RichTextBoxes, Buttons. I set their TabIndexes appropriatley from 0,1,2,3..... When I run the application The cursor focus is not on the control whoes TabIndex Property is se to zero :mad:. I need to Focus myself on the control I want to be focued when application runs. I'm stucked with this for more than 6-7 hours, Removed all the resource file Entries of TabIndex and set all of them again. (Didnot work). Tried to Set focus on tha control in Form's Load event (Didnot work too). Also Saw the Property in Form's Load even that if that control can be focused using Control.CanFocus (Always Returns false). Please tell me something about this Bull S***:mad: Its a pain in A** for me at this time. I'll be really thankful to you for your help. Best Regards, Rizwan.
-
Hello Devs, I'm facing a very strange problem in Windows Form Application using Visual Studio 2005. I have a lot of controls on my Windows Forms like TableLayoutPanels, TextBoxes, RichTextBoxes, Buttons. I set their TabIndexes appropriatley from 0,1,2,3..... When I run the application The cursor focus is not on the control whoes TabIndex Property is se to zero :mad:. I need to Focus myself on the control I want to be focued when application runs. I'm stucked with this for more than 6-7 hours, Removed all the resource file Entries of TabIndex and set all of them again. (Didnot work). Tried to Set focus on tha control in Form's Load event (Didnot work too). Also Saw the Property in Form's Load even that if that control can be focused using Control.CanFocus (Always Returns false). Please tell me something about this Bull S***:mad: Its a pain in A** for me at this time. I'll be really thankful to you for your help. Best Regards, Rizwan.
I once had the same problem. I had to put the focus on the control I wanted with control.BringToFront(); I don't know why the TabIndex sometimes don't work with VS2005, but I didn't found the error. After I reinstalled the computer (and VS2005) it worked fine. Regards, Ingo
------------------------------ PROST Roleplaying Game War doesn't determine who's right. War determines who's left.
-
I once had the same problem. I had to put the focus on the control I wanted with control.BringToFront(); I don't know why the TabIndex sometimes don't work with VS2005, but I didn't found the error. After I reinstalled the computer (and VS2005) it worked fine. Regards, Ingo
------------------------------ PROST Roleplaying Game War doesn't determine who's right. War determines who's left.
Hmm, Its impossible to reinstall all the things again. But yes you are so true this is some bug with VS 2005 coz my friends also complained me about this when i discussed my problem with him. Anyways there are 2 possibilities: 1) I Compile it at some other computer. 2) I use the method you used control.BringToFront(); Can I put control.BringToFront(); in Form's Load Event? Can you explain the code: Should I use this: control.BringToFront(); control.Focus(); in Form's Load Event? Thanks a lot for your reply, Best Regards, Rizwan
-
I once had the same problem. I had to put the focus on the control I wanted with control.BringToFront(); I don't know why the TabIndex sometimes don't work with VS2005, but I didn't found the error. After I reinstalled the computer (and VS2005) it worked fine. Regards, Ingo
------------------------------ PROST Roleplaying Game War doesn't determine who's right. War determines who's left.
tried this: (Didnot work)
private void FrmServer_Load(object sender, EventArgs e) { rtfSend.BringToFront(); }
Nor this:private void FrmServer_Load(object sender, EventArgs e) { rtfSend.BringToFront(); rtfSend.Focus(); }
Nor this One:private void FrmServer_Load(object sender, EventArgs e) { rtfSend.Focus(); rtfSend.BringToFront(); rtfSend.Focus(); }
:sigh::sigh::sigh::sigh::~ Any Help?? :confused::confused::confused: Thanks a lot Best Regards, Rizwan -
tried this: (Didnot work)
private void FrmServer_Load(object sender, EventArgs e) { rtfSend.BringToFront(); }
Nor this:private void FrmServer_Load(object sender, EventArgs e) { rtfSend.BringToFront(); rtfSend.Focus(); }
Nor this One:private void FrmServer_Load(object sender, EventArgs e) { rtfSend.Focus(); rtfSend.BringToFront(); rtfSend.Focus(); }
:sigh::sigh::sigh::sigh::~ Any Help?? :confused::confused::confused: Thanks a lot Best Regards, RizwanThat's strange, but I don't get the same error now, so I can't test it. Sorry, Ingo
------------------------------ PROST Roleplaying Game War doesn't determine who's right. War determines who's left.
-
Hello Devs, I'm facing a very strange problem in Windows Form Application using Visual Studio 2005. I have a lot of controls on my Windows Forms like TableLayoutPanels, TextBoxes, RichTextBoxes, Buttons. I set their TabIndexes appropriatley from 0,1,2,3..... When I run the application The cursor focus is not on the control whoes TabIndex Property is se to zero :mad:. I need to Focus myself on the control I want to be focued when application runs. I'm stucked with this for more than 6-7 hours, Removed all the resource file Entries of TabIndex and set all of them again. (Didnot work). Tried to Set focus on tha control in Form's Load event (Didnot work too). Also Saw the Property in Form's Load even that if that control can be focused using Control.CanFocus (Always Returns false). Please tell me something about this Bull S***:mad: Its a pain in A** for me at this time. I'll be really thankful to you for your help. Best Regards, Rizwan.
It might be a good idea to look at the control that IS getting focus when you load your form. Is it a panel? I've had to set the TabStop property to false on a panel before, even though it had a high tab index.
-
It might be a good idea to look at the control that IS getting focus when you load your form. Is it a panel? I've had to set the TabStop property to false on a panel before, even though it had a high tab index.
Yes, I have tried all the things, I set all the panels and all oher controls' TabStop property to false. But again the same proble. When I run the application, The focus of the control must be at the control whose TabIndex is 0 rather it focuses control with TabIndex 2. When I try check CanFocus property of Controls with TabIndex 0 in Form's Load it returns false. I want to know the reason what's the reason behind "Control.CanFocus is always false". How does it evaluate this that it cannot be focused. If i know this then may be we can solve the problem. Thanks alot, Best Regards, Rizwan Ahmed.
-
That's strange, but I don't get the same error now, so I can't test it. Sorry, Ingo
------------------------------ PROST Roleplaying Game War doesn't determine who's right. War determines who's left.
Ahhhh! Ok, Thanks. But are you sure Windows and Visual Studio Reinstallation can fix this problem:confused::confused: I think this configuration may only reside in Resource files which i refined clearly but not working :-> Thanks a lot, Regards, Rizwan
-
Ahhhh! Ok, Thanks. But are you sure Windows and Visual Studio Reinstallation can fix this problem:confused::confused: I think this configuration may only reside in Resource files which i refined clearly but not working :-> Thanks a lot, Regards, Rizwan
dotnetdev83 wrote:
But are you sure Windows and Visual Studio Reinstallation can fix this problem
No sorry I'm not sure. For me it worked, but I don't know if our problems have the same cause. Regards, Ingo
------------------------------ PROST Roleplaying Game War doesn't determine who's right. War determines who's left.