[newbie] Infopath.Application object and .NET "process" class - InfoPath Dev
in

InfoPath Dev

[newbie] Infopath.Application object and .NET "process" class

Last post 06-20-2007 06:50 AM by Francis. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 05-22-2007 06:59 AM

    • Francis
    • Not Ranked
      Male
    • Joined on 05-22-2007
    • Albany, NY USA
    • Posts 4

    [newbie] Infopath.Application object and .NET "process" class

    Hi! I'm using VB8(.net) with InfoPath 2003. In .NET, there is the "process" class which allows you to monitor when a process created with this class has been exited - I'd like to be able to monitor a process created using the "InfoPath.Application" and know if it's been exited. Is there a way to "link" a windows process with an Infopath.Application object? Is there a way to get the process ID of an application object you created, or is it possible for a process created with the .NET "process" class to be "equated" with an Infopath.application object? Thanks for any help with this!

    --- Francis

    --- Francis
  • 06-04-2007 02:15 AM In reply to

    Re: [newbie] Infopath.Application object and .NET "process" class

    Hi Francis and welcome to the forums!

    I'm not sure I understand what you're trying to do.  I know I can attach the debugger to the INFOPATH.exe process to catch debugging symbols, but I have never tried to do what you are doing.

    Why exactly are you trying to do this?

    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 06-20-2007 06:50 AM In reply to

    • Francis
    • Not Ranked
      Male
    • Joined on 05-22-2007
    • Albany, NY USA
    • Posts 4

    Re: [newbie] Infopath.Application object and .NET "process" class

    Hi! Thanks for your reply!

    I want my VB.net application to control an instance of the InfoPath (2003) application - but I need to know if the user has closed the InfoPath window. (I'm using the "application" and "xdocument" objects.) There is no "closing" event for the application object. . I have used "If Not IsNothing(CurrentDoc)" (refererring to the Xdocument) in parts of the code to at least provide some insurance.

    In my application I set the document window title bar text, and so I tried using the .NET methods for finding the process of the document window, thinking that the Process.Exit event would let notify me if the user closed the window - but for reasons I don't understand, this doesn't occur if I click the "X" close button, but does occur if I use "File > Exit".

    Right now I am using the Win32 API to disable the close button and "close" window menu item so the user can't do this, and only allow the application to close the Window.  However, if the application crashes, you need to use Task Manager to close the document window. Unless I could "cancel" the user closing the document window, I guess I'd have to do this anyway...but I still wouldn't mind knowing if this is possible.

    I'd appreciate any input on this. Thanks! --- Francis
    --- Francis
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.