Controlling a text box 
Author Message
 Controlling a text box

I need to control a text box because a need to control a special input. To
do that a need to know where is the cursor current position. For example if
this ?special? text box have the property MaxLength=10 , I need to know if
the cursor is positioned in the first, second, ., last character.

Please help me. It's very urgent.

Thanks in advance.



Wed, 09 Mar 2005 02:49:23 GMT  
 Controlling a text box
Check the boxes SelStart property. That'll return the 0 based cursor
position.

--
Ken Halter - MS-MVP-VB - Please keep it in the groups..
http://www.vbsight.com - http://www.vbsight.com/MultiColumn.htm
New Tabbed Dialog http://www.vbsight.com/TBGDialogCTL.htm


Quote:
> I need to control a text box because a need to control a special
> input. To do that a need to know where is the cursor current
> position. For example if this ?special? text box have the property
> MaxLength=10 , I need to know if the cursor is positioned in the
> first, second, ., last character.

> Please help me. It's very urgent.

> Thanks in advance.



Wed, 09 Mar 2005 03:03:58 GMT  
 Controlling a text box
Ken,

Maybe my problem isn't subclassing after all.  Is there any reason why I
wouldn't be able get the WM_DRAWITEM messages routed to my custom WidowProc
routine?  I have subclassed the form, set the style of the TabStrip to
TCS_OWNERDRAWFIXED, yet no drawing messages are coming into the procedure.
The tabs are not being drawn, so the style has been set properly.  Now if I
can just get the message routed so that I can paint them :-)

Rick



Wed, 09 Mar 2005 03:42:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. formatting rows and columns in unbound data control, rich text box control, or listbox control

2. Data control and text box

3. help dbgrid, data control and text box

4. Rich Text Box or text box control

5. Uloading a Control Array text boxes on "Resize" event.

6. Text box text on new page text box

7. VBA controls (Text boxes, check boxes, etc)

8. Using dataCombo Boxes to control Text Boxes

9. Vb 4.0 Problems updating Text Boxes from Combo Box linked to Data Control

10. help on the text box/edit box control

11. newbie Q: text box control on a custom dialog box form

12. Text box control: storing a large amounf of text

 

 
Powered by phpBB® Forum Software