Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Return an image to mspaint!

Return an image to mspaint!

Scheduled Pinned Locked Moved C#
databasequestion
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Gareth_Hastings
    wrote on last edited by
    #1

    Hello, I've been trying to make a program that can basically return the contents of an image to paint via the File/Open dialog. So you'd open Paint, hit file-->Open and then either 1. Select my program which returns an image somehow or 2. Select my file type which does something else! (What I don't know!):confused: What I'd like to do is have a shortcut type program that pulls files from a database rather than the filesystem. Maybe I should be asking how do .lnk files tell paint to get the file from somewhere else? Any ideas? Thanks Gareth

    C V 2 Replies Last reply
    0
    • G Gareth_Hastings

      Hello, I've been trying to make a program that can basically return the contents of an image to paint via the File/Open dialog. So you'd open Paint, hit file-->Open and then either 1. Select my program which returns an image somehow or 2. Select my file type which does something else! (What I don't know!):confused: What I'd like to do is have a shortcut type program that pulls files from a database rather than the filesystem. Maybe I should be asking how do .lnk files tell paint to get the file from somewhere else? Any ideas? Thanks Gareth

      C Offline
      C Offline
      Curtis Schlak
      wrote on last edited by
      #2

      The .lnk file is a special Explorer hack that "acts" like the soft link in a Unix-like system. It's all done in the shell, so access to it is a little secretive, if possible at all. I don't think that you can get there from here. I have seen shell add-ins, though, that look like they're a part of the file system as accessed through the Explorer, but actually connect to "other stuff." You might want to see if something like shell extension handlers[^] would work for you. "we must lose precision to make significant statements about complex systems." -deKorvin on uncertainty

      G 1 Reply Last reply
      0
      • G Gareth_Hastings

        Hello, I've been trying to make a program that can basically return the contents of an image to paint via the File/Open dialog. So you'd open Paint, hit file-->Open and then either 1. Select my program which returns an image somehow or 2. Select my file type which does something else! (What I don't know!):confused: What I'd like to do is have a shortcut type program that pulls files from a database rather than the filesystem. Maybe I should be asking how do .lnk files tell paint to get the file from somewhere else? Any ideas? Thanks Gareth

        V Offline
        V Offline
        Vasudevan Deepak Kumar
        wrote on last edited by
        #3

        Gareth, You can also invoke ClipBoard and exchnage the image in Paint recognizable format. Which programming language are you using? Is'nt it? Vasudevan Deepak Kumar Personal Web: http://www.lavanyadeepak.tk/ I Blog At: http://www.dotnetjunkies.com/weblog/deepak/
        http://deepakvasudevan.blogspot.com/
        http://deepak.blogdrive.com/

        G 1 Reply Last reply
        0
        • C Curtis Schlak

          The .lnk file is a special Explorer hack that "acts" like the soft link in a Unix-like system. It's all done in the shell, so access to it is a little secretive, if possible at all. I don't think that you can get there from here. I have seen shell add-ins, though, that look like they're a part of the file system as accessed through the Explorer, but actually connect to "other stuff." You might want to see if something like shell extension handlers[^] would work for you. "we must lose precision to make significant statements about complex systems." -deKorvin on uncertainty

          G Offline
          G Offline
          Gareth_Hastings
          wrote on last edited by
          #4

          I've just come over something called a re-parse point! It sounds like something I could use!! Has anyone had any experience with these? http://www.pcguide.com/ref/hdd/file/ntfs/filesReparse-c.html[^] Quote: (From link)

          In addition to allowing reparse points to implement many types of custom capabilities, Microsoft itself uses them to implement several features within Windows 2000 itself, including the following: Symbolic Links: Symbolic linking allows you to create a pointer from one area of the directory structure to the actual location of the file elsewhere in the structure. NTFS does not implement "true" symbolic file linking as exists within UNIX file systems, but the functionality can be simulated by using reparse points. In essence, a symbolic link is a reparse point that redirect access from one file to another file. Junction Points: A junction point is similar to a symbolic link, but instead of redirecting access from one file to another, it redirects access from one directory to another. Volume Mount Points: A volume mount point is like a symbolic link or junction point, but taken to the next level: it is used to create dynamic access to entire disk volumes. For example, you can create volume mount points for removable hard disks or other storage media, or even use this feature to allow several different partitions (C:, D:, E: and so on) to appear to the user as if they were all in one logical volume. Windows 2000 can use this capability to break the traditional limit of 26 drive letters--using volume mount points, you can access volumes without the need for a drive letter for the volume. This is useful for large CD-ROM servers that would otherwise require a separate letter for each disk (and would also require the user to keep track of all these drive letters!) Remote Storage Server (RSS): This feature of Windows 2000 uses a set of rules to determine when to move infrequently used files on an NTFS volume to archive storage (such as CD-RW or tape). When it moves a file to "offline" or "near offline" storage in this manner, RSS leaves behind reparse points that contain the instructions necessary to access the archived files, if they are needed in the future.

          Thanks Gareth

          C 1 Reply Last reply
          0
          • V Vasudevan Deepak Kumar

            Gareth, You can also invoke ClipBoard and exchnage the image in Paint recognizable format. Which programming language are you using? Is'nt it? Vasudevan Deepak Kumar Personal Web: http://www.lavanyadeepak.tk/ I Blog At: http://www.dotnetjunkies.com/weblog/deepak/
            http://deepakvasudevan.blogspot.com/
            http://deepak.blogdrive.com/

            G Offline
            G Offline
            Gareth_Hastings
            wrote on last edited by
            #5

            Hi, Thanks for the idea but I'd like to do this will any registered file format! Not just images (I used that as an example). I have a program that's associated with a file format. When you double click the file from Windows explorer it loads the file from a database using the associated program (eg word for .doc, excel for .xls etc etc) I'm using C# Thanks

            1 Reply Last reply
            0
            • G Gareth_Hastings

              I've just come over something called a re-parse point! It sounds like something I could use!! Has anyone had any experience with these? http://www.pcguide.com/ref/hdd/file/ntfs/filesReparse-c.html[^] Quote: (From link)

              In addition to allowing reparse points to implement many types of custom capabilities, Microsoft itself uses them to implement several features within Windows 2000 itself, including the following: Symbolic Links: Symbolic linking allows you to create a pointer from one area of the directory structure to the actual location of the file elsewhere in the structure. NTFS does not implement "true" symbolic file linking as exists within UNIX file systems, but the functionality can be simulated by using reparse points. In essence, a symbolic link is a reparse point that redirect access from one file to another file. Junction Points: A junction point is similar to a symbolic link, but instead of redirecting access from one file to another, it redirects access from one directory to another. Volume Mount Points: A volume mount point is like a symbolic link or junction point, but taken to the next level: it is used to create dynamic access to entire disk volumes. For example, you can create volume mount points for removable hard disks or other storage media, or even use this feature to allow several different partitions (C:, D:, E: and so on) to appear to the user as if they were all in one logical volume. Windows 2000 can use this capability to break the traditional limit of 26 drive letters--using volume mount points, you can access volumes without the need for a drive letter for the volume. This is useful for large CD-ROM servers that would otherwise require a separate letter for each disk (and would also require the user to keep track of all these drive letters!) Remote Storage Server (RSS): This feature of Windows 2000 uses a set of rules to determine when to move infrequently used files on an NTFS volume to archive storage (such as CD-RW or tape). When it moves a file to "offline" or "near offline" storage in this manner, RSS leaves behind reparse points that contain the instructions necessary to access the archived files, if they are needed in the future.

              Thanks Gareth

              C Offline
              C Offline
              Curtis Schlak
              wrote on last edited by
              #6

              Gareth, If you get anywhere with this solution, please drop a line here on the message board. I'd be intrigued to see what happens. Thanks. Curtis. "we must lose precision to make significant statements about complex systems." -deKorvin on uncertainty

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups