Jump to content

working with external applications


Recommended Posts

i've written a wrapper for another app that basically just puts a window on top of another application so it is graphically more appealing

Public Class frmWrapper
   Private Sub frmWrapper_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
       Dim Commands As String = Command()

       If Commands = Nothing Then
           MsgBox("You must specify the IPC File you wish to load.", MsgBoxStyle.Exclamation)
       ElseIf System.IO.File.Exists(Commands) = False Then
           MsgBox("Cannot find " + Chr(32) + System.IO.Path.GetFileName(Commands) + Chr(32) + ".", MsgBoxStyle.Exclamation)
       Else
           frmBackdrop.Show()
           frmOverlay.Show()
           Dim objWSH As Object
           objWSH = CreateObject("WScript.Shell")
           Commands = "WinIPAC.exe" + Chr(32) + Commands.Replace(Chr(34), Nothing)
           objWSH.Run(Commands, 1, True)
           frmOverlay.Close()
           frmBackdrop.Close()
       End If
       End
   End Sub
End Class

There are a few things I’d like to do but I don’t know if it’s possible or how to do them since I’ve not been able to find any info after searching

first of all one thing I’d like to do is after a certain period of time like 10 seconds or so if the application is still running then I get my wrapper to close it and then rerun until it doesn’t need to be closed (the program that’s being run should only take about 3 seconds to run and but if it returns an error such as a timeout it wont go away till the user clicks the close button)

Another thing I would like to do is the ability to resize and change the position of the window

and finally if its possible get text from a textbox that the window has so I can echo it on my wrapper instead of having to depend on overlaying a window this would make the above 2 things redundant since I wouldn’t need to wait nor would I need to manipulate the window position or size

Anyone got any info on how to do any of this?

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...