 |
VB How-To Ask your "How do I do this with VB?" questions in this forum. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|

July 1st, 2006, 12:35 AM
|
Friend of Wrox
|
|
Join Date: Mar 2005
Posts: 264
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
How to change color of selected external listview
could any one show me how i can change the color of selected external listview item to a color i specify.Thanks
|

July 3rd, 2006, 03:46 PM
|
Friend of Wrox
|
|
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
|
|
What is an "external listview item?"
|

July 3rd, 2006, 10:42 PM
|
Friend of Wrox
|
|
Join Date: Mar 2005
Posts: 264
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
quote:Originally posted by BrianWren
What is an "external listview item?"
|
well external listview is an listview in diffrent program. A program that i do not have its source code. There is this application that has listview on it and i want to change color of one of its item which is already selected. The default color is black an i want to change it to orange for example. I hope an expert show me how to do it. The item is already selected and all i want to change the text of that selected item.
|

July 5th, 2006, 01:00 PM
|
Friend of Wrox
|
|
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
|
|
Without knowing what that control was named by the person who wrote the program (which would require the source code, which you say that you don't have) this will be about impossible. There might be a set of APIs that allow you to retrieve the name of the active control of the window that has the focus, but Iâm doubtful.
|

July 5th, 2006, 04:34 PM
|
Friend of Wrox
|
|
Join Date: Mar 2005
Posts: 264
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
quote:Originally posted by BrianWren
Without knowing what that control was named by the person who wrote the program (which would require the source code, which you say that you don't have) this will be about impossible. There might be a set of APIs that allow you to retrieve the name of the active control of the window that has the focus, but Iâm doubtful.
|
It is very possible . I already managed to select and highlight any listview item i want but i do not know how to change its color.we can change caption of any window we want knowing its class name so changing color should not be more difficult. But could u tell me what u mean by controle name ? since i might be able to find that some how.Thanks
|

July 5th, 2006, 08:12 PM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
It is not possible to select the color for a sigle item of the ListView control, regardless if the listView is internal to your project or belonging to another application. Well, unless you subclass the window of course, but I wouldn't do it...
|

July 5th, 2006, 08:15 PM
|
Friend of Wrox
|
|
Join Date: Mar 2005
Posts: 264
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
quote:Originally posted by marcostraf
It is not possible to select the color for a sigle item of the ListView control, regardless if the listView is internal to your project or belonging to another application. Well, unless you subclass the window of course, but I wouldn't do it...
|
could u teach me how to subclass the window that holds that listview ? i realy want to learn this. Thanks
|

July 6th, 2006, 12:34 PM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
quote:
could u teach me how to subclass the window that holds that listview ? i realy want to learn this. Thanks
|
take a look at this:
http://www.experts-exchange.com/Prog..._10142124.html
I did not try the code, but the idea is that. If you google for "vb6 subclass" you'll find tons of other examples.
|

October 20th, 2006, 07:01 PM
|
Registered User
|
|
Join Date: Oct 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
How you did it?I am trying to read title of active window. But if it is outlook window, I want to read email currently selected..how I can do that? pl help.
Quote:
quote:Originally posted by method
Quote:
quote:Originally posted by BrianWren
|
Quote:
Without knowing what that control was named by the person who wrote the program (which would require the source code, which you say that you don't have) this will be about impossible. There might be a set of APIs that allow you to retrieve the name of the active control of the window that has the focus, but Iâm doubtful.
|
It is very possible . I already managed to select and highlight any listview item i want but i do not know how to change its color.we can change caption of any window we want knowing its class name so changing color should not be more difficult. But could u tell me what u mean by controle name ? since i might be able to find that some how.Thanks
|
|
|
 |