Solved

Set color to text on Statusbar

Posted on 1998-11-21
5
315 Views
Last Modified: 2010-05-03
Hi,
  I am trying to set a color to the text displayed on the VB standard Statusbar control. This happens when iam showing  error messages. Does VB have any property to attach color to strings at runtime and display them simulatneously? Pls. help.

Ravicha
0
Comment
Question by:ravicha
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 1

Accepted Solution

by:
alesh earned 20 total points
ID: 1446091
The answer is NO. The status bar control has no colors properties at all. Only way you could do this, perhaps you could call this a workaround but i'm not 100% it will work, is to put a textbox on the status bar, make the background color the same as status's bar and then display error messages in the textbox, which allows you to set font colors.
One thing you would have to be carefull about is the resize of form, but not too much if at all.

Hope this could help you enough.
0
 

Expert Comment

by:vip110598
ID: 1446092
ravicha,
YES their is a very simple way.
Just let me get to work and I will post you the answer.
0
 

Author Comment

by:ravicha
ID: 1446093
Alesh,
Thanks for suggestion. Your idea works but can i tag color to some string and display that in the statusbar, like writing a function  that gives the string the required color. I know it is asking for more but it makes me avoid using any VB controls like textbox on the statusbar. I have only one form that has the statusbar that are used by the others too. Hope you got my point.
0
 

Author Comment

by:ravicha
ID: 1446094
Alesh,
Thanks for suggestion. Your idea works but can i tag color to some string and display that in the statusbar, like writing a function  that gives the string the required color. I know it is asking for more but it makes me avoid using any VB controls like textbox on the statusbar. I have only one form that has the statusbar that are used by the others too. Hope you got my point.
0
 

Author Comment

by:ravicha
ID: 1446095
Vip,
I am waiting for your answer.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

734 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