473,669 Members | 2,492 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 1222
Hi,

Add this in sub new for your class

Me.SetStyle(Con trolStyles.User Paint, True)

Ken
---------------------
"Chris" <no@spam.com> wrote in message
news:OA******** ******@TK2MSFTN GP12.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
3008
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 than left-justified printing for this project. PyCDC.DrawText appears to offer what I need, but the doc at:
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 getting shifted to the right by 3 pixels for some reason. Everything else matches. I am creating my fonts under C# .NET in a way that should produce the same results as I am getting under C++ with the Win32 GDI API:
1
1553
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
1675
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 to recognize the one I want? Any help would be greatly appreciated. DF
2
4889
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 this name exist in class 'Microsoft.DirectX.Direct3D.Font' How is that possible? Here is a VB.NET example:
0
2488
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 Graphics to achieve this. But with Graphics, I am not sure how I can make them diabled. Below are my codes:
3
5405
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 I'd rather do it like Microsoft Dynamics does and use separate textbox and lookup button. What I have is, simply, is a C# winform, a textbox and a pushbutton. On the textbox, on the validating event of the textbox I check my customer table...
1
1692
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? Greets sirithvasa
0
3705
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 -t watermarktext' -acodec mp3 -ab 32 - ac 1 -ar 44100 outputfile.flv") I did notice when i copied the above with out the exec() in my shell
0
8465
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8383
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8895
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8809
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8588
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6210
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4206
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2032
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1788
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.