Results 1 to 2 of 2

Thread: Controld

  1. #1

    Thread Starter
    Hyperactive Member Amon Ra's Avatar
    Join Date
    Feb 2001
    Location
    In some cave on Uranus...
    Posts
    500

    Question Controld

    I want to write a cd player in VB. I have custom controls. i want to have a access-bar from which you can access any song by clicking the corresponding button, but how can I add the corresponding number of buttons depending on the number of songs? So, how can I add or remove controls at runtime?
    Amon Ra
    The Power of Learning.

  2. #2
    Member
    Join Date
    Aug 2000
    Location
    Florida
    Posts
    45

    add control at runtime

    Try something like...


    for i = 0 to iSongCount - 1
    Set cmdButton = Controls.Add("VB.CommandButton", "cmdButton")
    With cmdButton
    .Caption = "&Main Menu"
    .Left = 500
    .Top = 100
    .Width = 2000
    .Visible = True
    End With
    If I could only remember my name...

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