.net - Windows Shell API For Status Icons Beside File Icons
Feb 13, 2011
TortoiseSVN and Dropbox both have Windows shell extensions that make file icons within Windows Explorer show a small icon beside the main one, showing the file's status - has it been synced, etc How can I make my application show icons beside files like that using the Windows API? Or is there some file attribute to do that?
For example the WinRAR icon, right-click a file, system popup the context menu, show the WinRAR with it's icon, i want to know how to get the WinRAR icon or other icons (for example CuteFTP...) using .NET. I researched this problem
I found this code but can't use it as its VB6 and I need VB 2008. I tried changing it but can't seem to get anywhere. Code: Private Sub List1_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single) Dim vFile As Variant If Data.GetFormat(vbCFFiles) Then For Each vFile In Data.Files List1.AddItem vFile Next vFile End If End Sub
Apparently, there is some kind of "bug" or "feature" in 64-bit Windows that prohibits a 32-bit app from "seeing" certain icons. Testing this is simple:Create a basic Windows Form app on a 64-bit machine.In the Project Properties, go to Compile > Advanced Compile Options > Target CPU. Set Target CPU to "x86".Add a button to your app that triggers an OpenFileDialog. Run the app and click the button to open the OpenFileDialog.Browse to: C:UsersDefaultAppDataRoamingMicrosoftWindowsStart MenuProgramsMaintenance
You should see the "Backup and Restore" shortcut, but its icon will be a blank white sheet. (If you don't see it there, it might be in C:Users[MyUser]AppDataetcetcetcMaintenance).
Now, close your app... go back to Project Properties > Compile > Advanced Compile Options > Target CPU and set Target CPU back to "AnyCPU" (this will cause it to run as 64-bit).Run the app and browse to the same folder. Now "Backup and Restore"s icon will be visible.This happens on all 32-bit apps. I tried it in Firefox (using "Open File...") and it can't see that icon (and many others) either. as a result of this behavior, when I try to extract icons from files when running under 32-bit, it produces an error. If I run the same code under 64-bit, it works just fine. running my app as 64-bit isn't an option. I'd literally quit programming if I weren't able to use Edit-and-Continue, and for some brilliant reason, 64-bit apps can't Edit-and-Continue, so I make them all in 32-bit).
In VS.Net 2008, if you choose a new form with the Explorer template, the form is preloaded with a menu strip, and all the items have the familar save, print, open, etc, icons/bitmaps. I would like to use these icons in other forms, but the form does not appear to reveal the location of these icons or where they came from. Does anyone know where they are? If I find them and point to them, can I be assured that these icons are in the same place on any computer (or do I need to embed them in the exe)?
I am using winform for printing a receipt created in vs2008.I have buttons that is printing my receipt.I have used pagesetupdialog,printdialog etc in my form programatically.What I want is to have icons of these controls which I have used the way they are availale in msword.I have got print.bmp file for printing but not getting for pagsetup,printpreviewcontrols icons.I searched for .ico and .bmp file in my compand on net aswell.
I know that i have to drag and drop the ListView control from the Control Box into my form Then goto Properties and choose view: LargeIcons/SmallIcons.
I've always had to use a program that does this stuff for me, but I'd like to just make my own program that does this. I've already got the individual bitmap images of the 3 sizes (16x16, 32x32 and 48x48) for the icon file and I usually find use some shareware program to create the icon file from the multiple bitmap images for me but I'm wondering if it's possible in .Net to create an icon file (*.ico) that contains multiple physical icons in it.
I've tried using the method in the link below, but unfortunately this only works with .exe files. I want to be able to display icons from all filetypes in picturebox's.
[URL]
So I was wondering if maybe there's a quick edit I can do in the method above to make it work, or even a completely different way of doing it?
I'm a VB beginner. The following image comes from a Mac application that I've developed. This window lists all visible files and their icons for a particular folder.
Inside the program I have a text box in which a user puts in the filepath to a textfile that the program then uses as a series of commands to perform tasks. This works perfectly, however what I would like to to do to make my program faster is associate the file extension .gam with the program, so when a user clicks a .gam file it opens the program and automatically sets said file's location into the text field, as opposed to using the browse button I added and browsing to said file everytime they run the program.
Through this a user could then make a shortcut to said .gam file and run it right from their desktop, as opposed to rummaging around in folders and whatnot. At the moment my method has been thus, I have 2 folders of importance I have archived with the .exe, Gambits Pro.exe, these are: Gambits, and Control, inside of the Gambits folder is the default storage location for .gam files, as when you click the browse button its default directory is that folder. I have also added a few example files in said folder for a user when they download the program.
The thing is im making formless application, thats visible in tray only.. But i have like 21 icons for default functions.. and when my program launches all icons with the exe file is loaded in RAM. Is there a way to use an external resources file, where all the icons is stored, so when application needs one it takes it from rscx file and loads it, and when it needs other icon it releases the one taken and takes other.. Im asking this not just for ico files, but for any file types that can be stored in my.resources..
I have been trying to find code that will enable me to get default icons for a treeview in a computer browser programme. like the WINDOWS browser(Not the internet one but the "Windows Explorer" one) but i can't get icons that are allready there
I'm sick of my EXE files only looking decent in one view in explorer (ie List or Tiles etc) because I can only figure out how to specify one icon file for my projects so it has to be a specific size and if its too big it looks rubbish at smaller sizes in explorer, and vice versa if its too small. So how can I embed more than one icon file and make it automatically select the correct one to display in explorer depending on the view? I believe you can store more than one icon in an ICO file, so do you have to just combine the various size icons into one ICO and then explorer will automatically select the correct sized on? Or is it something you have to do within the VB project?
I deleted 3 old pictures from my resource folder. When building compiler alerted me to missing resources. Stupidly i manually edited the file and all my Toolbar icons are gone. Interesting enough the menu strip text all vanished and so did my status strip text. I managed to add back the deleted lines but still the same. If i delete the toolstrip all its buttons remain. Manually deleting each control, rewriting we are talking hours and hours of work.
how can i get the folder path for the system tray or how can i buid a setup file that install a icon in the system tray using VS 2005.I know how to build setup file with creating icons in desktop and quick launch bar, but wanted to know how to add the icon into system tray after i install it
So i created resource file New --> new file --> Native Resource Template Then added icons with custom id, like "x", "u_100", .. so i understand, what the files (in my case icons) is.. And i saved as 32-bit resource file (*.res) So i have a question, how can i use these files inside of resource file in my apps? i know how to add icons in to my app.. Me.Icon = New Icon(C:/icon.ico)
i would like to add icons/images to my tab control tabs, kind of like a webrowser has the icons in the tabs. i know i need a image list, which i have added. i also added two images, 1.png and 2.png.. the rest, i'm lost.. couldn't find anything decent on the internet..so much work to do and so many choices to choose from...
I have a project where i want to add 5 picture boxes and run them .I have tried making a resource folder and putting the icons in there and using like MyImages(0) = My.Resources.FACE03 to retrieve it but i guess i don't have the picture files in the right place and even tried putting icons into the Resourse.resx and won't work. Can anyone tell me or give me a step-by step for this i am using Visual Basic 2005.
I was wondering if ToolStripMenus and ContextMenus support icons? (e.g having an icon next to the text), please tell me that they do because I cant find any property like that and if they don't that's a real shame :)