ActiveX DLL project question (General questions)
I am trying to create an ActiveX DLL In VB6 that calls wodMailbox.dll or wodMailbox.ocx directly using a Declare statement. Or adding a reference to the Mailbox component.
Either way, I don't want to display a form, just a msgbox displaying the object.Version property. Please tell me what I need to put in the class or any modules I need to add. Just a simple example please to get me started. Thanks
Re: ActiveX DLL project question
Marco,
add reference to wodMailbox.dll to your project, and in your class add this code: [code]Dim mbox As wodMailboxCom
Private Sub Class_Initialize()
Set mbox = New wodMailboxCom
MsgBox mbox.Version
End Sub
[/code]
That should do it.
Regards,
Kreso
Re: ActiveX DLL project question
Marco,
add reference to wodMailbox.dll to your project, and in your class add this code: [code]Dim mbox As wodMailboxCom
Private Sub Class_Initialize()
Set mbox = New wodMailboxCom
MsgBox mbox.Version
End Sub
[/code]That should do it.
Regards,
Kreso
It compiled without error but no msgbox when run from the VB6 ide. That's not necessarily a problem but I need the dll I generate to display the msgbox. Here's how the dll will be used: in the registry I have a file type .mbz which is a mailbox file. In shell/open/command I have Open with Notepad which successfully opens .mbz files with Notepad. I want to add Display WodMailbox Version which displays MsgBox mbox.Version from my dll. What do I do? Thanks
Re: ActiveX DLL project question
I don't know how you use your DLL, so I can't say why it's never called. Do you ever initialize your DLL? Call it from anywhere? How?
Kreso
Re: ActiveX DLL project question
Marco,
How did you run class where wodMailBox is used?
I start new project in VB6 add class to it and insert code that Kreso send you to Class1.
Then I call inside Form_Load this code
[code]Private Sub Form_Load()
Dim a As Class1
Set a = New Class1
End Sub[/code]
MessageBox is displayed with wodMailBox version.
Drazen
Re: ActiveX DLL project question
I don't know how you use your DLL, so I can't say why it's never called. Do you ever initialize your DLL? Call it from anywhere? How?
Kreso
Not sure what you mean by initialize - Is this something I need to do in the class? I want to call it by double-clicking on .mbz files. The Display WodMailbox Version in the registry is just a simple example to get me started.
Re: ActiveX DLL project question
Marco,
I'd like to help, but this is really way beyond our support. We can provide help with wodMailbox, but we can't about adding shell extensions. You should google for it.
Regards,
Kreso
Re: ActiveX DLL project question
Marco,
I'd like to help, but this is really way beyond our support. We can provide help with wodMailbox, but we can't about adding shell extensions. You should google for it.
Regards,
Kreso
OK, forget about that example. Can I call odMailbox.dll or wodMailbox.ocx by using a Declare statement like I do with win32 calls such as
Declare Function SendMessage Lib ..
I think I found some sample code that will do what I need if your component will support a Declare statement like that. Thanks