Dear Paladine,
Thanks for your response. I again try my best to make you clear about my problem.
Actually, when there would be vertical scrollbar along the form and position of scroll is most up. In this condition when we Click on RichTextBox, form will be scroll down. Thats why some area of RichTextbox is selected automatically. Position of form should not be changed by interacting with controls but it happens.
If you still not understand, then please just guide me how can I come to know that Windows scroll event is triggered and how I can prevent Form from being scrolled.
Many many Thanks.
Waiting for your reply,
Amir Ali.
Ok Amir, from the description you have given, I am sorry to say I do not see the issue. I resize the form and the scroll bar appears. The Textbox is now partially covered, and I can use the scroll bar to see the non-visible portion. Clicking on the textbox does nothing but place the cursor in the textbox.
So I am not sure what the issue is? This is what should happen.
Position of form should not be changed by interacting with controls but it happens.
This does not happen for me? Interacting with the control does not change the window position. But saying that, if you have another control (even another textbox) on this form and press the
tab key the focus does go to the next control and the viewable portion of the resized form does change to the new control. Problem? Nope, that is a fact of life. Not a problem. This is how windows works. Otherwise you could type or select a not in view an have no Idea where you cursor was, or if you have selected the control you want.
So a way around it? Not that I know of or see a reason to have one.
The only thing I could suggest is prevent resizing of the form.
Hope this helps, but if I am still not getting it...please clarify.