Denaes Posted September 25, 2005 Posted September 25, 2005 I'm looking to either: 1) Add a design time button to a control to have a configuration window show. 2) Show a configuration window when an item is first added to a form. On the form I'll be displaying a collection on the Form (control collection) and I'll be displaying 2-4 control collections on the control. Basically the control (aside from other purposes) contains a state property and when it changes, it affects other controls on the form, such as enabling, disabling, hiding, clearing, etc. So if anyone can show me (or point me in the right direction for) the basics of the proper event and way to check the logic, I would be most appreciative :D Quote
code Mechanic Posted September 27, 2005 Posted September 27, 2005 I'm looking to either: 1) Add a design time button to a control to have a configuration window show. 2) Show a configuration window when an item is first added to a form. On the form I'll be displaying a collection on the Form (control collection) and I'll be displaying 2-4 control collections on the control. Basically the control (aside from other purposes) contains a state property and when it changes, it affects other controls on the form, such as enabling, disabling, hiding, clearing, etc. So if anyone can show me (or point me in the right direction for) the basics of the proper event and way to check the logic, I would be most appreciative :D To tell if your control is in design mode or run mode use this If Me.DesignMode Then 'Design mode Else 'Run Mode End If If you place a button on your user control that you want a developer to interact with you will need to add a control designer with a Gethittest method: This is a function I used in a wizard control to allow the developer to scroll through the wizard pages at design time. Protected Overrides Function GetHitTest(ByVal point As Point) As Boolean Dim wiz As SymWizard = Me.Control If wiz.btnNext.Enabled AndAlso wiz.btnNext.ClientRectangle.Contains(wiz.btnNext.PointToClient(point)) Then Return True End If If wiz.btnBack.Enabled AndAlso wiz.btnBack.ClientRectangle.Contains(wiz.btnBack.PointToClient(point)) Then Return True End If Return False End Function Hope this helps CM :rolleyes: Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.