Re: Debugging dll newb question
- From: "Someone" <nobody@xxxxxxx>
- Date: Sat, 13 Aug 2005 13:00:22 -0400
> is there an easier way than this?
Yes. Close all of your VB IDE copies, Open the standard EXE project file. Go
to File-->Add Project, and add the DLL/OCX project. Now you don't need to
compile anything whenever you make changes.
> 2) why is this working at all when i'm not doing the step of registering
> the
> dll with regsvr?
VB IDE auto registers it, but sets the file name for the DLL to itself.
Those who want to see the file name can go to Start-->Programs-->Microsoft
Visual Studio 6.0-->Microsoft Visual Studio 6.0 Tools-->OLE Viewer. Then go
to All Objects, and click on the object name. The DLL/EXE/OCX file is shown
at InprocServer32 entry.
There is a better way to do this that most beginners overlook. You don't
have to make a UserControl as an OCX to use it in an EXE. In your Standard
EXE project, just go to Project-->Add User Control, and start making your
control, just as if you were making an OCX. To place your UserControl on a
form, such as Form1, you have to close the UserControl design window(Not the
code), and place the control on Form1. VB would have added an additional
icon to the ToolBox when you added the UserControl, it's grayed out when the
UserControl design window is open.
If you have already made the control as an OCX, then in your Standard EXE
project, go to Project-->Add File, and browse to where you put the
usercontrol. Now your control would be part of the EXE and nobody can use
your control, it's not exposed outside the EXE.
Note that it's best to copy the UserControl file first to the folder were
you keep your project(or a subfolder) if it was elsewhere.
I have made a fancy 3D button using this method, works great.
"Nomospam" <Nomospam@xxxxxxxxxxxx> wrote in message
news:42fe0091$0$967$8b463f8a@xxxxxxxxxxxxxxxxxxxxxx
> with a vb6 dll project open in an instance of vb6ide
>
> I'm creating the functionality a bit at a time
>
> I add some code then make the dll
>
> then in a vba ide running in another app, i reference and use the dll to
> test it.
>
> a few questions
>
> 1) before "re-making" the dll i have to un-reference it in the vba user
> app
> or i get a write-protected error
>
> then go back to the vb6 ide, make the dll, then back to the vba app,
> re-reference, then test
>
> is there an easier way than this?
>
> 2) why is this working at all when i'm not doing the step of registering
> the
> dll with regsvr?
>
> 3) the dll is using a user control i'm also just starting to create.
>
> why am i not haveing to register the ocx either?
>
> (I thought dlls and ocxs had to be registered with regsvr to use them
>
> surprisingly (happily) i'm not seeming to need this step but don't know
> why)
>
> Thanks for any info
>
> Mark
>
>
.
- References:
- Debugging dll newb question
- From: Nomospam
- Debugging dll newb question
- Prev by Date: Re: MULTIPOST (Was Re: LIstbox Imagebox??)
- Next by Date: Re: Can VB create a utility function (eg, DLL?) callable by any program?
- Previous by thread: Re: Debugging dll newb question
- Next by thread: Re: Debugging dll newb question
- Index(es):