|
-
May 15th, 2013, 07:07 PM
#1
Thread Starter
Banned
-
May 16th, 2013, 02:06 AM
#2
Re: how to make ocx simple example please
The Creating an ActiveX Control chapter teaches you how to build a simple ActiveX control.
On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)
-
May 16th, 2013, 02:10 AM
#3
Re: how to make ocx simple example please
Open VB6, Create New Project, Choose ActiveX Control.
There is also a wizard to help you link properties of controls added to your control.
If you want a few examples then you should really try searching, I'm sure there are 100s of them available
-
May 16th, 2013, 12:14 PM
#4
Thread Starter
Banned
Re: how to make ocx simple example please
thanks ladies and gents
ahh so simple basic understand what i seen is making ocx it acts as a form or a module am i correct
i opened form control like u said @datamiser and i am able to add buttons etc etc after tht compile it then in fresh project
add that ocx as reference then call out commands to that ocx ? is this right
Last edited by ladoo; May 16th, 2013 at 12:18 PM.
-
May 16th, 2013, 12:46 PM
#5
Re: how to make ocx simple example please
Yes, that is correct.
A good way to make an OCX is to make it as part of your normal project. Then VB auto includes it as part of the tool box. This way you can modify you OCX code to get it to work correctly with your normal projects that uses the OCX. When you have perfected your OCX you can save it as an OCX file to be used with other projects. So, instead of opening VB6, creating a new project and selecting ActiveX Control you have your existing project and on menu bar click on Project then click on User Control. This open up a dialog box which you will select User Control (the icon on the left side). This opens up a window with a blank user control Form. Add you controls and your code then test it with your current project
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|