Getting Image From Custom Control - InfoPath Dev
in

InfoPath Dev

Getting Image From Custom Control

Last post 05-06-2005 12:36 PM by Agni Jonnalagadda. 11 replies.
Page 1 of 1 (12 items)
Sort Posts: Previous Next
  • 04-29-2005 04:21 AM

    • wwlgray
    • Not Ranked
    • Joined on 04-29-2005
    • USA
    • Posts 6

    Getting Image From Custom Control

    I have a custom control written in vb6 and all functionality is working except saving and loading the image. This custom control allows for image capture through a camera and then allows the user to draw on the control. I would like to save the image when they are done into the XML form. Any sugestions?
  • 04-30-2005 08:49 AM In reply to

    Re: Getting Image From Custom Control

    Hi Walter Gray, Welcome to the board!
    I am not sure whether it works but please try it out and let us know if it works.
    In your form schema have a field of type "xsd:base64Binary".
    And convert your image into a base64 format and set that value to the field that you created.

    Agni
    InfoPathDev India
  • 05-01-2005 08:05 AM In reply to

    • wwlgray
    • Not Ranked
    • Joined on 04-29-2005
    • USA
    • Posts 6

    Re: Getting Image From Custom Control

    Yeah, I have the field correct but changing a vb6 image to base64 I haven't figured out how to do. Any suggestions?
  • 05-01-2005 07:16 PM In reply to

    Re: Getting Image From Custom Control

    I know one way how to do it in c# or vb.net i.e, Convert.ToBase64String() method, but I have never tried it with an image, I did it with regular files.
    Check out if there is a "Convert" class in VB6.


    Agni
    InfoPathDev India
  • 05-03-2005 10:43 AM In reply to

    • wwlgray
    • Not Ranked
    • Joined on 04-29-2005
    • USA
    • Posts 6

    Re: Getting Image From Custom Control

    Okay, I can now save the base64 string. Now when I bind to that property on my control the form doesnot save the data to the field. Any suggestions?
  • 05-03-2005 11:24 AM In reply to

    Re: Getting Image From Custom Control

    Are you able to see the picture that have saved in InfoPath. If you are able to see the picture in Infopath then you should be able to save data to that field. Do some R&D with the picture control then you should be able to figure out the problem.

    One more thing do you get any error messages when you try to save data to that form?

    Agni
    InfoPathDev India
  • 05-03-2005 12:54 PM In reply to

    • wwlgray
    • Not Ranked
    • Joined on 04-29-2005
    • USA
    • Posts 6

    Re: Getting Image From Custom Control

    I can see the base64 data in my textfield but when I save the form it does not save the data. I can see the image captured from the camera see what I draw on it and I can read the saved picture file in and out of base 64. But after a form save I open it in notepad and it does not save any data to the xml.
  • 05-03-2005 08:16 PM In reply to

    Re: Getting Image From Custom Control

    You should not bind the base64 field to a textbox control, bind it to a Picture control, then the value should get saved correctly.
    I am not sure but I think "InfoPath Designer" doesnot allow binding a base64 field to a "TextBox" control. I think you are missing some thing here.
    Your field type should be "base64Binary".

    Agni
    InfoPathDev India
  • 05-04-2005 05:36 AM In reply to

    • wwlgray
    • Not Ranked
    • Joined on 04-29-2005
    • USA
    • Posts 6

    Re: Getting Image From Custom Control

    I have tried binding it to a picture\object field and that doesn't work either.
  • 05-04-2005 09:59 AM In reply to

    Re: Getting Image From Custom Control

    My ideas have dried up on this, If anybody has any idea why it is not getting saved please chip in.
    Thanks

    Agni
    InfoPathDev India
  • 05-05-2005 11:10 AM In reply to

    • wwlgray
    • Not Ranked
    • Joined on 04-29-2005
    • USA
    • Posts 6

    Re: Getting Image From Custom Control

    Okay, I have it all working saving the image and reloading it when I open the form. I still get an error though saying that the property is invalid even though the string value is saved in the form. Any Ideas?
  • 05-06-2005 12:36 PM In reply to

    Re: Getting Image From Custom Control

    Its great to know that it worked finally.
    I would like to know, what did you do special to get it to work?

    When are you getting the error message? Is it on "Save" or on "Open".

    Agni
    InfoPathDev India
Page 1 of 1 (12 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.