Google Groepen ondersteunt geen nieuwe Usenet-berichten of -abonnementen meer. Historische content blijft zichtbaar.

creating wizards for own controls/forms

0 weergaven
Naar het eerste ongelezen bericht

Neil Robbins

ongelezen,
6 mrt 2004, 14:40:0906-03-2004
aan
I have been wondering recently how I would go about creating a control that
when selected from the toolbox for use in an application either autoran a
wizard for providing it with properties or provided for the selection of an
option from the properties window that would run a wizard. I suppose what I
envisage would be similar to the AutoFormat option in the Properties menu
for the DataGrid Control.

Also how could one create something similar to the Data Form Wizard.

Any information or directions to sources of information would be very
helpful. So far I havn't been able to find anything that deals with these
problems.

I originally tried posting this query on the dotnet.languages.vb.controls
newsgroup but had no response.

Many thanks in advance.

Neil R


Cor

ongelezen,
7 mrt 2004, 03:10:5507-03-2004
aan
Hi Neil,

I do not see the sence of that, you never know if there is tomorrow one who
makes a much better one than you because they are shorter on the tools.

But if I would do this, I would start with creating a lot of my own
usercontrols.

Just a thought,

Cor

"Jeffrey Tan[MSFT]"

ongelezen,
8 mrt 2004, 04:52:1808-03-2004
aan
Hi Neil,

Thank you for posting in the community!

Based on my understanding, you want to apply a wizard form for your custom
control. You want to add the wizard form through 2 ways: 1.When the control
is adding on the designer form. 2. Through the "command link"(Like the
"auto format") in the Property Browser window.

===============================
Actually, Wizard form is also a normal form, just contains some special
function settings. So you can just make your customized Wizard form
youself.(Just like making a normal form). I think the difficulty is how to
show up the "Wizard Form" through your 2 ways.

For your first requirement, I think you should apply a customized control
designer to your control. To do this, you should inherit from the
System.Windows.Forms.Design.ControlDesigner class, then override Initialize
method. In Initialize method, you can show up your customized "Wizard Form".
At last, to apply the control designer to your custom control, you can use
DesignerAttribute.

For your second requirement, actually, the "command link" is a one-by-one
association with the designer verbs in the context menu.(When you right
click your control, the verbs will display in the context menu)
So, to get this done, you also need create a customized ControlDesigner,
override its Verbs property. This "Verbs" is DesignerVerbCollection class,
which contains DesignerVerb objects. DesignerVerb's constructor takes an
event handler. In the event handler, you can pop up your "wizard form".

For more information, please refer to ControlDesigner:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfsystemwindowsformsdesigncontroldesignerclassctortopic.asp

Also, the 2 articles below show you a how to add rich design-time support
for your custom control:
"Make Your Components Really RAD with Visual Studio .NET Property Browser"
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/ht
ml/vsnetpropbrow.asp

"Creating Designable Components for Microsoft Visual Studio .NET Designers"
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/ht
ml/pdc_vsdescmp.asp

================================
Please apply my suggestion above and let me know if it helps resolve your
problem.

Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Neil Robbins

ongelezen,
9 mrt 2004, 04:10:3209-03-2004
aan
Hi Jeffrey,

Thanks for your reply - very helpful!

Kind regards,

Neil R

"""Jeffrey Tan[MSFT]""" <v-j...@online.microsoft.com> wrote in message
news:3vxiVMPB...@cpmsftngxa06.phx.gbl...

"Jeffrey Tan[MSFT]"

ongelezen,
9 mrt 2004, 06:02:5609-03-2004
aan
Hi Neil,

Thanks very much for your feedback.

I am glad my reply makes sense to you. If you have any further concern,
please feel free to post, I will help you.

0 nieuwe berichten