Results 1 to 8 of 8

Thread: create file from desktop or folder

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    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

  2. #2
    Fanatic Member
    Join Date
    Mar 2009
    Posts
    804

    Re: create file from desktop or folder

    If I read you correctly:
    For a folder: MkDir
    For a file: Open, Print#, Put#, Close, etc.

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    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

  4. #4

    Thread Starter
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    Re: create file from desktop or folder

    anyone has an idea? or its not possible with vb??

  5. #5
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    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.

  6. #6
    Lively Member Lidya212's Avatar
    Join Date
    Jul 2011
    Location
    Manado City
    Posts
    73

    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/
    Dont forget to rate post that you think useful and close the thread or mark it as [RESOLVED]

  7. #7

    Thread Starter
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    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

  8. #8
    Lively Member Lidya212's Avatar
    Join Date
    Jul 2011
    Location
    Manado City
    Posts
    73

    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.
    Attached Files Attached Files
    Dont forget to rate post that you think useful and close the thread or mark it as [RESOLVED]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width