Resizing Control and Halt Operation
-
I have 3 questions, 1. has anyone been trying to make some class or libs for resizing control? for example, if I resize the parent control (i.e form Control), then all the contained control also resized. 2. I have an apps which retrieve a lot of data from database and present the data to richTextBox control. My problem is, when apps is still adding the data and I clicked somewhere on the form, the form will show white screen (similar to non-responding application) but it is still running somehow. How can I halt (or prevent maybe) that click operation so even if I clicked anywhere the form layout will still be the same? 3. similar question like before, I retrieve a lot of database using SqlDataReader class. How can I cancel the operation within the apps? (like 'press ESC to cancel' or something like that?) thanks for the information..
Newbie.. Newbie.. Newbie.. Newbie.. Newbie..
-
I have 3 questions, 1. has anyone been trying to make some class or libs for resizing control? for example, if I resize the parent control (i.e form Control), then all the contained control also resized. 2. I have an apps which retrieve a lot of data from database and present the data to richTextBox control. My problem is, when apps is still adding the data and I clicked somewhere on the form, the form will show white screen (similar to non-responding application) but it is still running somehow. How can I halt (or prevent maybe) that click operation so even if I clicked anywhere the form layout will still be the same? 3. similar question like before, I retrieve a lot of database using SqlDataReader class. How can I cancel the operation within the apps? (like 'press ESC to cancel' or something like that?) thanks for the information..
Newbie.. Newbie.. Newbie.. Newbie.. Newbie..
wienzzz wrote:
if I resize the parent control (i.e form Control), then all the contained control also resized.
You can use
Anchor
for that.wienzzz wrote:
My problem is, when apps is still adding the data and I clicked somewhere on the form, the form will show white screen (similar to non-responding application)
1 - Run that long operation on another thread, which don't make problem for your GUI Or 2 - Show a modal form with a progress indicator, and close the form after data is loaded
wienzzz wrote:
How can I cancel the operation within the apps?
Are you putting a loop and reading the contents ? If yes maintain a flag, and when ESC key is pressed, change the flag value to false. Check this value inside loop and break it. Hope it helps
-
wienzzz wrote:
if I resize the parent control (i.e form Control), then all the contained control also resized.
You can use
Anchor
for that.wienzzz wrote:
My problem is, when apps is still adding the data and I clicked somewhere on the form, the form will show white screen (similar to non-responding application)
1 - Run that long operation on another thread, which don't make problem for your GUI Or 2 - Show a modal form with a progress indicator, and close the form after data is loaded
wienzzz wrote:
How can I cancel the operation within the apps?
Are you putting a loop and reading the contents ? If yes maintain a flag, and when ESC key is pressed, change the flag value to false. Check this value inside loop and break it. Hope it helps
-
I have 3 questions, 1. has anyone been trying to make some class or libs for resizing control? for example, if I resize the parent control (i.e form Control), then all the contained control also resized. 2. I have an apps which retrieve a lot of data from database and present the data to richTextBox control. My problem is, when apps is still adding the data and I clicked somewhere on the form, the form will show white screen (similar to non-responding application) but it is still running somehow. How can I halt (or prevent maybe) that click operation so even if I clicked anywhere the form layout will still be the same? 3. similar question like before, I retrieve a lot of database using SqlDataReader class. How can I cancel the operation within the apps? (like 'press ESC to cancel' or something like that?) thanks for the information..
Newbie.. Newbie.. Newbie.. Newbie.. Newbie..
following are the simple answers.. 1- use Anchor and Dock properties for your contained controls. 2- do your data fetching in separate thread so that your GUI remains responsive 3- SqlDataReader class didn't support the cancel funcitonality according to my knowledge (may be i am wrong) but if i am right then have to implement the logic for the cancellation.