Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Resizing Control and Halt Operation

Resizing Control and Halt Operation

Scheduled Pinned Locked Moved C#
questiondatabasehelptutorial
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    wienzzz
    wrote on last edited by
    #1

    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..

    N N 2 Replies Last reply
    0
    • W wienzzz

      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..

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      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


      My Website | Ask smart questions

      W 1 Reply Last reply
      0
      • N N a v a n e e t h

        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


        My Website | Ask smart questions

        W Offline
        W Offline
        wienzzz
        wrote on last edited by
        #3

        oh yeah, Anchor!! never thought of that! thankz a lot Nav :)

        Newbie.. Newbie.. Newbie.. Newbie.. Newbie..

        1 Reply Last reply
        0
        • W wienzzz

          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..

          N Offline
          N Offline
          Nouman Bhatti
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups