473,378 Members | 1,454 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Using the listview itemactivate event

When I double click an item (filename) in a listview, the itemactive event
is fired. How can I code it such that the item selected will be launched by
the default program for that file extension (eg, Word with a .doc file,
Photoshop with a .jpg file, etc)?

Thanks for any help.

Bernie Yaeger
Nov 21 '05 #1
2 2477
In the doubleclick event, you can simply call:
Shell("Start <fully qualified file name>")

For example, for a file mydoc.doc on c:\, you would make a call:
Shell("Start c:\mydoc.doc")

This will cause windows to load file with the default program for that file
extension. In your case, you'll be getting the filename from the listview
items.

hope that helps..
Imran.
When I double click an item (filename) in a listview, the itemactive
event is fired. How can I code it such that the item selected will be
launched by the default program for that file extension (eg, Word with
a .doc file, Photoshop with a .jpg file, etc)?

Thanks for any help.

Bernie Yaeger


Nov 21 '05 #2
Hi Imran,

Tx for your help.

Bernie

"Imran Koradia" <no****@microsoft.com> wrote in message
news:75*********************@news.microsoft.com...
In the doubleclick event, you can simply call:
Shell("Start <fully qualified file name>")

For example, for a file mydoc.doc on c:\, you would make a call:
Shell("Start c:\mydoc.doc")

This will cause windows to load file with the default program for that
file extension. In your case, you'll be getting the filename from the
listview items.

hope that helps..
Imran.
When I double click an item (filename) in a listview, the itemactive
event is fired. How can I code it such that the item selected will be
launched by the default program for that file extension (eg, Word with
a .doc file, Photoshop with a .jpg file, etc)?

Thanks for any help.

Bernie Yaeger


Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Shalin | last post by:
Hi I have used ListView of VB6 in one of my projects. Now as I am upgrading the project I want to chanhe the ListView to VB.NET. The only problem I face is that the ItemClick event doesn't exist...
2
by: Bernie Yaeger | last post by:
When I double click an item (filename) in a listview, the itemactive event is fired. How can I code it such that the item selected will be launched by the default program for that file extension...
6
by: Tee | last post by:
Hi, I have a listview control that has a column displaying path. I need to change the StringTrimming of text in this column to StringTrimming.EllipsisPath, but there is no paint event available...
1
by: andrewcw | last post by:
The clcik event on the ListView control seems to trigger off the item level ( the first column ). I would like to be able to trap the click event on a particular subitem ( a specific column's row...
2
by: Peter Steele | last post by:
I have a form containing a ListView with four columns, creating a multi-cell table. I want to have an event which can determine which cell in the table is under the cursor when a double-click is...
1
by: Prasad Karunakaran | last post by:
I am using the C# DirectoryEntry class to retrieve the Properties of an user object in the Active Directory. I need to get the First Name and Last Name as properties. I know it is not supported...
4
by: Bill2k | last post by:
Could someone please give me an example of using the addhandler statement with the listview item click event. Also, if I could get an example of what the eventhandler would look like. Thanks in...
0
by: Terry Brown | last post by:
I have a form which contains a listview item. The form is created to view data that is generated by interaction with a separate form. There are buttons on the form that change the data source...
4
by: Pucca | last post by:
How can I tell a mouse right clicks over a listview item that's in a container panel. I only want to display a popup menu if the user right click the mouse over an item on the Listview. I don't...
4
by: Rob | last post by:
I've constructed a user control inherited from ListView so I can handle and respond to scrolling events (to keep 2 listviews scrolling in sync). My user control includes an Overrides of WndProc...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.