TIP: Click on subject to list as thread! ANSI
echo: visual_basic
to: All
from: Visual Boodu .Net
date: 2004-05-29 06:44:00
subject: Re: DLLs

OK I figured out I can just do:

Dim frm As New Projectdll.Class1

And that works OK.  Now I would like the DLL to be a MDI child form to be
called into my (obviously) MDI parent.  When I try to do this it craps
itself (it can't find a MDI parent form).  Is there any way around this?

Visual Boodu .NET wrote:
> Excellent advice, thanks.  I made a DLL with a form which had a
> button and 'referenced' the DLL in my project (project - references)
> then added this code:
>
> Dim frm As Projectdll.Class1
>
> Set frm = New Projectdll.Class1
>
> Call frm.LdForm
>
> Is that the right way to work with DLLs?  What does 'Private
> WithEvents Frm as Form1' do?  What is a COM interface?
>
> Thanks!
>
> mayayana wrote:
>>> How do I put a form in a DLL?
>>
>>   A DLL is like an EXE with a COM interface. You can do
>> anything you want to. Just add the form to the project and
>> control it through your exposed class(es).
>>    You can also pass the events through if you need to.
>> In the exposed class, assuming you have a Form1, use:
>>   Private WithEvents Frm as Form1
>> You can then write subs in your class for the form events, like:
>>   Private Sub Frm_Clicked()
>>       Msgbox "Form was clicked."
>>  end sub
---
þ RIMEGate(tm)/RGXPost V1.14 at BBSWORLD * Info{at}bbsworld.com

---
 * RIMEGate(tm)V10.2áÿ* RelayNet(tm) NNTP Gateway * MoonDog BBS
 * RgateImp.MoonDog.BBS at 5/29/04 6:44:58 AM
* Origin: MoonDog BBS, Brooklyn,NY, 718 692-2498, 1:278/230 (1:278/230)
SEEN-BY: 633/267 270
@PATH: 278/230 10/345 106/1 2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.