Re: Debugging dll newb question

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



> 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
>
>


.



Relevant Pages

  • Re: ERROR_RESOURCE_TYPE_NOT_FOUND error comes
    ... Made DLL which contains resources like dialog, ... Made a static lib project which contains classes for resources ... This control is populated by lib classes. ... locale ID, and if not found, is defaulted to the app .exe itself. ...
    (microsoft.public.vc.mfc)
  • Re: How to get a reference to main form in a Windows Form 2.0 Application?
    ... But what control would a library (dll) have access to? ... It is separate from ... the exe. ...
    (microsoft.public.dotnet.general)
  • Re: Custom Control & Dll Hell
    ... DLL using control is Extension / Regular DLL? ... EXE is MFC exe. ... > of my custom control. ...
    (microsoft.public.vc.mfc.docview)
  • Re: ?creating activex control?
    ... and select "VB ActiveX Control ... Interface Wizard" and make sure it's loaded. ... Note that you don't have to make a UserControl as an OCX in order to use it ... In your Standard EXE project, ...
    (microsoft.public.vb.general.discussion)
  • Re: Using a control in a web part
    ... There is a couple of ways that you can use a UserControl in a Web ... Create a new folder called something like 'UserControls' in your website ... Then you render the control: ... If you already have a usercontrol dll, then steps 8 down should do the ...
    (microsoft.public.sharepoint.portalserver.development)