To identify an instance created (VB6) already, with api

balki
12-28-2000, 03:21 AM
Hi,

We are developing an erp project in vb 6.0 and using an user defined dll file project, which will create reports and show it in a richtext box. The forms are mdi child. When i am running a report from a particular form it is generating the report by creating an instance of the class. if i again click for report in the same form, a new instance created. It should be avoided by not creating a new instance but it should show the previous instance generated.

Regards,
Bala


<P ID="edit"><FONT SIZE=-1><EM>Edited by balki on 12/28/00 04:33 AM (server time).</EM></FONT></P>

niktesla
01-01-2001, 06:53 PM
put this code in you initialize event of your .dll

If App.PrevInstance=true then end

Not my info, credit goes to Ryan231 and ruti_gl.
They answered a similar post

Brian T. Wiehoff

Neila
01-26-2001, 11:24 AM
End is EVIL and in fact is NOT allowed in a dll (what would be the point). The solution here is to test if the instantiated Object is Nothing. If so instantiate, else use existing instance. No proper program uses END.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum