I do not know of any way.
Try
Private Sub Enable(blnEnabled As Boolean)
Dim ctl As Control
For Each ctl in Me.Controls
On error resume next
ctl.Enabled = blnEnabled ' Maybe leave Timer alone
On Error goto 0
Next
End Sub
A sure way would be to mark and cut all controls and objects on the form, put a Frame on the form, size it to the size of the form, click on this new frame, and then paste all the controls back on to it. If you start a new form, then just always make sure that you add a frame before adding controls.
Then, set the frams's border style to none.
Now you are able to do several things with this:
1. Frame1.Enabled = False will cause all of the controls on it to be disabled.
2. You can use the frame1.Move in the forms resize event to center the frame on the screen, and all of it's controls in one shot:
3. You can hide everything as once with Frame1.Visible = False. This is good if you want two frames with two sets of controls and two command buttons to toggle between the two frames; or if there are two conditions, for the form, with little differences between them, then depending on which menu selection the user makes in the MDI, you do not need to create a new form but can use these two different states. [/b][/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.