Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change control BG color on focus

Status
Not open for further replies.

LakotaMan

Instructor
Aug 21, 2001
240
US
Hi All,

Using version 2007, I have a form with several text boxes on it. Because I have a background graphic, I've set the BG style to transparent via the

properties sheet in design. However, whenever I cursor into one of the textboxes, the BG goes white. I want it to stay transparent. Code I've used in

previous versions to accomplish this is not working here:

On GotFocus:
Code:
CurControl.Background=0

I've also tried this on the OnEnter and BeforeUpdate events, doesn't work.

Any ideas about how to do this, or why my methods aren't working?

Once I figure out the code/event that works, I'll write a General Procedure to cover all the controls.

Thanks for your help.
TWD
 
I'd use this:
CurControl.BackStyle = 0

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Rats, even though that should have worked, it didn't.


 
I don't think there's any way to keep the control's background transparent when it has the focus. Probably the best you can do is set CurControl.BackColor to a color that harmonizes with your background graphic.

 

This question has been thrashed around over and over again, and I'm afraid the answer is always the same as Lisa's! The textbox will not be transparent when it has focus.

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
I was afraid of that, but thanks to all for your help.

I will do as Lisa suggests.

TWD
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top