Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

Make a DOS-like textbox user control

$
0
0

I want to write a dos-like usercontrol (i mean, the flashing _ caret)

I wrote a usercontrol that contains a textbox and it will expanding when user enter text into it and follow by a dos-like flashing caret outside the textbox. But the problem is when I press arrow keys (←, and →) it show off this fake textbox (the real caret moves inside between the text - I have hide the caret using a function in user32.dll but the flashing caret does not move in!)

And the final solution is: 

1. Create the totaly new textbox with code (diffcult - i won't go this way)

2. Draw on textbox (Seems easier, but textbox doesn't have paint event)

So how can I draw on textbox, in front of the text? Or any advices for this?


Call me Zenocoding


Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>