473,326 Members | 2,192 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,326 software developers and data experts.

getting associated icon for file type out of system

How would you get the associated icon for the file type of a file with a
certain extension?

like BMP, JPEG, MPEG, etc etc find their default icon using the File Types
listing that associates the extension with an icon in windows. thanks!
Nov 20 '05 #1
3 2391
Brian,

* "Brian Henry" <brianiup[nospam]@adelphia.net> scripsit:
How would you get the associated icon for the file type of a file with a
certain extension?


<URL:http://vbaccelerator.com/article.asp?id=4302>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2
when i convert [MarshalAs(UnmanagedType.ByValTStr, SizeConst=80)]

to vb.net as
<MarshalAs(UnmanagedType.ByValTStr, SizeConst=80)>

it gives me an error, why is that? it says sizeconst is not declared.. yet
is is listed as an optional property of the marshalAS.. how do i go about
converting that to vb? thanks

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:c5************@ID-208219.news.uni-berlin.de...
Brian,

* "Brian Henry" <brianiup[nospam]@adelphia.net> scripsit:
How would you get the associated icon for the file type of a file with a
certain extension?


<URL:http://vbaccelerator.com/article.asp?id=4302>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 20 '05 #3
Brian,
to vb.net as
<MarshalAs(UnmanagedType.ByValTStr, SizeConst=80)>

it gives me an error, why is that?


The correct syntax is

SizeConst := 80

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 20 '05 #4

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

Similar topics

4
by: Bernie Yaeger | last post by:
I now know how to gather the file type icons and I'm able to use them in a listview. But a listbox does not have a .smallimagelist or .largeimagelist member, so I don't know how to translate that...
3
by: Kendall Gifford | last post by:
Greetings. While trying to get a simple app working, I've been forced to delve into embedded and/or linked resources a bit. I read all the reference for the System.Resources namespace as well as...
15
by: kurt sune | last post by:
Anybody has a tip of where to find info/example how to retrieve an icon from a .RESX-file? /k
5
by: IcingDeath via DotNetMonster.com | last post by:
I am building this SQL Server database app in which i can store files. In order to display files I want to have the app show the associated icon for the extension of the file that is in the...
0
by: Mythran | last post by:
I wrote some code that is supposed to enumerate through the specified file's win32 resources and return a string-array of all icon names. When it runs, it returns a string-array with a bunch of...
4
by: techspirit | last post by:
Hi all, 1) I found out from the vb.net group that it is possible to get an associated icon for a file. My requirement is to display all programs from the Start Menu for the user along with the...
5
by: mike | last post by:
Hi, I have been playing with VB.NET/C# for getting some general properties of a fileinfo object. However, FileInfo object does not seem to expose some of the basic properties like TYPE that used...
1
by: gevald123 | last post by:
I'm storing system files in a sql server database, as "image" datatype fields. In my front end (vb .net 1.1) I'd like to display these files in a listview with the "Windows Explorer" feel and...
5
by: =?Utf-8?B?TG9hbldvbGY=?= | last post by:
I'm working on a Windows Explorer-like application. What is the best way to find out what application is set to open a particular type of file? Is there a function to do this? Do I have to go...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.