请教高手:
  如何动态?
也就是我在一客户区用API的textout写入一个文字,希望Mousemove时,文字跟着鼠标而动?

解决方案 »

  1.   

    用个LABEL吧   然后在移动事件中
    Label1.Move X, Y
      

  2.   

    Private Declare Function TextOut Lib "gdi32" Alias "TextOutA" (ByVal hdc As Long, ByVal X As Long, ByVal Y As Long, ByVal lpString As String, ByVal nCount As Long) As Long
    Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
    Private Type POINTAPI                
        X As Long
        Y As Long
    End Type
    Dim Point1 As POINTAPIPrivate Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
        Form1.Cls
        str1 = "I love you"
        GetCursorPos Point1
        TextOut Form1.hdc, Point1.X, Point1.Y, str1, Len(str1)
    End Sub
      

  3.   

    TO  appleWanter(苹果)很明显  老马是被我的方法弄无语了  挖哈哈