Re: Create DLL and using it
You can't make standard Windows DLL from VB6. (atleast not easily)
Here is a tutorial on Create an ActiveX dll. It may help you.
You can put anything you want in the dll. I would recommend to putt the functions you don't frequently need. When you need the function, create an instance of the objet that you need from that dll and when you are done with it, destroy the object. This will save memory.
VB Code:
Dim myObj As MyDll.Object1
Set myObj = New MyDll.Object1
' ... ... ... ...
Call myObj.SomeMethod()
' ... ... ... ...
Set myObj = Nothing
Re: Create DLL and using it
What is your recommendation for me (to split my application into small piece)?
Re: Create DLL and using it
Unfortunetly no one other than you can decide what to put in those dlls.
If the compiled exe is within ~2MB range and the application doesn't take more than ~32MB RAM, then I think it will be no problem for modern systems.
As I mentioned in my previous post, you can move some functions to a dll to free up some memory. But instantiating and calling a function from another object is a little slower - but unless you need it realtime it will not cause any problem.
Re: Create DLL and using it
Thanks iPrank, you made thing bit clear for me now.
BTW, i made Application with MDI FORM and Child (of course :) ), i haven't made limitation how many same or another form can be open. Before decide to do that i have test create MDI application and test open more than 50 from with few control on it, application still ok (no crash). But in real application (my application) it open 15 form (with relatively a lot of control on it) it will crash, suffer for out of memory.
Can you inform what is VB limitation for memory thing and such as?
PS: kind of spooky avatar you have :)
Re: Create DLL and using it
I don't know VB's limitation. But I've never faced out of memory problem when working with multiple forms.
First look for unneeded recursions. In most cases some kind of recursive event procedures causes out of stack space.
Look for any unneeded objects that you haven't destoyed.
Re: Create DLL and using it
Hmm.. i did have one recursion. Will check that.
Sorry to take advantage of you, but seems you know a lot about vb and api (your signature). If you have some time please take a look at my unresolved post here :
http://www.vbforums.com/showthread.p...ight=mousedown
Thanks
Re: Create DLL and using it
LOL. I don't know much. Thanks to Ctrl+C Ctrl+V. :D
I'll go to an overnight party in a few minutes. I'll look into your other problem when I return tomorrow.
http://www.smileyarena.com/emoticons...nted/drunk.gif
Re: Create DLL and using it
Enjoy your Party, drink till you drop. Don't forget to wake up tomorow :)
Thanks iPrank