Click here to Skip to main content
15,903,030 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionpassing value to class Pin
gcina13-Apr-10 0:09
gcina13-Apr-10 0:09 
AnswerRe: passing value to class Pin
Tom Deketelaere13-Apr-10 0:12
professionalTom Deketelaere13-Apr-10 0:12 
AnswerRe: passing value to class Pin
Dave Kreskowiak13-Apr-10 2:02
mveDave Kreskowiak13-Apr-10 2:02 
Questionhw to use sheet control in vb6.0? Pin
JC.KaNNaN12-Apr-10 20:03
JC.KaNNaN12-Apr-10 20:03 
AnswerRe: hw to use sheet control in vb6.0? [modified] Pin
Rajesh Anuhya12-Apr-10 21:31
professionalRajesh Anuhya12-Apr-10 21:31 
AnswerRe: hw to use sheet control in vb6.0? Pin
Dave Kreskowiak13-Apr-10 3:34
mveDave Kreskowiak13-Apr-10 3:34 
GeneralRe: hw to use sheet control in vb6.0? Pin
Gregory Gadow13-Apr-10 4:27
Gregory Gadow13-Apr-10 4:27 
QuestionLaunch Selected Object from a Dynamic Listview Pin
Adam Helms12-Apr-10 10:27
Adam Helms12-Apr-10 10:27 
I have an application that needs to be basically a shortcut launcher.
It goes to a shared directory and pulls the file information/icon for all files in the directory. I'm able to get this to display properly in ListView, but I need to be able to double click on the output that is shown in the listview and have it launch the appropriate link (these are all .lnk files).
I'm assuming this is some sort of doubleclick event along with the process.start command but I can't seem to come up with a solution.
This is the code for populating the listview, but what I need is help with the code to make each item double-clickable to launch the links.
In my application I have the form1, lisview1, and imagelist1.

Friend Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim hImgLarge As IntPtr
Dim fName As String
Dim shinfo As SHFILEINFO
shinfo = New SHFILEINFO()
ListView1.LargeImageList = ImageList1
For Each fName In My.Computer.FileSystem.GetFiles("P:\Directory")
hImgLarge = SHGetFileInfo(fName, 0, shinfo, Marshal.SizeOf(shinfo), SHGFI_ICON Or SHGFI_LARGEICON)

Dim myIcon As System.Drawing.Icon
myIcon = System.Drawing.Icon.FromHandle(shinfo.hIcon)

ImageList1.Images.Add(myIcon)

Dim sFilenamewithpath As String
Dim sFilename As String
sFilenamewithpath = fName
sFilename = Mid(sFilenamewithpath, InStrRev(sFilenamewithpath, "\") + 1, Len(sFilenamewithpath))



Dim sfilename2 As String
sfilename2 = Mid(sFilename, 1, Len(sFilename) - 4)
ListView1.Items.Add(sfilename2, nIndex)
nIndex = nIndex + 1
Next
End Sub
AnswerRe: Launch Selected Object from a Dynamic Listview Pin
William Winner12-Apr-10 12:53
William Winner12-Apr-10 12:53 
GeneralRe: Launch Selected Object from a Dynamic Listview Pin
Adam Helms12-Apr-10 13:53
Adam Helms12-Apr-10 13:53 
GeneralRe: Launch Selected Object from a Dynamic Listview Pin
Adam Helms13-Apr-10 2:54
Adam Helms13-Apr-10 2:54 
GeneralRe: Launch Selected Object from a Dynamic Listview Pin
William Winner13-Apr-10 6:29
William Winner13-Apr-10 6:29 
Questionget request and response Pin
mabrahao12-Apr-10 8:25
mabrahao12-Apr-10 8:25 
AnswerRe: get request and response Pin
Dave Kreskowiak12-Apr-10 9:50
mveDave Kreskowiak12-Apr-10 9:50 
GeneralRe: get request and response Pin
mabrahao12-Apr-10 10:35
mabrahao12-Apr-10 10:35 
GeneralRe: get request and response Pin
Dave Kreskowiak12-Apr-10 12:49
mveDave Kreskowiak12-Apr-10 12:49 
GeneralRe: get request and response Pin
mabrahao12-Apr-10 16:30
mabrahao12-Apr-10 16:30 
QuestionBluetooth Pin
nikhemant12-Apr-10 1:24
nikhemant12-Apr-10 1:24 
AnswerRe: Bluetooth Pin
dan!sh 12-Apr-10 2:41
professional dan!sh 12-Apr-10 2:41 
AnswerRe: Bluetooth Pin
Dalek Dave12-Apr-10 3:18
professionalDalek Dave12-Apr-10 3:18 
GeneralRe: Pin
nikhemant20-Jun-10 23:03
nikhemant20-Jun-10 23:03 
QuestionDatagrid and Datatable In Pocket PC Vb.net2005 Pin
ejaz_pk12-Apr-10 0:56
ejaz_pk12-Apr-10 0:56 
AnswerRe: Datagrid and Datatable In Pocket PC Vb.net2005 Pin
Dave Kreskowiak12-Apr-10 4:25
mveDave Kreskowiak12-Apr-10 4:25 
QuestionRetrieving data in parts Pin
Dayekh11-Apr-10 3:43
Dayekh11-Apr-10 3:43 
AnswerRe: Retrieving data in parts Pin
Luc Pattyn11-Apr-10 4:26
sitebuilderLuc Pattyn11-Apr-10 4:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.