高手们:
想要有一个同“设计模式”下一样的工具栏,可以在程序打包(.exe)后,也可以向目标窗体上拖放控件,让控件也像设计时,有控制点,可以拖大小,位置等。
万分感谢!!!

解决方案 »

  1.   

    相当于动态添加控件
    Option ExplicitPrivate WithEvents NewButton As CommandButton
    Private Sub Command1_Click()
        If NewButton Is Nothing Then
            Set NewButton = Controls.Add("VB.CommandButton", "cmdNew", Frame1)
            'NewButton.Move Command1.Left Command1.Width + 240,Command1.Top
            NewButton.Move 20, 20
            NewButton.Caption = "New Button"
            NewButton.Visible = True
        End If
    End Sub
    Private Sub Command2_Click()
    Form1.Controls.Remove NewButton
    End SubPrivate Sub NewButton_Click()
        MsgBox "New button clicked"
    End Sub
      

  2.   

    楼上的兄弟,我也要一份
    [email protected]
    谢谢
      

  3.   

    大哥们,给我发一份吧!
    [email protected]