VB.NET将任意图像文件设置为鼠标形状

时间:2016-05-23 14:01:08
【文件属性】:

文件名称:VB.NET将任意图像文件设置为鼠标形状

文件大小:494B

文件格式:TXT

更新时间:2016-05-23 14:01:08

VB.NET

VB.NET 代码 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim fd As OpenFileDialog = New OpenFileDialog() fd.Filter = "图像文件(*.jpg;*.gif;*.png)|*.jpg;*.gif;*.png" If fd.ShowDialog() = Windows.Forms.DialogResult.OK Then Dim fn As Image = Image.FromFile(fd.FileName) Dim bitmap As New Bitmap(fn) Dim handle As IntPtr = bitmap.GetHicon() Dim myCursor As New Cursor(handle) Me.Cursor = myCursor End If End Sub


网友评论

  • 东西不推荐下,而且10分,关键是我回复了后怎么只返回了我1分,已经很多这种情况了,是怎么回事管理员