• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 165
  • Last Modified:

Create any controls on real-time

Could it possible to create any contro, such as picture box control, on real-time (i mean after program is running)?
and how it do that? thank you...
1 Solution
Option Explicit

Private WithEvents picObj As PictureBox

Private Sub Form_Activate()
    picObj.Print "New Picture Box"
End Sub

Private Sub Form_Load()
   Set picObj = Controls.Add("VB.PictureBox", "picObj")
   With picObj
      .Visible = True
      .Width = 3000
      .Top = 1000
      .Left = 1000
   End With
End Sub
mrvithanAuthor Commented:
dear Juilette
   thank you a lot to your answer... but i have one more qyestion... can i create a arroy to handle a set of control.... and
how can i do that?

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now