473,511 Members | 15,630 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Textbox DrawText event?

What event do I override to handle drawing the text in a textbox myself.
I have tried to use the OnPaint method, but it doesn't seem to effect
the drawing of the text.

Thanks
Chris
Nov 21 '05 #1
1 1218
Hi,

Add this in sub new for your class

Me.SetStyle(ControlStyles.UserPaint, True)

Ken
---------------------
"Chris" <no@spam.com> wrote in message
news:OA**************@TK2MSFTNGP12.phx.gbl...
What event do I override to handle drawing the text in a textbox myself.
I have tried to use the OnPaint method, but it doesn't seem to effect
the drawing of the text.

Thanks
Chris
Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3005
by: Conrad | last post by:
Greetings, I have some simple printing I need to do from Python on Windows, so I opted for the excellent PyCDC methods. I got stumped when I realized that I actually needed something other...
1
1308
by: DrDevious | last post by:
Maybe I am doing something wrong but has anyone else here noticed a difference in the positioning of text between the Graphics.DrawString method and the Win32 GDI DrawText function? My text is...
1
1550
by: Chris | last post by:
What event do I override to handle drawing the text in a textbox myself. I have tried to use the OnPaint method, but it doesn't seem to effect the drawing of the text. Thanks Chris
7
1670
by: DF | last post by:
DrawText is overloaded - one of which accepts a ByVal rect and the other accepts a ByRef rect. I get a "no accessible 'DrawText' is most specific" error. How can I resolve this problem by forcing VB...
2
4881
by: Alex C. Barberi | last post by:
I'm using VB.NET 2005 and DX9 SDK (Apr 2006). I created an instance of the Direct3D.Font, and when I try to call DrawText it says: 'DrawText' is ambiguous because multiple kinds of members with...
0
2475
by: sunny076 | last post by:
Hi, I am having difficulties creating a derived class for DisabledDataGridViewTextBoxColumn and cell when the VisualStyle is not supported. Basically I am down to either using ControlPaint or...
3
5391
by: Patrick [MSFT] | last post by:
Let me preface this with the goal I'm trying to achieve is mimic a feature of another language (Dexterity used by Microsoft Dynamics) and so while a filling a drop down list is a workable solution...
1
1682
by: sirithvasa | last post by:
Hi there, I've the problem, that the DrawText function cover the below graphic elemets, so it isn't transparent. Is there any way, to get the printout of the DrawText function transparent? ...
0
3696
by: MrT | last post by:
Hi there, I was just wondering if anyone had any ideas why this doesn't work on a php page! exec("/usr/bin/ffmpeg -i Movie.avi -vhook 'lib/vhook/drawtext.so -f fonts/tahomabd.TTF -x 10 -y 10...
0
7138
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7353
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7418
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7075
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7508
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5662
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5063
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3212
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.