![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Professional Programmer
|
Little help with ListView Boxes
Hey yall. In my newer version of download blocker, I decided to add a Personal Block Settings option, for users to add their own custom programs to block. What I have is this, I have all the open windows in a listview box. Then I would like to it to where when I select the items in the listviewbox, it will tell their classname and iwndow title in textboxes. here is the code I am using
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim whPoint = WindowFromPoint(Cursor.Position.X, Cursor.Position.Y)
GetClassName(whPoint, clsName, Len(clsName))
GetWindowText(whPoint, wText, Len(wText))
txtclass.Text = clsName 'GetClassName(whPoint, clsName, 0)
txtapptext.Text = wText
End SubThe Dim whPoint = WindowFromPoint(Cursor.Position.X, Cursor.Position.Y) Dim whPoint = Listview1.selecteditems GetClassName(whPoint, clsName, Len(clsName)) So please help
__________________
Forgiveness is the fragrance that the violet sheds on the heal that has crushed it. - Mark Twain Destruction leads to a very rough road, but it also breeds creation. |
|
|
|
|
|
#2 |
|
Hobbyist Programmer
|
I have an idea for you, here is what I would do.
Since your listview contains a collection of all open windows already, why not also have your listview store each window's handle in the item tag like so. vbnet Syntax (Toggle Plain Text)
now, when a user clicks on the listview item, retrieve that item's tag(the corresponding window handle), and then put the value in whPoint. I believe this is what you wanted to know but maybe that is not where you were having the trouble? let me know. good luck
__________________
I have never let my schooling interfere with my education. -Mark Twain- Xbox live gamertag: melbolt |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Various ListView questions | Eleo | C# | 6 | Feb 16th, 2006 11:32 PM |
| Listview Scroll | tayspen | C# | 3 | Nov 27th, 2005 2:36 PM |
| ListView foreach subitem | tayspen | C# | 2 | Nov 25th, 2005 8:49 PM |
| creating a multiplication table in a ListView control | awdboxer | Visual Basic .NET | 4 | Jun 21st, 2005 2:59 PM |