瑞星卡卡安全论坛技术交流区系统软件 这种方法添加的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
 

这个要用到
Delegate委托,查找一下帮助 

ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio.v80.chs/dv_fxfund/html/42afade7-3a02-4f2e-868b-95845f302f8f.htm
gototop
 
1   1  /  1  页   跳转
页面顶部
Powered by Discuz!NT