VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Dynamically Added Objects

CJ Schaff  (1 Submission)   Miscellaneous   Visual Basic 3.0   Intermediate   Wed 3rd February 2021

This short, simple code allows the addition of objects into a container on another form (in this case a PicturBox). It can easily be modified to add the object to different locations by modifying the locations in the dynObject() function.

Inputs
Create 2 forms. Add a CommandButton to Form1, and add a PictureBox for Form2.

Returns
Pressing the first Command1 loads a label on Form2 in the picture box and a command button on Form1. Pressing the new command button will activate a message box.

Side Effects
Pressing Command1 again will cause an error which should be handled in an actual application.

Rate Dynamically Added Objects (3(3 Vote))
Dynamically Added Objects.bas

Dynamically Added Objects Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters