Results 1 to 2 of 2

Thread: Create new Object

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 1999
    Location
    Preddvor, SI, Slovenia
    Posts
    18
    Hi
    I would like to create a new Label object in run time(on blank form), but I don't know how to do it. Please, help. Thanks!

    Jure

  2. #2
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    [code]
    Option Explicit

    Private WithEvents btnObj As Label

    Private Sub Form_Load()
    Set btnObj = Controls.Add("VB.Label", "btnObj")
    With btnObj
    .Visible = True
    .Width = 2000
    .Caption = "Hello"
    .Top = 1000
    .Left = 1000
    .BackColor = vbRed
    .ForeColor = vbWhite
    .FontBold = True
    .FontSize = 14
    End With
    End Sub
    [code]
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width