瑞星卡卡安全论坛技术交流区系统软件 这种方法添加的buton1,怎么写它的事件?

1   1  /  1  页   跳转

这种方法添加的buton1,怎么写它的事件?

这种方法添加的buton1,怎么写它的事件?

'Declare new form and control objects
        Dim form2 As New Form
        Dim lblDate As New Label
        Dim btnCancel As New Button

        'Set label properties
        lblDate.Text = "Current date is: " & DateString
        lblDate.Size = New Size(150, 50)
        lblDate.Location = New Point(80, 50)

        'Set button properties
        btnCancel.Text = "Cancel"
        btnCancel.Location = New Point(110, 100)

        'Set form properties
        form2.Text = "Current Date"
        form2.CancelButton = btnCancel
        form2.StartPosition = FormStartPosition.CenterScreen
       
        'Add new objects to Controls collection
        form2.Controls.Add(lblDate)
        form2.Controls.Add(btnCancel)

        'Display form as a dialog box
        form2.ShowDialog()
最后编辑2006-07-16 20:33:27
分享到:
gototop
 

up
gototop
 
1   1  /  1  页   跳转
页面顶部
Powered by Discuz!NT