When the going gets weird the weird turn pro
last article table of contents next article

Strange Article - Optimizing your vb applications by Alco paul

This will be a short one...


1.) When you program a vb worm, don't add icons coz icons adds to the program's disk space..
2.) Compiling projects to P-code saves a lot of disk space than compiling to N-code..

Begin VB.Form Form1
    Caption  =  "Form1"
    ClientHeight  =  3195
    ClientLeft  =  60
    ClientTop  =  345
    ClientWidth  =  4680
    LinkTopic  =  "Form1"
    ScaleHeight  =  3195
    ScaleWidth  =  4680
    StartUpPosition  =  3 'Windows Default
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
MsgBox "hello world"
Unload Me
End Sub

*** This form, when compiled to P-code, will produce a 12,288 byte executable file which is comparably smaller than that of the one produced by compiling to N-code,
which takes up 16,384 bytes of disk space...

*** Changing the compilation configuration...
Click File then choose Make anyname.exe..
You'll see a dialog prompting you to enter the executable name of the file that will be compiled..
Choose Options then click Compile...
You'll see an option there whether you want your code to be compiled to P-code or N-code...

3.) Use a PE compressor...
By far and based from personal experiments, UPX compresses files efficiently and generates smaller code compared to other PE compressors...

Hope that this helps....