15.07.2013 Views

Microsoft Visual Basic - Encyclopaedia Gentium Boni

Microsoft Visual Basic - Encyclopaedia Gentium Boni

Microsoft Visual Basic - Encyclopaedia Gentium Boni

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

frmAutomatos - 1<br />

Private Const EM_CHARFROMPOS& = &HD7<br />

Private Type POINTAPI<br />

x As Long<br />

y As Long<br />

End Type<br />

Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" _<br />

(ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, _<br />

lParam As Any) As Long<br />

Public Function RichWordOver(rch As RichTextBox, x As Single, y As Single) As String<br />

Dim pt As POINTAPI<br />

Dim pos As Integer<br />

Dim start_pos As Integer<br />

Dim end_pos As Integer<br />

Dim ch As String<br />

Dim txt As String<br />

Dim txtlen As Integer<br />

pt.x = x \ Screen.TwipsPerPixelX<br />

pt.y = y \ Screen.TwipsPerPixelY<br />

pos = SendMessage(rch.hwnd, EM_CHARFROMPOS, 0&, pt)<br />

If pos = "0" And ch = "a" And ch = "A" And ch = "0" And ch = "a" And ch = "A" And ch

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!