文件对话框 过滤器使用

来源:互联网 发布:电脑版淘宝登录首页 编辑:程序博客网 时间:2024/06/08 06:54
Private Sub Button1_Click(ByVal sender As System.Object, _   ByVal e As System.EventArgs) Handles Button1.Click   ' Displays an OpenFileDialog so the user can select a Cursor.   Dim openFileDialog1 As New OpenFileDialog()   openFileDialog1.Filter = "Cursor Files|*.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     ' Assign the cursor in the Stream to the Form's Cursor property.     Me.Cursor = New Cursor(openFileDialog1.OpenFile())   End IfEnd Sub
0 0
原创粉丝点击