![]() |
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.TickThe :
Dim whPoint = WindowFromPoint(Cursor.Position.X, Cursor.Position.Y):
Dim whPoint = Listview1.selecteditems:
GetClassName(whPoint, clsName, Len(clsName))So please help |
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. :
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 |
| All times are GMT -5. The time now is 8:08 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC