Results 1 to 3 of 3

Thread: Run Time Controls

  1. #1

    Thread Starter
    Member
    Join Date
    May 2003
    Posts
    53

    Run Time Controls

    Private WithEvents Ctl_Button As CommandButton



    For i = 1 To 6
    CtlName = "Button" & i
    Set Ctl_Button = Me.Controls.Add("VB.CommandButton", CtlName)
    With Ctl_Button

    .Move 2000, 880 + j, 5242, 395
    .Caption = CtlName
    .Visible = True
    End With
    j = j + 400
    Next


    Using this I am creating 6 command buttons at runtime , Now My problem is only the last button's events works the rest remain just controls with now events , I hope that it requires a API function to be written on mouseup event , Please do help me

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Isn't this VB6 Code ? . You should post it in General VB Coding Questions not in VB.NET section .

  3. #3

    Thread Starter
    Member
    Join Date
    May 2003
    Posts
    53
    Yes Sir

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