Results 1 to 4 of 4

Thread: Disable form but allow the controlbox and move?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2016
    Posts
    20

    Disable form but allow the controlbox and move?

    Hey guys,

    Is there a way I can disable a form but allow the control box and the ability to move the form?

    Or is it better to disable all the controls within the form?

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    Re: Disable form but allow the controlbox and move?

    Add a Panel to your form and set its Dock property to Fill and move all the other child controls to the Panel instead of the form. You can then disable the Panel to disable all the controls on the form without affecting the form itself.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2016
    Posts
    20

    Re: Disable form but allow the controlbox and move?

    Thanks, good idea. I'll give it a try.

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    Re: Disable form but allow the controlbox and move?

    Just be careful when you move the child controls because, if you cut and paste them, all the Handles clauses will be deleted from there event handlers. If that happens, it's easy enough to add them back manually or using the Properties window but you can avoid the issue if you drag and drop rather than cut and paste.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width