VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Simple Code to Create a Control Dynamically with events

by Raghu (22 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 19th November 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Simple Code to Create a Control Dynamically with events

API Declarations


'[email protected]
'You Can create any controls with this method
'by declaring a object to the appropriate controls

Public WithEvents Cmd as CommandButton


Rate Simple Code to Create a Control Dynamically with events




Set Cmd = Me.Controls.Add("VB.CommandButton","Command1")

With Cmd
  .Enabled = true
  .top = 2000
  .left = 2000
  .height = 450
  .width = 2500
  .caption = "Click"
  .visible = True
End With

End Sub

Private Sub Cmd_Click()


Download this snippet    Add to My Saved Code

Simple Code to Create a Control Dynamically with events Comments

No comments have been posted about Simple Code to Create a Control Dynamically with events. Why not be the first to post a comment about Simple Code to Create a Control Dynamically with events.

Post your comment

Subject:
Message:
0/1000 characters