'Cursor' 类型的值不能转换为 'Short' [英] Value of type 'Cursor' cannot be converted to 'Short'

查看:28
本文介绍了'Cursor' 类型的值不能转换为 'Short'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经将 VB6 迁移到了 dot net 并且我得到了:

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

'Cursor' 类型的值不能转换为 'Short'

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

这是我的代码:

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

如何解决这个问题?

推荐答案

Dim intSavePointer As Short 更改为 Dim savedCursor As Cursor.

Cursor 不是 int.我不知道为什么它在 VB6 中有效,但我从未使用过.

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

这篇关于'Cursor' 类型的值不能转换为 'Short'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆