Transparent Textbox and some other things !!!
Hi all,
I am new here and i am new in VB.net programming.
I just start with making one new program with really special design (because i am web designer) and i use Border style: None on my FORM and I using one image in background (my design of form). So my first problem is that my BACKGROUND image have sphere shapes on some places and when i making design in PhotoShop i save every image to .png but i have problem. Edges of that sphere parts are really pixelized and work look really bad... So my first question is:
1.) What is best TransparencyKey color for my FORM ??? (When I making image I saving it as PNG and my background of image is transparent)
If PNG is not good way please could someone tell me which is best ???
My sec. problem is that I need transparent Textboxes (and some other controls but for now Textboxes)...
So i try with some thing what i find on google but nothing is not really good at all. Best result i get with "Alpha text box" Class what i find on CodeGuru, but really bad quality of text and some options (like Read Only) dont work...
So...
2.) What is best way for transparent TextBoxes in VB.net (i need to see my FORM Background image through textbox) ???
Sry for my bad English...
Thanks in advice,
Stefan
Re: Transparent Textbox and some other things !!!
Any idea ??? I really need it quick
Re: Transparent Textbox and some other things !!!
I can tell you how to set the transparency for the textbox, but the rest you will have to do yourself.
Code:
Public Class TextBoxEx
Inherits TextBox
Public Sub New()
MyBase.New()
SetStyle(ControlStyles.UserPaint, True)
SetStyle(ControlStyles.SupportsTransparentBackColor, True)
Me.BackColor = Color.Transparent
End Sub
End Class
But when you set the UserPaint control style, you would need to handled the graphics yourself. Otherwise it would start acting weirdly. You can override the OnPaint etc. methods to make it work correctly. But I'm not sure how exactly to do that (I'm really bad at graphics, so maybe someone else would be able to help you out with that.)
Re: Transparent Textbox and some other things !!!
I find this...
LINK
But when I using RichTextbox it is really bad (no refreshing), but when I using textbox it is good but have some big BUG-s (like incorrect cursor position, cursor is showing in reallyonly textbox...etc...)
Can anybody correct this or give me good link for DLL with best RichTextBox Transparent integration ???
(I trying to find it now ;))
Thanks in advice
and Thanks Pradeep ;)
Re: Transparent Textbox and some other things !!!