Solved

Icons and saved files in MDI application

Posted on 1997-09-08
4
124 Views
Last Modified: 2008-03-06
I'm creating an MDI application, and have an icon for the MDI form and a separate one for its children.  What I want to do, is assign this second icon to the files that are saved within the application i.e. like in Word, where a saved document has the Word child icon associated with it when you look at it in My Computer of Windows Explorer.  Is there a simple way of doing this?

Thanks for any help.

Jon.
0
Comment
Question by:chatten
  • 2
  • 2
4 Comments
 
LVL 9

Accepted Solution

by:
cymbolic earned 100 total points
Comment Utility
I'm not sure if I'm addressing your question, but, the icons in windows explorer come not from the file itself, but indirectly from the application that the file type is associated with.  So, if you compile an icon into your program, and if you associate your program with the file types it creates in explorer, then your files will get the icon that your application has compiled in it.

If you are doing your own file displays internally, then you can display your own selected icons by using a control like the Listview control, and setting the icon properties (smallicon, etc) at .additem method time, or at run time by changing icon property settings on each item.

Did I answer some of your question, or did I miss the point entirely?.
0
 

Author Comment

by:chatten
Comment Utility
I think you've answered it!  Do you mean that if I save a file within my MDI application, like a document saved in Word, then it will automatically be given the icon that I have given to the MDI form if I look at this saved file later with Windows Explorer?
0
 
LVL 9

Expert Comment

by:cymbolic
Comment Utility
No, it's not that easy.  Have'nt you heard that Windows is the operating system that makes the easy things difficult, and the hard things impossible? :)!

If you want to do both things, that is show same icon for the files in your program and in Windows explorer, you have to work both ends of the street.  For the Explorer, you must compile your application with the Icon you wish to use.  You do that by using the make exe option under file, then selecting the options button on the box, then selecting an icon to be embeded in your app.  Then you have to place a shortcut to your app in the send to folder in windows.  Then you have to associate your filename types to your application in the Windows Explorer.  You do this by double clicking on one of your files, then when explorer asks you to associate it, pick your application out of the send to folder.  Once this is done, all the files of the type you create appear in the explorer with the icon from your application.

The other side of the street is showing the files in your application using the same icon.  You can do this by using a control like the ListVIew control, and specifying the same icon in every .additem method.

Then you have to ask yourself: after all this, is it really worth it?
0
 

Author Comment

by:chatten
Comment Utility
I see what you mean!

Thanks for the advice.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now