When a user puts in a CD and autoruns, I want to "browse" the CD but I want to do some extra processing of the disk contents. If I wanted to replace the ListView in windows explorer with one of my own, how would I start? What terms should I search for to find out how to do this. I want to get the treeview part that explorer provides, and all the shell interaction, I just want to hide the extra extension on the end of the file names (.pgp) and show the icons for the files as if they weren't encrypted.
I think your best option is use a Shell Namespace extension like the GMail Drive shell
see this links
An almost complete Namespace Extension Sample
Create Namespace Extensions for Windows Explorer with the .NET Framework
Tips in Writing Namespace Extensions (I) - Implements Subfolder
Tips in Writing Namespace Extensions (II) - Implement Create and Delete Object Operations
Bye.
Related
I'd like to show a shell namespace extension in the new (since Windows Vista) IFileOpenDialog and IFileSaveDialog.
These dialogs can apparently display a custom form like the built-in Homegroup screen:
On this form I'd like to show internal files stored in a database (with various other options).
My question is: is it possible to pass the files that the users selects on my custom form to the IFileOpenDialog?
And is it possible to let the user select a location in the database, then receive the files from the IFileSaveDialog and store them in the database?
Important! I understand that this would be possible if I implemented virtual folders and files with my shell namespace extension. But is it possible to have my own Form embedded into the shell and in the same time pass and receive files to/from the dialogs?
If it is possible, what methods do I need to implement in my shell extension to catch the dialog open/save events?
I have been working on creating a pretty advanced GUI enabled database in Microsoft Access and am now in the implementation phase of my project.
My dream is to make an .exe file that will point to the actual .accdb database file (which will be hidden) as I cannot change the icon of the .accdb but will be able to modify the .exe's icon thus giving my implementation a more professional feel.
I'd prefer not to just create a shortcut to the .accdb and change that icon.
Through some quick digging, my plan was to create a .bat file that opens the .accdb and then use some online ".bat to .exe" converter to then add an icon to the .exe.
I can't figure out how to create a .bat file that opens my .accdb. I've tried a variety of different things like:
start "" C:\Program Files (x86)\CompassTrack "Science Department.accdb"
and other things that dont work.
It occurred to me that a .bat to .exe approach may not be the best way to do this. I don't particularily like the brief command prompt window appearance and would be open to any suggestions as to how to get a nice looking .exe file to open my .accdb.
If the best way really is a .bat file, I'd appreciate some help with the .bat file. The path to the file is C:\Program Files (x86)\CompassTrack\Science Department.accdb but for some reason every time, command prompt would return "Cannot find C:\Program "
Thanks in advance!
to change icon of an exe file using batch, look here
and to start your file use:
cd "C:\Program Files (x86)\CompassTrack"
start "" "Science Departement.accdb"
I believe you can just change the icon of your Access database. Go to Current Database (in recent versions under Office Button > Access Options) and the option is in there.
Here's a really simple C# program that you can compile into an exe very easily to if you have .NET 3.5 installed. it uses a utility called the command line compiler. You'll have to change the file path obviously.
using System;
using System.Windows.Forms;
using System.Diagnostics;
using System.IO;
public class App
{
public static void Main(string[] args)
{
Process myProcess = new Process();
myProcess.StartInfo.FileName = #"c:/your_file_path_goes_here/YourDB.accdb";
myProcess.Start();
}
}
You'll write the above to a text file with the extension .cs. Then create a batch file (a text file with the extension .bat) with this code.
#echo OFF
echo Compiling A File . . .
C:\WINDOWS\Microsoft.NET\Framework\v3.5\csc.exe /win32icon:_.ico /target:winexe /recurse:*.cs
echo.
#pause
Put these in the same dir as whatever icon you want to use, but make sure the icon is an iso file named _, as seen in the batch program. When you run the bat file, it will create the exe with the icon of your choice and it will simply launch the access database.
The feature and ability is part of the Access development system. Attempting to modify some .exe file etc. will not work.
I do suggest that you set the icon under file->options current database. It not clear why this is not working (perhaps start a new question to resolve that issue).
Keep in mind that if you deploy or change the resulting location, then you have to change the above “options” setting (manually, or by code – this much explain why your icon is not displaying – the path name cannot be relative – must be absolute.
ALSO select the box that says to use the icon for all forms and reports (this will give your application a MUCH more polished look. Since the .exe that actually runs your file is msacces.exe, then you can’t really change the application icon any other way. You see icons for the application AND ALSO forms like this "when" you set the application icon as per above:
So you WILL want to set the application icon. You then create a shortcut on your desktop. And again set the icon for that windows shortcut (it will nicely show up in the task bar with that icon).
The actual shortcut will look much like this:
"C:\Program Files (x86)\Microsoft Office\Office14\MSACCESS.EXE"
"c:\RidesDev\SkiRides\ RidesXP.accde" /runtime
The above shortcut will be on a single line (space between the two lines). The above is for Access 2010, so for 2013, then the folder is office15, and for 2016, it is office16 in above.
Also NOTE very important is the /runtime. This will ensure that the access icon NEVER shows during start-up.
Also, during start-up you will often see the MS Access splash logo during start-up. E.g. this:
You can replace this splash screen by placing a .bmp (picture) file in the SAME folder as the accDE with the same name.
So in above, if I place a RidesXMP.bmp picture file, then during start-up in place of the access splash screen, you see this:
Since you likely want the forms + reports icon to be custom, then the above makes the most sense. Your approach would ONLY give you a desktop icon, not one for the task bar, forms etc.
The above will result in hiding the access splash logo during start-up, and also apply an icon to all forms etc. I don’t suggest some approach that attempts to modify some .exe or some such – that’s likely to cause issues on customers computers. And using some .exe will not give you the icon for forms and repots.
I am a beginer with ruby and sketchup.I need to select and import multiple files at the same time when open a dialog for importing. I used a class, which is inherited from Importer interface of SketchUp . But if i want to import multiple file, it means that i have to open importer dialog many time for doing that. It is inconvenience.
After importing, it is return all the paths of all file i have imported .Do you have any idea for implementing that?
Thanks you so much !
Unfortunately the Ruby API doesn't implement any API to select multiple files in a file dialog.
Further more, if you use the Importer class you are stuck with the file dialog it displays. It's single select only.
If you know all files in the folder should be read you should let the user pick a single file, then extract the path from that and read all the files from that directory.
If you drop the Importer class you can craft your own alternative. The best would then to create a Ruby C Extension that calls the OS API to display a multi-select dialog.
Alternatively, you can create a WebDialog that display the files and let the user pick multiple files. But that means you'll have to create all the UI from scratch and it'll not lok like the native OS file dialogs.
http://www.sketchup.com/intl/en/developer/docs/ourdoc/webdialog.php
https://github.com/thomthom/sketchup-webdialogs-the-lost-manual/wiki
If you are making a Windows only plugin you can make use of the drag and drop feature of HTML5. Though this also has drawbacks of requiring the user to have a recent IE version. (OSX hides the WebDialogs when SU isn't active - so you cannot use it as a drop target when you drag files from Finder.)
I made a proof of concept a while back: https://github.com/thomthom/DropZone
I implemented namespace extension using default shell view in Windows XP.
Everything works fine, but I want add barricade (A Description of Protected Folders - also applicable to Windows XP).
Is possible this using documented/undocumented functions (SFVM messages), or this feature is hard-coded ?
If you fill all data for your extension view yourself, then you can read contents of hidden (or any other) folders on your own and display them straightaway, or hide if it needs to.
Your extension uses its own namespace, which is not controlled by the built-in shell protection options.
P.S. Starting from Windows 7+ it should not be a problem.
I would like to write a context menu for Markdown files for Windows XP, when I right click on a Markdown file it should display "View in browser" option. It could use MardownSharp or Discount to convert it in HTML and show it using the default browser. I guess that building such feature shouldn't require too much knowledge of the Windows platform. My question is: where should I start considering the fact that I would want to write this tool without using MS Visual Studio (I would like to use opensource software)? Could it be possible to use Mono?
See this answer on how to convert Markdown to HTML. As far as adding this as a context menu, this is a built-in feature of the Windows registry:
Browse to or create the following key. This assumes the file extension is .mdml (as I am unfamiliar with any set standard on this file format). If that's not the case, replace .mdml with the file extension(s) you are looking for, or * for all files, regardless of extension.
HKEY_CLASSES_ROOT\.mdml\Shell\
Browse to or create a new sub-key called something like "View in browser" and a sub-sub-key called "Command" (must be this word). In that key, modify the default to display the program and arguments to launch (e.g. C:\WINDOWS\SYSTEM32\NOTEPAD.EXE "%1").
You should now be able to browse to
HKEY_CLASSES_ROOT\.mdml\Shell\View in browser\Command\
and see the launch parameters in (Default).