CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2011
    Posts
    2

    Smile Windows Picture And Fax Viewer

    To attach Windows Picture and Fax Viewer in C# project,

    i have added shimgvw.dll as COM component(Preview class Tool in ToolBox).

    After dragging it to form, i can display single image inside control like :

    axPreview1.ShowFile("C:\\a.jpg", 1);

    But i want to display nextImage/previousImage by this control.

    For that ObjectBrowser looks like...

    PREVIEWLib namespace
    PREVIEWLib.IImgCmdTarget interface
    PREVIEWLib.IImgCmdTarget.NextPage() method
    PREVIEWLib.IImgCmdTarget.PreviousPage() method

    But i don't know how to use this methods....???

    Plz suggest exact/non-exact ideas related to this problem...plz.........

  2. #2
    Join Date
    Oct 2005
    Location
    Seattle, WA U.S.A.
    Posts
    353

    Re: Windows Picture And Fax Viewer

    Hello xyz^3 ....

    I have a VS2008 C# app which supports a Sensoray 2250s frame grabber (http://www.sensoray.com/products/2250.htm)
    and out of sheer ignorance (I'm not well-enough informed to know what SHOULD be used) I use a plain-vanilla Windows.Forms.PictureBox to display both JPEGs and streaming video. Works just fine !

    As always, Microsoft's already done the heavy-lifting, I'm just using the miracles they've wrought.

    I haven't yet moved the app to VS2010, but I have no reason to believe that it won't work in 2010 as well as it does in 2008 (although, admittedly, I'm no expert).

    Have you tried a PictureBox in your app ?

    If not give it a try. With the picture box, loading a JPEG is as easy as the Load(...) method. And as far as the previous/next procedure goes, perhaps you could preload the image file paths into an array or stack and load the pictureBox using those preloaded paths. Dunno, but kinda sounds like it oughtta work.

    Just a thought ... the advice is worth exactly what you paid for it.

    Best wishes.

    bill

Tags for this Thread

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

Featured