Regarding the system resource when a vb prg is invoked

I have a voucher preparation software sofware running on the local pc, it has around 7 different

forms and on particular form is having more than 50 controls with various validational checks.

when i use the program it is eatting the resource , it is reducing every time it is evoked.

PLEASE LET ME KNOW WHAT I SHOULD DO.

-SHANKAR




Comments

  • : I have a voucher preparation software sofware running on the local pc, it has around 7 different

    : forms and on particular form is having more than 50 controls with various validational checks.

    : when i use the program it is eatting the resource , it is reducing every time it is evoked.

    : PLEASE LET ME KNOW WHAT I SHOULD DO.

    : -SHANKAR


    1. In your shutdown procedure, set each form = nothing:


    close

    Set Form1 = Nothing

    ...........

    Set Form7 = Nothing

    end


    2. Load forms when needed and unload when not needed.


    3. In VB documentation, refer to AutoRedraw property (set to false where possible).


    4. In VB documentation, refer to Cls method.


    5. If any of 50 controls can be a control array, do so.


    6. Use Image control instead of Picture where possible.


    7. Consider Loading Picture files from Disk or from Image Control on a support Form which is loaded and unloaded.


    8. Reclaim memory used by pictures in form, picture box or image control by using LoadPicture with no argument.


    9. Avoid using large dynamic arrays and user-defined types as arguments or local variables. Use module-level or global variables instead of passing arguments to procedures.


    10. Avoid use of Variants.





Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories