<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Auto generator for signature Pad picture.</title><link>https://www.infopathdev.com:443/forums/thread/14667.aspx</link><pubDate>Tue, 11 Jul 2006 02:52:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14667</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14667.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14667</wfw:commentRss><description>Oh man, yeah you definitely want to use a repeating structure here. Writing that code over and over again is horrible. You will also want to store the actual Base64 data into the form, not a link.&lt;br /&gt;&lt;br /&gt;1. Make the schema repeating. This is very important&lt;br /&gt;2. Double-click whatever node the picture control is bound to, change the data type to base64Binary&lt;br /&gt;3. Put in a repeating section with all of the nodes that you want.&lt;br /&gt;&lt;br /&gt;You will probably also wnat to delete all of the nodes that are not in the repeating group so that you have a pure schema. You might even just want to start a new form from scratch and do a lot of copy+pasting so you don't have to bother with such huge schema edits. I hope this helps and let us know how things turn out! I think you will realize that things will be MUCH easier once you have a repeating schema, and then when you store the image as base64 you won't have to worry about the filename.</description></item><item><title>Auto generator for signature Pad picture.</title><link>https://www.infopathdev.com:443/forums/thread/12901.aspx</link><pubDate>Thu, 15 Jun 2006 14:44:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12901</guid><dc:creator>Jedi2002</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12901.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12901</wfw:commentRss><description>I created a Patient Information Form with a field to take signatures from a signature pad (Sig Plus).&lt;br /&gt;I got the form to work with the signature pad but what happens is the picture image is only good until a new Patient Information Form is filled out. Reason being is because I had to create a location where the signature would be stored (as a picture) so that info path can retreive it in the form in the correct feild from that location. As a result when a new form is filled out the old sinatures are replaced with the new. because of the code. &lt;br /&gt;&lt;br /&gt;Is there and way i can generate the name of the picture so it can be different every time it is called so i can still have the old signatures when i go back and look at an old form?&lt;br /&gt;&lt;br /&gt;Here is the code I used:&lt;br /&gt;&lt;br /&gt;&lt;font color="blue"&gt;/*&lt;br /&gt; * This file contains functions for data validation and form-level events.&lt;br /&gt; * Because the functions are referenced in the form definition (.xsf) file, &lt;br /&gt; * it is recommended that you do not modify the name of the function,&lt;br /&gt; * or the name and number of arguments.&lt;br /&gt; *&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;// The following line is created by Microsoft Office InfoPath to define the prefixes&lt;br /&gt;// for all the known namespaces in the main XML data file.&lt;br /&gt;// Any modification to the form files made outside of InfoPath&lt;br /&gt;// will not be automatically updated.&lt;br /&gt;//&amp;lt;namespacesDefinition&amp;gt;&lt;br /&gt;XDocument.DOM.setProperty("SelectionNamespaces", 'xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-05-30T23:54:07"');&lt;br /&gt;var sigObj = new ActiveXObject("SIGPLUS.SigPlusCtrl.1");&lt;br /&gt;//&amp;lt;/namespacesDefinition&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//=======&lt;br /&gt;// The following function handler is created by Microsoft Office InfoPath.&lt;br /&gt;// Do not modify the name of the function, or the name and number of arguments.&lt;br /&gt;//=======&lt;br /&gt;function CTRL1_5::OnClick(eventObj)&lt;br /&gt;{&lt;br /&gt;	sigObj.InitSigPlus(); &lt;br /&gt;    sigObj.OpaqueMode=true;&lt;br /&gt;    sigObj.TabletState=1;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//=======&lt;br /&gt;// The following function handler is created by Microsoft Office InfoPath.&lt;br /&gt;// Do not modify the name of the function, or the name and number of arguments.&lt;br /&gt;//=======&lt;br /&gt;function CTRL2_5::OnClick(eventObj)&lt;br /&gt;{&lt;br /&gt;	sigObj.TabletState=0;&lt;br /&gt;    sigObj.ImageFileFormat=4;&lt;br /&gt;    sigObj.ImageXSize=200;&lt;br /&gt;    sigObj.ImageYSize=75;&lt;br /&gt;    sigObj.ImagePenWidth=11;&lt;br /&gt;    sigObj.JustifyMode=5;&lt;br /&gt;    sigObj.WriteImageFile("M:\\sigim\SigImage1.JPG");&lt;br /&gt;    var objField1 = XDocument.DOM.selectSingleNode("//my:myFields/my:field1");&lt;br /&gt;    objField1.text = "M:\\sigim\SigImage1.JPG";&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//=======&lt;br /&gt;// The following function handler is created by Microsoft Office InfoPath.&lt;br /&gt;// Do not modify the name of the function, or the name and number of arguments.&lt;br /&gt;//=======&lt;br /&gt;function CTRL105_5::OnClick(eventObj)&lt;br /&gt;{&lt;br /&gt;	sigObj.InitSigPlus(); &lt;br /&gt;    sigObj.OpaqueMode=true;&lt;br /&gt;    sigObj.TabletState=1;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//=======&lt;br /&gt;// The following function handler is created by Microsoft Office InfoPath.&lt;br /&gt;// Do not modify the name of the function, or the name and number of arguments.&lt;br /&gt;//=======&lt;br /&gt;function CTRL106_5::OnClick(eventObj)&lt;br /&gt;{&lt;br /&gt;	sigObj.TabletState=0;&lt;br /&gt;    sigObj.ImageFileFormat=4;&lt;br /&gt;    sigObj.ImageXSize=200;&lt;br /&gt;    sigObj.ImageYSize=75;&lt;br /&gt;    sigObj.ImagePenWidth=11;&lt;br /&gt;    sigObj.JustifyMode=5;&lt;br /&gt;    sigObj.WriteImageFile("M:\\sigim\SigImage2.JPG");&lt;br /&gt;    var objField100 = XDocument.DOM.selectSingleNode("//my:myFields/my:field100");&lt;br /&gt;    objField100.text = "M:\\sigim\SigImage2.JPG";&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//=======&lt;br /&gt;// The following function handler is created by Microsoft Office InfoPath.&lt;br /&gt;// Do not modify the name of the function, or the name and number of arguments.&lt;br /&gt;//=======&lt;br /&gt;function CTRL107_5::OnClick(eventObj)&lt;br /&gt;{&lt;br /&gt;	sigObj.InitSigPlus(); &lt;br /&gt;    sigObj.OpaqueMode=true;&lt;br /&gt;    sigObj.TabletState=1;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//=======&lt;br /&gt;// The following function handler is created by Microsoft Office InfoPath.&lt;br /&gt;// Do not modify the name of the function, or the name and number of arguments.&lt;br /&gt;//=======&lt;br /&gt;function CTRL108_5::OnClick(eventObj)&lt;br /&gt;{&lt;br /&gt;	sigObj.TabletState=0;&lt;br /&gt;    sigObj.ImageFileFormat=4;&lt;br /&gt;    sigObj.ImageXSize=200;&lt;br /&gt;    sigObj.ImageYSize=75;&lt;br /&gt;    sigObj.ImagePenWidth=11;&lt;br /&gt;    sigObj.JustifyMode=5;&lt;br /&gt;    sigObj.WriteImageFile("M:\\sigim\SigImage3.JPG");&lt;br /&gt;    var objField101 = XDocument.DOM.selectSingleNode("//my:myFields/my:field101");&lt;br /&gt;    objField101.text = "M:\\sigim\SigImage3.JPG";&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//=======&lt;br /&gt;// The following function handler is created by Microsoft Office InfoPath.&lt;br /&gt;// Do not modify the name of the function, or the name and number of arguments.&lt;br /&gt;//=======&lt;br /&gt;function CTRL109_5::OnClick(eventObj)&lt;br /&gt;{&lt;br /&gt;	sigObj.InitSigPlus(); &lt;br /&gt;    sigObj.OpaqueMode=true;&lt;br /&gt;    sigObj.TabletState=1;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//=======&lt;br /&gt;// The following function handler is created by Microsoft Office InfoPath.&lt;br /&gt;// Do not modify the name of the function, or the name and number of arguments.&lt;br /&gt;//=======&lt;br /&gt;function CTRL110_5::OnClick(eventObj)&lt;br /&gt;{&lt;br /&gt;	sigObj.TabletState=0;&lt;br /&gt;    sigObj.ImageFileFormat=4;&lt;br /&gt;    sigObj.ImageXSize=200;&lt;br /&gt;    sigObj.ImageYSize=75;&lt;br /&gt;    sigObj.ImagePenWidth=11;&lt;br /&gt;    sigObj.JustifyMode=5;&lt;br /&gt;    sigObj.WriteImageFile("M:\\sigim\SigImage4.JPG");&lt;br /&gt;    var objField102 = XDocument.DOM.selectSingleNode("//my:myFields/my:field102");&lt;br /&gt;    objField102.text = "M:\\sigim\SigImage4.JPG";&lt;br /&gt;}&lt;/font id="blue"&gt;&lt;br /&gt;____________________________________________________________________&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;b&gt;BELOW YOU WILL FIND A LINK TO SEE A PIC OF HOW THE FORM LOOK&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a href='' target='_blank' title=''&gt;&lt;/a&lt;a target="_blank" href=http://meddentco.com/PIF.jpg&gt;http://meddentco.com/PIF.jpg&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</description></item></channel></rss>