[摘要]*.cur" openFileDialog1.Title = "Select a Cursor File" ' Show the Dialog. ' I...
*.cur"
openFileDialog1.Title = "Select a Cursor File"
' Show the Dialog.
' If the user clicked OK in the dialog and
' a .CUR file was selected, open it.
If openFileDialog1.ShowDialog() = DialogResult.OK Then
If openFileDialog1.FileName <> "" Then
' Assign the cursor in the Stream to the Form's Cursor property.
Me.Cursor = New Cursor(openFileDialog1.OpenFile())
End If
End If
End Sub
// C#
private void button1_Click(object sender, System.EventArgs e)
{
// Display an OpenFileDialog so the user can select a Cursor.
OpenFileDialog openFileDialog1 = new OpenFileDialog();
openFileDialog1.Filter = "Cursor Files
关键词:ASP.NET窗体对话框的完成