VC++6.0写的程序用到了微软Form 2.0 Label控件的问题。
VC++6.0写的程序用到了微软Form2.0Label控件,生成的执行文件想要放到没有装office的电脑上面运行,请问可以吗?我看到你的问题里面有人说,MSDN中关于...
VC++6.0写的程序用到了微软Form 2.0 Label控件,生成的执行文件想要放到没有装office的电脑上面运行,请问可以吗?我看到你的问题里面有人说,MSDN中关于“Form 2.0”的说明,是不可发布的。意思是不是不装office就不能用啊。我注册了FM2.0也不行。
展开
1个回答
展开全部
'帮你修改了几个地方:'1.修改为一个易读的颜色(16进制网页颜色,每2个一位颠倒如&HFF0000是蓝色(Blue=FF,Green=0,Red=0)而不是红色)'2.修改手型为使用API(直接调用系统手型光标)Private Declare Function SetCursor Lib "user32" (ByVal hCursor As Long) As LongConst oFore As Long = &H0000FFConst lFore As Long = &H0Private Sub Form_Load() Form_MouseMove 0, 0, 0, 0End SubPrivate Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Dim i As Integer For i = Label1.LBound To Label1.UBound: Label1(i).ForeColor = lFore: NextEnd SubPrivate Sub Label1_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single) Dim i As Integer Label1(Index).ForeColor = oFore SetCursor 65581 If Index = Label1.LBound Then For i = 1 To Label1.UBound: Label1(i).ForeColor = lFore: Next ElseIf Index = Label1.UBound Then For i = 0 To Label1.UBound - 1: Label1(i).ForeColor = lFore: Next Else For i = 0 To Index - 1: Label1(i).ForeColor = lFore: Next For i = Index + 1 To Label1.UBound: Label1(i).ForeColor = lFore: Next End IfEnd Sub只要往Label1数组增加元素就可以了 所有元素都将有这种高亮效果4
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询