Solved

Chang background color on textbox

Posted on 2002-06-21
6
561 Views
Last Modified: 2006-11-17
Hello!

I would like to know how to by using api i can do a similar command to

text1.backcolor=vbred

the problem is i only know a textbox hwnd and i would like to change its back color.
0
Comment
Question by:BlaZer
6 Comments
 
LVL 16

Expert Comment

by:Richie_Simonetti
Comment Utility
hearing...
0
 
LVL 2

Expert Comment

by:priya_pbk
Comment Utility
What exactly do you want to do in yr appln. Could you be more specific. Maybe EE has a better way to do it rather than use an API?

-priya
0
 
LVL 1

Author Comment

by:BlaZer
Comment Utility
well... i use setwindowlong on alot of controls, and i want them to change color on/off focus. If i write it in their own events there is waaay too much code.

so right now i loop all object through in the windowproc till i find one with matching hwnd, then i call obj.backcolor=vbred

but i would very much prefer not to do that loop and just use api.
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 49

Accepted Solution

by:
Ryan Chong earned 250 total points
Comment Utility
If you do to use API to set the BackGround Color of Text Boxes you still need to do a loop, isn't it? I think it's not worth of using APIs to change the BackGround color of Text Boxes as:

1. Vb provided built-in Property BackColor which we can set the background color of textbox.

2. As a programmer, try avoid 'fancy'/ not so important things in our project development.

But agree if we research on how can we do that by using APIs..
0
 
LVL 49

Expert Comment

by:DanRollins
Comment Utility
Hi BlaZer,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept ryancys's comment(s) as an answer.

BlaZer, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 

Expert Comment

by:SpideyMod
Comment Utility
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now