Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 1st, 2006, 12:35 AM
Friend of Wrox
 
Join Date: Mar 2005
Location: , , .
Posts: 264
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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

Reply With Quote
  #2 (permalink)  
Old July 3rd, 2006, 03:46 PM
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

What is an "external listview item?"
Reply With Quote
  #3 (permalink)  
Old July 3rd, 2006, 10:42 PM
Friend of Wrox
 
Join Date: Mar 2005
Location: , , .
Posts: 264
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.

Reply With Quote
  #4 (permalink)  
Old July 5th, 2006, 01:00 PM
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

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.
Reply With Quote
  #5 (permalink)  
Old July 5th, 2006, 04:34 PM
Friend of Wrox
 
Join Date: Mar 2005
Location: , , .
Posts: 264
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

Reply With Quote
  #6 (permalink)  
Old July 5th, 2006, 08:12 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Alameda, ca, USA.
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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...
Reply With Quote
  #7 (permalink)  
Old July 5th, 2006, 08:15 PM
Friend of Wrox
 
Join Date: Mar 2005
Location: , , .
Posts: 264
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

Reply With Quote
  #8 (permalink)  
Old July 6th, 2006, 12:34 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Alameda, ca, USA.
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.
Reply With Quote
  #9 (permalink)  
Old October 20th, 2006, 07:01 PM
Registered User
 
Join Date: Oct 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change color of items in a ListView eresina Pro VB 6 6 September 15th, 2016 05:09 PM
change the color of selected text dynamically NEO1976 Flash (all versions) 1 December 18th, 2007 11:11 AM
How to change the color of selected row of an HTML bhavna HTML Code Clinic 4 February 11th, 2007 09:22 PM
How to get selected item from listview? try.test.abc C# 1 January 4th, 2007 02:34 AM
Listview doesnt change after items are selected. hexOffender VB.NET 2002/2003 Basics 0 December 13th, 2006 12:28 PM



All times are GMT -4. The time now is 10:04 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.