Value of type 'Cursor' cannot be converted

2019-09-25 04:15发布

I have migrated VB6 to dot net and I am getting:

Value of type 'Cursor' cannot be converted to 'Short'

Here is my code:

Dim intSavePointer As Short ' Save off the MousePointer

' Change the mouse pointer to clue in user of update

intSavePointer = **MyBase.Cursor**(this is the error line of code)

' Change the mouse pointer back

 **MyBase.Cursor** = intSavePointer

How to fix that?

标签: vb.net
1条回答
何必那么认真
2楼-- · 2019-09-25 04:27

Change Dim intSavePointer As Short to Dim savedCursor As Cursor.

A Cursor is not an int. I don't know why it ever worked in VB6, but I've never used that.

查看更多
登录 后发表回答