How to get current form name in c# ? - InfoPath Dev
in

InfoPath Dev

How to get current form name in c# ?

Last post 02-13-2007 05:15 PM by Patrick Halstead. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 02-12-2007 06:16 PM

    How to get current form name in c# ?

    Hello again - here I have one question i need to implement event for buton which will open another instance of my current form. i knew how to do this that way :
    string locationInSystem = System.Environment.CurrentDirectory.ToString();
    string location = locationInSystem + "\\" + "myform.xsn";
    XDocument oXdNewForm = thisApplication.XDocuments.NewFromSolution(location);

    but I need to hardcode my form name ( my code only gets current form location) I want to do this as hmm automate :) - is possible to put there some kind of function instead of "myform.xsn" ??

    I will be very greatufull for any help
  • 02-13-2007 01:15 AM In reply to

    Re: How to get current form name in c# ?

    Have you looked at the SolutionURI?
    Patrick Halstead
    Project Manager at Qdabra
  • 02-13-2007 01:53 AM In reply to

    Re: How to get current form name in c# ?

    Hi,

    Check out this link, may be helpful for you,
    http://infopathdev.com/forums/topic.asp?TOPIC_ID=4271

    Thanks.
    K.Ramana Reddy / http://www.ggktech.com
    India.
  • 02-13-2007 04:50 PM In reply to

    Re: How to get current form name in c# ?

    Maybe it can help somebody - add this as on click event to button:
    string location = thisXDocument.Solution.URI;
    XDocument oXdNewForm = thisApplication.XDocuments.NewFromSolution(location);
  • 02-13-2007 05:15 PM In reply to

    Re: How to get current form name in c# ?

    Thanks folwarczy!
    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.