Articles

Metasploit Framework Windows Tutorial
Remote Desktop Connection
Windows Processes That May Be Dangerous
How-To use NetCat a Tutorial
Common Linux Commands
Common Ports
Netcat Commands
HTTP Response Codes
War-Google Hack Terms
Wardriving
Avoiding Social Engineering and Phishing Attacks
Intrusion Detection on Linux
Linux Intrusion Detection
Penetration Testing Guide
Penetration Testing Tools
Social Engineering Fundamentals, Part I: Hacker Tactics
Social engineering (computer security)
The Psychology of Social Engineering

The Archives

General GSO
GovernmentSecurity.org News & Suggestions
In The News
Open Topic
General Security Information
Trash Can
Exploit & Vulnerability Mailing List Archives
Trial Member Forum
Product and Program Reviews GSO Tutorials
System Security
Windows Systems
Beginners Section
Linux & Unix Systems
File Downloads
Exploit Research & Discussion Trojan & Virus Errata
Networking Security / Firewall / IDS / VPN / Routers
System Hardening
E-Mail Security
Wifi Security
Trial Member Uploads
Upload discovered Trojans & Mal ware
GSO Programming Section
C , C++ , VC++
Visual Basic.NET
Perl /CGI
Java/Javascript
PHP/XML/ASP/HTML
Assembly + Other
The Cork Board
Network Security Consultant Directory
Network Security Jobs
The Archives
Encryption Information
General Network Security
Internet Anonymity
HTTP Protocol Security
Linux Security
MS IIS Information
Exploit Articles
Programming / Tool Design
GSO Software Projects
Public Downloads
Microsoft Security Questions and Papers

Full Version: Listview Problem
ComSec
i have almost completed a program i have made ... system file search and history/temp/cookie analyser... but have one little problem thats giving me a headache

in my Listview box ... i want to click on a selected file located in the search and add it to a textbox

see image: and selected asctrls.ocx... i want to add the file and path to the bottom txt box .... as you can see i have filled it in with the path

i have tried various methods... listview.selectitem.text = text1.text , lstview.ColumnHeader.subitem = text1.text ...and so on

at the moment i have to double click and copy/ paste the file asctrls.ocx to the C:\windows\system32\... if you follow me... i want to click and it adds the file and path to the textbox.... see screenshots: of tool so far....

passi
Hello Comsec,

here's the code you need:
QUOTE
Private Sub ListView1_Click()

sel = ListView1.SelectedItem.Index 'get index of selected item

tmp1 = ListView1.ListItems(sel).SubItems(1) 'get text of the path column
tmp2 = ListView1.ListItems(sel).Text 'get text of the filename column

Text1 = tmp1 & tmp2 'enter values into textbox
End Sub


Greets, passi smile.gif
ComSec
thanks passi i will take a closer look at that code and try a few things out

for the moment i have got it to work via a button click using this code i added to the examine button

this will load the selected file direct into the Text Viewer window... thats working fine
but ony works in the current directory... i still need to grab the path of the full file path from the ListView window... so am working on the ColumnHeader selection subitem to get the full path added....

CODE
Private Sub Command5_Click()
On Error Resume Next
RTB1.LoadFile Text2.Text + Lstview1.selecteditem.Text
On Error GoTo 0
End Sub


get back to you.... cheers
passi
Hi Comsec,

I don't really understand your problem. Did you try my code? If you paste it in your program, normall it should return the full file path into Text1, when you click an entry of the listview.
Then you can simply give that string to your RichTextBox to open it:
RTB1.LoadFile(Text1)

Greets, passi smile.gif
ComSec
tried it on the program and it would not have it.... and i now know why

i used Common controls 5.0 my mistake instead of 6.0 .... i would have to re-write part of the tool to work with the statusbar output also...

so i was trying to code 6.0 inputs using 5.0 ocx code.... so no wonder i nothing was happening....lol ...i will sort it

thanks bud

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2005 Invision Power Services, Inc.