|
-
May 28th, 2009, 11:50 PM
#1
Thread Starter
Fanatic Member
-
May 29th, 2009, 01:07 AM
#2
Frenzied Member
Re: VB6.0 slow
Well for opening vb faster, close all the forms and code windows you can and only leave one or none of the windows open. This will allow vb to load your project faster because it does not have to read in the specific files of your project so it can display them. As for making the compile time of your exe shorter then I would suggest that you start moving some of the functionality to controls/dlls/activex exe's.
Good Luck
Option Explicit should not be an Option!
-
May 29th, 2009, 01:17 AM
#3
Hyperactive Member
Re: VB6.0 slow
If I have learned one thing in my 12 years of programming, it's that the only limitations are problems that I can't think of another solution for.
You could try writing your own dlls, make sure to use object arrays as much as possible, and generate some of the objects from code. This would also help you compartmentalize your project better.
Also, 150 forms is quite ridiculous. No offense, but there has to be some degree of redundancy in what you are doing. Sounds like the whole project could use a massive overhaul.
Good luck!
-
May 29th, 2009, 01:40 AM
#4
Thread Starter
Fanatic Member
Re: VB6.0 slow
vb5prgrmr & deathfxu,
thanks for you reply.
I will try to make dlls if possible.
Also, 150 forms is quite ridiculous. No offense, but there has to be some degree of redundancy in what you are doing. Sounds like the whole project could use a massive overhaul.
I am surely not having redunduncy for my project.
As i am developing erp like software, each form is different in design and functionality.
WHETHER YOU SUCCEED OR FAIL IS NOT AS IMPORTANT AS WHETHER YOU TRIED YOUR BEST 
-
May 29th, 2009, 02:55 AM
#5
Hyperactive Member
Re: VB6.0 slow
Yeah, the dll option is definitely the best here.
I had a project a while back that I used one form (which I could create multiple instances of) that morphed the items on it based on why that specific instance of the form was being loaded. Would maybe something like that be usable for you?
-
May 29th, 2009, 03:11 AM
#6
Thread Starter
Fanatic Member
Re: VB6.0 slow
yes. i think it will be useful for me.
Can you give me more details of it ?
Thanks for reply.
WHETHER YOU SUCCEED OR FAIL IS NOT AS IMPORTANT AS WHETHER YOU TRIED YOUR BEST 
-
May 29th, 2009, 05:57 AM
#7
Hyperactive Member
Re: VB6.0 slow
Make a form in a new project and put 2 buttons on it. cmdNew (caption "New") and cmdClose (caption "Close"). Then paste this in code window:
vb Code:
Private Sub cmdClose_Click() Dim isaForm As Form For Each isaForm In Forms Unload isaForm Next End Sub Private Sub cmdNew_Click() Dim imaNew As Form Set imaNew = New Form1 Load imaNew imaNew.Show End Sub
This shows the basic interaction of creating/handling forms via code. I'll post more in a minute.
-
May 29th, 2009, 06:04 AM
#8
Hyperactive Member
Re: VB6.0 slow
Objects on a form are easier to make new copies of if you use the Index property. For instance:
vb Code:
Dim newTBox As Integer newTBox = UBound(Text1()) + 1 Load Text1(newTBox) Text1(newTBox).Text = CStr(newTBox)
-
May 29th, 2009, 06:08 AM
#9
Thread Starter
Fanatic Member
Re: VB6.0 slow
Thanks deathfxu .
Definitely i will try this code..
But what about my existing projects/forms, can i reduce time for making exe ?
WHETHER YOU SUCCEED OR FAIL IS NOT AS IMPORTANT AS WHETHER YOU TRIED YOUR BEST 
-
May 29th, 2009, 06:15 AM
#10
Hyperactive Member
Re: VB6.0 slow
Then you can have a global collection which keeps track of what each new form is supposed to be. Like this:
vb Code:
'in a module Global FormPurpose As New Collection 'in the form code Dim FormNum As Integer Dim MyPurpose As Integer Private Sub Form_Load() FormNum = Forms.Count MyPurpose = FormPurpose.Item(FormNum) Select Case MyPurpose Case 1 'first layout 'generate form objects via code 'set their default values 'place them in desired locations on form Case 2 'second layout 'etc End Select End Sub Private Sub cmdNew_Click() Dim imaNew As Form FormPurpose.Add "7" Set imaNew = New Form1 Load imaNew imaNew.Show End Sub
This is just a basic concept so you can get an idea of how it can be done.
Good luck!
-
May 29th, 2009, 06:16 AM
#11
Hyperactive Member
Re: VB6.0 slow
With more dlls and less objects created by ui (because they are being created with code), the time for making an exe should be drastically faster.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|