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 If End Sub
文件对话框 过滤器使用
最新推荐文章于 2021-07-21 09:47:31 发布