Hi everyone, my background is RPG programming on an IBM so I'm new to C#. This is probably a simple task in C# but my google searching has not been helpful so far so I'm hoping someone here can help me and hopefully this is the right forum for this.
I've gone through online tutorials to make a simple image viewer but they all have a button for the user to click and browse to an image. Is there a way to pass an image file to an image viewer program as a parameter so the viewer displays the image as soon as it opens up?
To go into a little more detail, what I have is a Microsoft Access database application where a user enters a search term and that brings up an image on a form. When double clicking on the image I want an image viewer to open up with the image displayed and a print button. I know you can print from inside Access but don't like the way it looks and was hoping for a simple c# image viewer that would be a little more user friendly.
The Access code works with mspaint.exe but I want something that only has a print feature, no ability to change or update the image.
What I do have is a simple c# image viewer that has a print button and a browse button but when it opens from within Access it does not automatically show the image. It just comes up with a blank imagebox not getting an image from the Access code the way mspaint.exe does.
Hopefully all that made some sense. Is there a sample C# code that does this?
Here is the Access code that opens mspaint
sSourcePath = Me.PicFile
strProg = "C:\Windows\System32\mspaint.exe "
Call Shell(strProg & sSourcePath, vbMaximizedFocus)
I've gone through online tutorials to make a simple image viewer but they all have a button for the user to click and browse to an image. Is there a way to pass an image file to an image viewer program as a parameter so the viewer displays the image as soon as it opens up?
To go into a little more detail, what I have is a Microsoft Access database application where a user enters a search term and that brings up an image on a form. When double clicking on the image I want an image viewer to open up with the image displayed and a print button. I know you can print from inside Access but don't like the way it looks and was hoping for a simple c# image viewer that would be a little more user friendly.
The Access code works with mspaint.exe but I want something that only has a print feature, no ability to change or update the image.
What I do have is a simple c# image viewer that has a print button and a browse button but when it opens from within Access it does not automatically show the image. It just comes up with a blank imagebox not getting an image from the Access code the way mspaint.exe does.
Hopefully all that made some sense. Is there a sample C# code that does this?
Here is the Access code that opens mspaint
sSourcePath = Me.PicFile
strProg = "C:\Windows\System32\mspaint.exe "
Call Shell(strProg & sSourcePath, vbMaximizedFocus)
Last edited: