Click here to Skip to main content
15,914,074 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Color Coding Text Pin
mtone26-Apr-04 7:23
mtone26-Apr-04 7:23 
GeneralRe: Color Coding Text Pin
Aaron Eldreth26-Apr-04 15:28
Aaron Eldreth26-Apr-04 15:28 
GeneralRe: Color Coding Text Pin
mtone27-Apr-04 4:19
mtone27-Apr-04 4:19 
GeneralRe: Color Coding Text Pin
Aaron Eldreth27-Apr-04 16:36
Aaron Eldreth27-Apr-04 16:36 
QuestionFormatting text as the user types - how? Pin
N.T.Gopalakrishnan23-Apr-04 2:42
N.T.Gopalakrishnan23-Apr-04 2:42 
AnswerRe: Formatting text as the user types - how? Pin
Aaron Eldreth24-Apr-04 17:07
Aaron Eldreth24-Apr-04 17:07 
GeneralRe: Formatting text as the user types - how? Pin
N.T.Gopalakrishnan25-Apr-04 17:59
N.T.Gopalakrishnan25-Apr-04 17:59 
GeneralRe: Formatting text as the user types - how? Pin
Aaron Eldreth27-Apr-04 16:47
Aaron Eldreth27-Apr-04 16:47 
"I need to find the current caret position of the last character typed."

Ok, I understand now. Your first post wasn't very clear on what you needed. For finding the Caret position, there is an API call GetCaretPos().

Public Declare Function GetCaretPos Lib "user32" (ByRef pt As System.Drawing.Point) As Integer

And it is used like this:
VB
<br />
Dim pt as System.Drawing.Point<br />
<br />
GetCaretPos(pt)<br />
<br />
Msgbox("The cursor is at X:" & pt.X & " Y:" & pt.Y)<br />


Basically, since the API call uses a ByRef variable, the variable passed to GetCaretPos() holds the X, and Y location of the cursor.

Another API function I think you'll find useful is SetCaretPos

Public Declare Function SetCaretPos Lib "user32" (ByVal x As Integer, ByVal y As Integer) As Integer

Hope this helps!

Aaron Eldreth

TheCollective4.com
My Articles

While much is too strange to be believed,
Nothing is too strange to have happened.
- T. Hardy
QuestionHow to make an Event Calendar in Windows Application by using vb.net ? Pin
rG8223-Apr-04 1:54
rG8223-Apr-04 1:54 
GeneralRandom Access Files Pin
Pickerd23-Apr-04 0:08
Pickerd23-Apr-04 0:08 
Generalwhy o why.. Pin
Anonymous22-Apr-04 23:38
Anonymous22-Apr-04 23:38 
GeneralRe: why o why.. Pin
Dave Kreskowiak23-Apr-04 0:00
mveDave Kreskowiak23-Apr-04 0:00 
GeneralDumb question... Pin
Halonix22-Apr-04 16:21
Halonix22-Apr-04 16:21 
GeneralRe: Dumb question... Pin
Mike Ellison22-Apr-04 17:37
Mike Ellison22-Apr-04 17:37 
GeneralUsing the property browser Pin
PaleyX22-Apr-04 11:59
PaleyX22-Apr-04 11:59 
GeneralClosing a form during create handle Pin
maf66622-Apr-04 9:53
maf66622-Apr-04 9:53 
GeneralRe: Closing a form during create handle Pin
Charlie Williams22-Apr-04 10:39
Charlie Williams22-Apr-04 10:39 
QuestionCan events be shared? Pin
PaleyX22-Apr-04 9:47
PaleyX22-Apr-04 9:47 
AnswerRe: Can events be shared? Pin
Charlie Williams22-Apr-04 10:23
Charlie Williams22-Apr-04 10:23 
GeneralRe: Can events be shared? Pin
PaleyX22-Apr-04 11:56
PaleyX22-Apr-04 11:56 
GeneralPublic Property Pin
XGaMeS22-Apr-04 8:57
XGaMeS22-Apr-04 8:57 
GeneralRe: Public Property Pin
Charlie Williams22-Apr-04 10:27
Charlie Williams22-Apr-04 10:27 
GeneralRe: Public Property Pin
XGaMeS23-Apr-04 5:10
XGaMeS23-Apr-04 5:10 
GeneralVBScript Pseudo-Reflection(?) [modified] Pin
MStanbrook22-Apr-04 8:47
MStanbrook22-Apr-04 8:47 
GeneralRe: VBScript Pseudo-Reflection(?) Pin
Dave Kreskowiak22-Apr-04 23:44
mveDave Kreskowiak22-Apr-04 23:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.