各位高手:
    您好,我是VB新手,现请教各位高手一个初级问题:
    如何将运用picture1.print"您好!"类似这样语句编写的在pictureBox内显示的复杂文本用鼠标右键加以复制到text.box?或利用其他办法复制?或者有什么更好的办法加以解决?谢谢!

解决方案 »

  1.   

    图片里面的文字要用OCR软件才能识别。
      

  2.   

    谢谢liujingxiong(北极熊)的帮助,我的意思是在利用VB编程过程中间接或直接将复杂文本显示在文本框内,以利于复制,或利用其他办法加以解决。
      

  3.   

    你可以试试用以下的API函数来试试
    Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
    Private Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long
    Private Sub Form_Activate()
        Dim MyStr As String
        'Create a buffer
        MyStr = String(100, Chr$(0))
        'Get the windowtext
        GetWindowText Me.hwnd, MyStr, 100
        'strip the rest of buffer
        MyStr = Left$(MyStr, InStr(MyStr, Chr$(0)) - 1)
        'Triple the window's text
        MyStr = MyStr + MyStr + MyStr
        'Set the new window text
        SetWindowText Me.hwnd, MyStr
    End Sub
      

  4.   

    请在PICTURE控件上放置一个LABEL控件,把LABEL的BackStyle属性设为0(透明),然后将文字显示在LABEL控件中,就可以了
      

  5.   

    sorry,把上面代码中的Me.hwnd换成picture1.hwnd
      

  6.   

    zhysecond(太阳伞) 方法肯定不行,事实上楼主的这个问题很复杂,涉及到模式识别问题,想简单一点的话,就找一个ocr控件吧
      

  7.   


    Print是栅格化了的文字,没办法获得,只有OCR