create file from desktop or folder
how can you add an option in windows so when you right click in the desktop or in a folder and then go to new and create a new file from there... what code can i use for that? or what can i search to find code for that i've been looking didnt find anything yet... help please
Re: create file from desktop or folder
If I read you correctly:
For a folder: MkDir
For a file: Open, Print#, Put#, Close, etc.
Re: create file from desktop or folder
no not that.... let's say you close vb completely and then go to your desktop and right click on your desktop then go to new - text file (let's sa) but instead of text fie it would be your app file...
or like right click desktop, New, Winzip or ... right click new - folder ... do i add code to registry for that if so what is it? thank you
Re: create file from desktop or folder
anyone has an idea? or its not possible with vb??
Re: create file from desktop or folder
This isn't any kind of VB issue at all. It's a Shell issue.
The bare basics are covered in How To Add an Object to the New Object List and more detail can be found in Extending a New Submenu.
This is almost always an installer action, not something you do in your programs.
It should be avoided, since it is a worse form of pollution than even desktop shortcuts (also deprecated long ago). The last thing users want is for the New submenu to be filled with crummy things added by random programs they foolishly installed.
If you must do this be sure that uninstalling your program cleans these entries out rather than leaving them orphaned.
Re: create file from desktop or folder
Hi, i think you need to change some value in registry to do that. I found a tutorial from google but unfortunately it's not works for me (i'm using server 2008). check this how-to-add-remove-items-from-new-menu-in-windows/
Re: create file from desktop or folder
this code seems to be for windows 95? i tried it on my pc windows 7 and nothing appears when i right click go to new can you try it on your pc and see if it works for you anyone? i did go in registry editor (regedit) add a new string to hkey_classes_root and then .pacw and the string is ShellNew and then a string valey key name NullFile and i tried one named FileName and then put an empty .pacw in c:/windows/shellnew/PacWest.pacw and then put it in my FileName String key in registry... hmm any ideas what else i can try for it to appear when i right click goto new... i'll keep trying
1 Attachment(s)
Re: create file from desktop or folder
Hi, check this code... one of my friend gave me that idea and i put it into code, so it's not mine. it works for me, i'm using Win Server 2008.