Plex 2E

Expand all | Collapse all

Plex and LoadPicture or alternative ActiveX for Images

  • 1.  Plex and LoadPicture or alternative ActiveX for Images

    Posted Dec 11, 2013 05:58 AM

    Hello,

    We had problems using LoadPicture because of RW authority to the directory where the pictures are. We do not want our users to have RW access and so we can not use LoadPicture.

    We changed to a commercial ActiveX control to show Images in a Plex program, since we are on Windows 2008 R2 Terminal Services we have severe problems, Plex program crashes after using ActiveX. We are now looking for a new ActiveX Image Control which has support for Windows 2009 R2,

    Hope someone has a suggestion for this. After some months of contact with CA Support there is still no solution. CA Support suggested me to ask a question in this community,

    Kind regards.

    Leo Pieters, Senior Software Engineer,



  • 2.  RE: Plex and LoadPicture or alternative ActiveX for Images

    Posted Dec 11, 2013 06:47 AM
      |   view attached

    Hello,

    quick check using stellatools I can see LoadPicture is used in the CA supplied libs quite a bit so if you decided to replace it there could be impact on the whole ACTIVE lib as most inherits from ImageList.

    We need to find an alternative imagelist or upgrade the version you are using. Forexample TreeView version5 comes with plex but I use version6 SP3 which offers that bit more.

    Just maybe ImageList Version 6 might offer a work around, dont know just a thought but most likely requires RW.

     

    WAIT there just a minute I do have a solution for you. If you cant give RW then why access the icons at runtime. I for a long time have been embedding the icons into the panel at DESIGN TIME.

    See https://communities.ca.com/web/ca-plex-ca-2e-global-user-community/message-board/-/message_boards/message/101319453?p_p_auth=M6egNAc8&#p_19



  • 3.  RE: Plex and LoadPicture or alternative ActiveX for Images

    Posted Dec 11, 2013 07:09 AM

    BUT it depends if you know the images at runtime.

    What images are talking about? Dynamic or static? This will dictate if DESIGN time embedding is an option?



  • 4.  RE: Plex and LoadPicture or alternative ActiveX for Images

    Posted Dec 11, 2013 07:16 AM
    GeorgeJeffcock:

    BUT it depends if you know the images at runtime.

    What images are talking about? Dynamic or static? This will dictate if DESIGN time embedding is an option?


    Hello,

    We need dynamic images. it is not for using in Treeview or Listview, we already embed icons in that. We have an Article application where we are displaying images of the articles in a panel,

    Regards,

    Leo

     



  • 5.  RE: Plex and LoadPicture or alternative ActiveX for Images

    Posted Dec 11, 2013 07:20 AM

    ok time to experiment:

    I use Static type Picture quite a bit. Dnt know if that requires RW

     



  • 6.  RE: Plex and LoadPicture or alternative ActiveX for Images

    Posted Dec 11, 2013 07:25 AM

    and also thats great news interms of impact compared with changing the ImageList.

    So basically your site has choosen for good or bad to use ImageList pattern or something similar to display "Pictures" on a plex generated panel.

    We need to find a bespoke way to display "pictures" on a plex panel that does not use "LoadImage" and does not require RW.

    There  must be a non vbscript component you can import such as kodak image control or something? Will investigate past work

     

     

     



  • 7.  RE: Plex and LoadPicture or alternative ActiveX for Images

    Posted Dec 11, 2013 07:40 AM
    GeorgeJeffcock:

    and also thats great news interms of impact compared with changing the ImageList.

    So basically your site has choosen for good or bad to use ImageList pattern or something similar to display "Pictures" on a plex generated panel.

    We need to find a bespoke way to display "pictures" on a plex panel that does not use "LoadImage" and does not require RW.

    There  must be a non vbscript component you can import such as kodak image control or something? Will investigate past work

     

     

    George,

    Corrrect that is what I am looking for, attached a screenshot of our application:






  • 8.  RE: Plex and LoadPicture or alternative ActiveX for Images

    Posted Dec 11, 2013 07:46 AM
      |   view attached

    see attached png, thoses are statics.

     

     



  • 9.  RE: Plex and LoadPicture or alternative ActiveX for Images

    Posted Dec 11, 2013 07:52 AM

    so question is to what definition/Res does Statics support. And I'm sorry my brain is a seeve as I have tested this loads of times to find the threshold but I can remember the results..

    Statics could be changed at runtime to use different images, maybe, need to check SetProperty API does support "stat.bitmapfile" for real

    BUT what about using an Edit Control set to Picture Field property yes (maybe this uses loadimage). ?

     

     



  • 10.  RE: Plex and LoadPicture or alternative ActiveX for Images

    Posted Dec 11, 2013 08:44 AM
      |   view attached

    right statics work dynamically.

    You need to use ObControlAPI::SetProperty  API

    Passing it 'stat.bitmapfile' did not work but 'edit.bitmapfile'  did.

    Remember Use the special value *DIALOG to display a dialog box listing all the properties currently supported by the SetProperty API.

    AND this case you can either supply file name or *DIALOG displays a Windows File Open dialog box from which the user can select a file

     

    LIMITATION: 256 BMP

     

     

     



  • 11.  RE: Plex and LoadPicture or alternative ActiveX for Images

    Posted Dec 11, 2013 10:26 AM

     

    OR

    BlobRead and BlobWrite APIs

    You could store pictures of employees in the Employee database table and display them on the screen using an edit control with its Picture Field property set to Yes. CA Plex's picture field supports compressed bitmaps (.RLE files) which are more efficient for client/server applications.

     



  • 12.  RE: Plex and LoadPicture or alternative ActiveX for Images

    Posted Dec 11, 2013 12:07 PM

    I think there is a very easy solution to this:

    Use Microsoft's Web Browser ActiveX Control (it already exists in yours and every Windows machine, so you do not need to deploy anything

    related to it) to display dynamic pictures (provided that those pictures are of a type 'supported' by Internet Explorer), say you add to the Panel

    such a control named WBDYNPICLO , then you can do a single line VBScript to 'load' the dynamic picture when the appropriate 'Grid Line' is selected as:

    On Error Resume Next

    WBDYNPICLO.Navigate &(1:)

    Where &(1:) would have contents like (just an example): file://YourPicturesFileServerURLPath/YourDynamicImage_nnnnnnnn_yyyy_mm_dd.jpeg

    Best Regards,

    Nikos



  • 13.  RE: Plex and LoadPicture or alternative ActiveX for Images

    Posted Dec 11, 2013 01:12 PM
    Vbscript yuk - at least import it as com. Last 2 out of 3 sites I have worked have expressly prohibited its use and it's impossible to debug at runtime. There are billions of activex as I said the kodak control does the job on the first post but activex maintainence is a pain and today's deployment look for a non activex solution if possible, something native.


  • 14.  RE: Plex and LoadPicture or alternative ActiveX for Images

    Posted Dec 12, 2013 07:55 AM

    Hello Nicolas,

    This could be a good solution, only thing is that we want to resize all images to a static width and height. As far as I know this is not possible with this solution,

    Leo



  • 15.  RE: Plex and LoadPicture or alternative ActiveX for Images

    Posted Dec 12, 2013 01:23 PM
    http://edge.plexinfo.net/EdgeForum.php?action=edge


  • 16.  RE: Plex and LoadPicture or alternative ActiveX for Images

    Posted Dec 12, 2013 02:13 PM
    LeoPie:

    Hello Nicolas,

    This could be a good solution, only thing is that we want to resize all images to a static width and height. As far as I know this is not possible with this solution,

    Leo


    Please see the link provided by George : http://edge.plexinfo.net/EdgeForum.php?action=edge&forum=479&thread=29303

    In order to do the resize you need to dynamically create a little html 'temporary file' containing the reference to your image file

    along with html specifications for the image resizing : e.g. <html><img src="file://YourPicturesFileServerPath/YourImage_nnnnnnnn.jpeg"  width="200" height="85" alt="Bicycle"></html>

    and then to navigate to this html 'temporary file'. If you do not want to create such a temporary file you can even use the Web Browser Control's Document innerHtml property

    and set its contents to something like the above example.

    Best Regards,

    Nikos