473,625 Members | 3,249 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Custom Textbox and onPaint

Hello,
I am trying to customize the appearance of a textbox but with overriding
the onPaint Method it doesn't work!
I have read that drawing of a textbox is done by Windows and not by .Net
and therfore the WndProc method has to be overridden.
Now my question is where to start getting information about this? I
didn't find anyting anywere that explains the basics about it.

Thanks
Ferdinand
Aug 3 '06 #1
0 1395

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

Similar topics

2
2192
by: Jose Michael Meo R. Barrido | last post by:
I made a custom runded rectangle usercontrol. I used a function i found on the internet. the function works fine(see "GetRoundRect" below). I use the fullowing code to make my usercontrol rounded.... ***************************************************** Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs) Dim x1 As Integer = 0 Dim x2 As Integer = Me.ClientSize.Width Dim iHeight As Int32 = Me.Height Dim...
11
6180
by: Sagaert Johan | last post by:
I have made a custom control that draws a rectangle when the mouse is down, and does nothing when the mouse is up. I set/reset a flag in MouseDown/Mouse up and use this to do the drawing in the OnPaint . The recangle draws correct when i press the mouse, but when i release the mouse the background is not restored What should i do in the Onpaint to make sure the background (the form) is restored correctly ? This problem already keeps...
5
9586
by: christian ternek | last post by:
Hello ! I want to make a custom textbox and inherit a custom control from textbox. Now i want to change the looking of the textbox with the following code: protected override void OnPaint(PaintEventArgs e) {
4
5664
by: | last post by:
Please, help. I created my contol, ButtonX, which subclasses System.Forms.Windows.Button class. I am doing my own paiting, by overriding OnPaint and OnPaintBackground (without calling base class's OnPaint & OnPaintBackground). My button has a shape of rectangle with rounded corners and is filled with gradient brush, where user specifies the gradient colors. The dilema I have now is how to paint the button when it's disabled (Enabled =...
8
5069
by: Filipe Marcelino | last post by:
Hi, I'm trying to create a textbox inheriting from the standard textbox. I would like to: 1. repaint the textbox border; 2. define a color for that border; Till now I made this:
4
4595
by: H-S | last post by:
Please help. This is a real puzzler! Originally posted on microsoft.public.dotnet.framework.windowsforms but no answer found! I have a read-only textBox which shows the results of a selection on another form. When the selection changes from the saved data, I wish to show it a different colour. As it is read-only the ForeColor property has no effect.
4
6007
by: giddy | last post by:
hi when i run this class i made here , this is what it looks like without text - http://gidsfiles.googlepages.com/LinedTextBox_1.jpg WITH TEXT (heres the issue) - http://gidsfiles.googlepages.com/LinedTextBox_withText.jpg The text turns BOLD and the lines kinda get erased because of the text. perhaps i could overide or handle the onKeydown or somethin and intercept the text to be entered and then draw it myself. Any suggestions????????
2
3556
by: Martin Arvidsson, Visual Systems AB | last post by:
Hi! I have a textBox on a windows form. Can i overide the textbox OnPaint directly in the form, if so how. Or do i have to inherit the textbox control and overide it there? Regards Martin
2
906
Traveler33
by: Traveler33 | last post by:
I created a custom control which inherited from the control class, I defined new properties and methods and wrote codes in Onpaint() event. I added this control in my project. Now I can use this in design time as well as run time. However,when I added some existing .Net controls such as a TextBox onto my custom control, the TextBox did not show up on the windows form. What else I have to do? Platform: Windows XP SP2 Language: Visual C# 2005...
0
8189
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
8694
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
8635
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
8356
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
6118
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
5570
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4089
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...
0
4193
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.