<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Launch infopath form with a winform</title><link>https://www.infopathdev.com:443/forums/thread/8876.aspx</link><pubDate>Mon, 06 Feb 2006 07:05:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8876</guid><dc:creator>Coita Thierry</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8876.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8876</wfw:commentRss><description>Hi,&lt;br /&gt;&lt;br /&gt;Thanks for your answer! That looks great! I will try this!&lt;br /&gt;&lt;br /&gt;++&lt;br /&gt;&lt;br /&gt;Thierry&lt;br /&gt;&lt;br /&gt;P.S.Patrick, for the Quilceda I dont have drink it but it's for the next week-end! I have invite some friends at home! I'll give you some feedbacks! Sorry but this time I'm a little bit busy I have promise you one article I will try to make this this week!</description></item><item><title>Re: Launch infopath form with a winform</title><link>https://www.infopathdev.com:443/forums/thread/8875.aspx</link><pubDate>Sat, 04 Feb 2006 17:25:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8875</guid><dc:creator>johngidd</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8875.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8875</wfw:commentRss><description>There is always the interop as well, just a quick example.  The unfortunate issue that I find with the interop and infopath is the lack of an exit or quit event, unlike word or excel etc.  Makes it somewhat difficult to detect the exit of the application. Of course you can then use API functions such as FindWindow to grab the handle and then setup your own thread to monitor for the exit of the infopath app, but at that point just as well start infopath via a process making it easier to manage the process.  But then you give up the nice little interop options to open infopath in "read only" mode etc.  &lt;br /&gt;&lt;br /&gt;Imports objOffice = Microsoft.Office.Core&lt;br /&gt;Imports objInfoPath = Microsoft.Office.Interop.InfoPath&lt;br /&gt;&lt;br /&gt;    Friend IPApp As objInfoPath.Application = CreateObject("InfoPath.Application")&lt;br /&gt;    Friend IPDocs As objInfoPath.XDocuments = IPApp.XDocuments&lt;br /&gt;    Friend WithEvents IPDoc As objInfoPath.XDocument&lt;br /&gt;&lt;br /&gt;    Public Sub OpenInfoPathXML(ByVal XMLFile As String)&lt;br /&gt;        'http://www.mcse.ms/archive180-2005-2-707067.html&lt;br /&gt;&lt;br /&gt;        IPDoc = IPDocs.Open(XMLFile)&lt;br /&gt;&lt;br /&gt;        IPApp.Visible = True&lt;br /&gt;        IPApp.WindowState = &lt;br /&gt;    End Sub&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</description></item><item><title>Re: Launch infopath form with a winform</title><link>https://www.infopathdev.com:443/forums/thread/8874.aspx</link><pubDate>Sat, 04 Feb 2006 17:11:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8874</guid><dc:creator>johngidd</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8874.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8874</wfw:commentRss><description>You may also want to use some basic menu API functions to remove any controls or menu fuctions that you do not want the user to have access to.  Below is a quick launch of infopath and handle to capture exit event.  Edit the xml query fields in the xml before you launch infopath, then just supply the xml as a argument as below. Beware also that Infopath does not like to run with multiple instances, it will attempt to close any running instances thereby throwing an early exit event if there is a copy of infopath already running when you attempt to launch this process. (ie. the designer is already running and you attempt to start a new process such as that below it will immediately throw an exit code which will foul up your waiting for exit)  &lt;br /&gt;&lt;br /&gt;    Public Sub OpenInfoPathXMLviaProcess(ByVal XMLFile As String)&lt;br /&gt;        Dim SI As ProcessStartInfo = New ProcessStartInfo("infopath.exe") &lt;br /&gt;        Dim DWFInfoPath As New Process&lt;br /&gt;&lt;br /&gt;        Try&lt;br /&gt;            SI.ErrorDialog = True&lt;br /&gt;            SI.Arguments = ("""" &amp; XMLFile &amp; """")&lt;br /&gt;            SI.WindowStyle = ProcessWindowStyle.Normal&lt;br /&gt;            DWFInfoPath.EnableRaisingEvents = True&lt;br /&gt;            DWFInfoPath.StartInfo = SI&lt;br /&gt;&lt;br /&gt;            'Add event handler for the exit event&lt;br /&gt;            AddHandler DWFInfoPath.Exited, AddressOf DWFInfoPathProcessExited&lt;br /&gt;&lt;br /&gt;            'Start&lt;br /&gt;            DWFInfoPath.Start()&lt;br /&gt;            DWFInfoPath.WaitForExit()   'Indefinitely waiting&lt;br /&gt;&lt;br /&gt;        Catch ex As Exception&lt;br /&gt;            'Your Error handling here&lt;br /&gt;        Finally&lt;br /&gt;            If DWFInfoPath.HasExited = False Then&lt;br /&gt;                DWFInfoPath.Close()&lt;br /&gt;            End If&lt;br /&gt;        End Try&lt;br /&gt;    End Sub&lt;br /&gt;&lt;br /&gt;    Public Sub DWFInfoPathProcessExited(ByVal sender As Object, ByVal e As System.EventArgs)&lt;br /&gt;        Dim DWFInfoPathProcess As Process = DirectCast(sender, Process)&lt;br /&gt;        Try&lt;br /&gt;            If Not DWFInfoPathProcess Is Nothing Then&lt;br /&gt;                'MessageBox.Show("The process exited, raising the Exited event at: " &amp; _&lt;br /&gt;                '                DWFInfoPathProcess.ExitTime &amp; "." &amp; System.Environment.NewLine &amp; _&lt;br /&gt;                '                "Exit Code: " &amp; DWFInfoPathProcess.ExitCode)&lt;br /&gt;             End if&lt;br /&gt;&lt;br /&gt;</description></item><item><title>Re: Launch infopath form with a winform</title><link>https://www.infopathdev.com:443/forums/thread/8873.aspx</link><pubDate>Sat, 04 Feb 2006 09:11:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8873</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8873.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8873</wfw:commentRss><description>Yeah, I think that's worth a twirl! Sorry, my Windows and .NET API knowledge is waning... hey! you're at 285 posts ... how was that Quilceda? Want something fron France?&lt;br /&gt;&lt;br /&gt;Patrick Halstead [InfoPath MVP]&lt;br /&gt;InfoPathDev</description></item><item><title>Re: Launch infopath form with a winform</title><link>https://www.infopathdev.com:443/forums/thread/8872.aspx</link><pubDate>Fri, 03 Feb 2006 10:20:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8872</guid><dc:creator>Coita Thierry</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8872.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8872</wfw:commentRss><description>Hi Patrick,&lt;br /&gt;&lt;br /&gt;I don't have find what is your AppExec but when I was searching about it but I found another way with process.start (strange I didn't found anything on who I can launch infopath and when you speak about your solution I find another ;) ):&lt;br /&gt;&lt;br /&gt;ProcessStartInfo processInfo = new ProcessStartInfo(@"c:\RC\affaire.xsn"); &lt;br /&gt;processInfo.WindowStyle = ProcessWindowStyle.Hidden; &lt;br /&gt;Process arjProcess = new Process(); &lt;br /&gt;arjProcess.StartInfo = processInfo; &lt;br /&gt;arjProcess.Start();&lt;br /&gt;&lt;br /&gt;Do you think it's a good idea? That works it's already a good things. Do you know the difference between this two method?&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;</description></item><item><title>Re: Launch infopath form with a winform</title><link>https://www.infopathdev.com:443/forums/thread/8871.aspx</link><pubDate>Fri, 03 Feb 2006 03:49:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8871</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8871.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8871</wfw:commentRss><description>Hi Thierry,&lt;br /&gt;Sorry for the delay here. You will have to do the equivalent of an AppExec command to launch InfoPath and specify the the xsn file as a parameter. It's totally possible from code.&lt;br /&gt;&lt;br /&gt;Patrick Halstead [InfoPath MVP]&lt;br /&gt;InfoPathDev</description></item><item><title>Re: Launch infopath form with a winform</title><link>https://www.infopathdev.com:443/forums/thread/8870.aspx</link><pubDate>Tue, 31 Jan 2006 08:54:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8870</guid><dc:creator>Coita Thierry</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8870.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8870</wfw:commentRss><description>Thanks for your reply!&lt;br /&gt;&lt;br /&gt;Thanks for the idea that answer to my additionnal question!&lt;br /&gt;&lt;br /&gt;My problem is that I don't know how to launch my infopath form in my winform? How achieve this?&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;&lt;br /&gt;Thierry</description></item><item><title>Re: Launch infopath form with a winform</title><link>https://www.infopathdev.com:443/forums/thread/8869.aspx</link><pubDate>Mon, 30 Jan 2006 18:11:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8869</guid><dc:creator>vt_asparagus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8869.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8869</wfw:commentRss><description>Have never tried but do not see why it is not possible.  Do you have access to the XML in .NET?  You could load the xml into an XMLDocument object, make your changes and then open up the XML in InfoPath...  Just brainstorming here...</description></item><item><title>Re: Launch infopath form with a winform</title><link>https://www.infopathdev.com:443/forums/thread/8868.aspx</link><pubDate>Mon, 30 Jan 2006 12:53:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8868</guid><dc:creator>Coita Thierry</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8868.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8868</wfw:commentRss><description>Hi,&lt;br /&gt;&lt;br /&gt;Nobody has an idea about how to make?&lt;br /&gt;&lt;br /&gt;Thanks!&lt;br /&gt;&lt;br /&gt;</description></item><item><title>Launch infopath form with a winform</title><link>https://www.infopathdev.com:443/forums/thread/5294.aspx</link><pubDate>Tue, 24 Jan 2006 09:52:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:5294</guid><dc:creator>Coita Thierry</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/5294.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=5294</wfw:commentRss><description>Hi,&lt;br /&gt;&lt;br /&gt;I need to make a central place for my application and I asking me if there is a way for launch an xsn in a winform(c#)? I think yes but I didn't find how to make this possible.&lt;br /&gt;&lt;br /&gt;The model is in t:\RC\AV.xsn&lt;br /&gt;&lt;br /&gt;Additionnal question if the first answer is yes: in the How-to Pass parameter to infopath: &lt;a href='http://www.infopathdev.com/howto/tutorials/default.aspx?i=af9e48a6e43c41f4be62296a7fa0e494' target='_blank' title='http://www.infopathdev.com/howto/tutorials/default.aspx?i=af9e48a6e43c41f4be62296a7fa0e494'&lt;a target="_blank" href=http://www.infopathdev.com/howto/tutorials/default.aspx?i=af9e48a6e43c41f4be62296a7fa0e494&gt;http://www.infopathdev.com/howto/tutorials/default.aspx?i=af9e48a6e43c41f4be62296a7fa0e494&lt;/a&gt;&lt;/a&gt;&lt;br /&gt;It's explain how to pass a paramater as an xmlfile! The example explain how you can make this with Sharepoint. Is there a way to pass parameter as an xml File with C# or Jscript in a winform?&lt;br /&gt;&lt;br /&gt;Any link, explanation, tutorial, ... can be post!&lt;br /&gt;&lt;br /&gt;Thanks a lot!&lt;br /&gt;&lt;br /&gt;Thierry&lt;br /&gt;</description></item></channel></rss>