locked
how To Open Windows Picture And Fax Viewer RRS feed

  • Question

  • I  want To Open the Windows Picture And Fax Viewe r when I click on the PictureBox Control and i make this  

    but he does not display any thing 

     If PicBxDocPic.Image Is Nothing Then
        Else
    
          Process.Start("C:\windows\system32\rundll32.exe", "C:\WINDOWS\System32\shimgvw.dll,ImageView_Fullscreen " & PicBxDocPic.Image.ToString)
        End If
    

    Sunday, November 14, 2010 7:03 PM

Answers

  • you need have full path to your image, if you get your picture from database as binary data bast way, I think is save your picture in some folder with temporary name then reopen using Windows Picture passing full path to your temporary image.
    • Marked as answer by KhaLeeL ZoURoB Monday, November 15, 2010 5:10 PM
    Sunday, November 14, 2010 9:23 PM

All replies

  • if image is nothing your rest code will not be work because image.tostring is empty, you have pass full path to you image in Porcess.start line. 
    Sunday, November 14, 2010 7:20 PM
  • I Retrieve the image from Database 

    and i want to display image from picture box to Windows Picture And Fax Viewer   Directly

    Sunday, November 14, 2010 7:42 PM
  • you need have full path to your image, if you get your picture from database as binary data bast way, I think is save your picture in some folder with temporary name then reopen using Windows Picture passing full path to your temporary image.
    • Marked as answer by KhaLeeL ZoURoB Monday, November 15, 2010 5:10 PM
    Sunday, November 14, 2010 9:23 PM
  • This Is good Idea  but  I want  another Idea
    Monday, November 15, 2010 3:38 AM
  • Your trying to convert the Image to string... that may be the problem...

    So instead get the Image filename, then pass that instead as the parameter..


    Attributor 2.0
    Monday, November 15, 2010 4:09 AM
  • some  picture to view he get me this  error

     

    See the end of this message for details on invoking 
    just-in-time (JIT) debugging instead of this dialog box.
    
    ************** Exception Text **************
    System.ComponentModel.Win32Exception: The system cannot find the file specified
      at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
      at System.Diagnostics.Process.Start()
      at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
      at System.Diagnostics.Process.Start(String fileName, String arguments)
      at EA.FrmDetails.PicBxDocPic_Click(Object sender, EventArgs e)
      at System.Windows.Forms.Control.OnClick(EventArgs e)
      at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
      at System.Windows.Forms.Control.WndProc(Message& m)
      at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
      at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
      at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    
    
    ************** Loaded Assemblies **************
    mscorlib
      Assembly Version: 2.0.0.0
      Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
      CodeBase: file:///C:/WINXP/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    ----------------------------------------
    EA
      Assembly Version: 2.0.0.0
      Win32 Version: 2.0.0.0
      CodeBase: file:///C:/Program%20Files/safa/Electronic%20Archive/EA.exe
    ----------------------------------------
    Microsoft.VisualBasic
      Assembly Version: 8.0.0.0
      Win32 Version: 8.0.50727.3053 (netfxsp.050727-3000)
      CodeBase: file:///C:/WINXP/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
    ----------------------------------------
    System
      Assembly Version: 2.0.0.0
      Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
      CodeBase: file:///C:/WINXP/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Windows.Forms
      Assembly Version: 2.0.0.0
      Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
      CodeBase: file:///C:/WINXP/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System.Drawing
      Assembly Version: 2.0.0.0
      Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
      CodeBase: file:///C:/WINXP/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System.Configuration
      Assembly Version: 2.0.0.0
      Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
      CodeBase: file:///C:/WINXP/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    ----------------------------------------
    System.Xml
      Assembly Version: 2.0.0.0
      Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
      CodeBase: file:///C:/WINXP/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    System.Runtime.Remoting
      Assembly Version: 2.0.0.0
      Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
      CodeBase: file:///C:/WINXP/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
    ----------------------------------------
    System.Data
      Assembly Version: 2.0.0.0
      Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
      CodeBase: file:///C:/WINXP/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
    ----------------------------------------
    System.Transactions
      Assembly Version: 2.0.0.0
      Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
      CodeBase: file:///C:/WINXP/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
    ----------------------------------------
    System.EnterpriseServices
      Assembly Version: 2.0.0.0
      Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
      CodeBase: file:///C:/WINXP/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
    ----------------------------------------
    Microsoft.SqlServer.ConnectionInfo
      Assembly Version: 10.0.0.0
      Win32 Version: 10.0.1600.22 ((SQL_PreRelease).080709-1414 )
      CodeBase: file:///C:/WINXP/assembly/GAC_MSIL/Microsoft.SqlServer.ConnectionInfo/10.0.0.0__89845dcd8080cc91/Microsoft.SqlServer.ConnectionInfo.dll
    ----------------------------------------
    Microsoft.SqlServer.SqlClrProvider
      Assembly Version: 10.0.0.0
      Win32 Version: 10.0.1600.22 ((SQL_PreRelease).080709-1414 )
      CodeBase: file:///C:/WINXP/assembly/GAC_MSIL/Microsoft.SqlServer.SqlClrProvider/10.0.0.0__89845dcd8080cc91/Microsoft.SqlServer.SqlClrProvider.dll
    ----------------------------------------
    System.Core
      Assembly Version: 3.5.0.0
      Win32 Version: 3.5.30729.1 built by: SP
      CodeBase: file:///C:/WINXP/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
    ----------------------------------------
    Accessibility
      Assembly Version: 2.0.0.0
      Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
      CodeBase: file:///C:/WINXP/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
    ----------------------------------------
    Interop.WIALib
      Assembly Version: 1.0.0.0
      Win32 Version: 1.0.0.0
      CodeBase: file:///C:/Program%20Files/safa/Electronic%20Archive/Interop.WIALib.DLL
    ----------------------------------------
    CustomMarshalers
      Assembly Version: 2.0.0.0
      Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
      CodeBase: file:///C:/WINXP/assembly/GAC_32/CustomMarshalers/2.0.0.0__b03f5f7f11d50a3a/CustomMarshalers.dll
    ----------------------------------------
    
    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.
    
    For example:
    
    <configuration>
      <system.windows.forms jitDebugging="true" />
    </configuration>
    
    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.
    

    Thursday, December 23, 2010 4:25 AM