Controlling External Application Using Windows Handles

Dec 22, 2009

I am trying to control an external application using visual basic. I have spy++ in order to get the windows handles of all the tool bars/buttons etc. Can someone refer me to some code/ tutorials on how i can control the application. I will need to perform mouse clicks (ex clicking file>open) and sending key strokes in that application.

View 2 Replies


ADVERTISEMENT

Controlling An External Application

Aug 15, 2009

I am currently working on making a macro in visual basic that will control an external application. I need to know how I can click the menu options in this program. Here is the code I have so far, which makes the application window active.[code]

View 3 Replies

VS 2008 Controlling External Application

Jun 18, 2009

I need a quick way to control an external application. For example, I want to be able to... let's say... click a button and open up paint and zoom to 200%. This isn't my intention but that's basically the functionality that I need. I figured there must be a simple way to do this. I need to open the application, make choices (not all have keyboard shortcuts) and type in information.I've come across "shell" but that doesn't get me anywhere except opening the application.

View 5 Replies

Controlling Specific Feature On An External Application

Dec 11, 2009

at work here we use a Remote Machine Viewer called FitNet which is proprietary to NCR and WalMart. However, I had no hand in developing this application and the developers no longer are emplyed here or did they assign anyone to take it over. I was asked to take a look at it and see if I could come up with something. The application is a .NET app but when I use .NET Reflector to get an idea aboutthe code it says no CLI header found.

[Code]...

View 1 Replies

Obtain Handles Of Controls Of An External Application?

Dec 29, 2010

If I use Spy++ and pass it Finder over the controls of every desktop window I can see the Handle of each of these controls.

View 2 Replies

Controlling And Manipulating Data In An External Program?

Jun 21, 2009

I'm trying to write a vb.net application that works with a 3rd party application called FuzzyTech. Unfortionalty FuzzyTech is quite old so the only way I can interact with it is buy using DDE. FuzzyTech acts as a DDE server. After a bit of research I found a library called NDde which enables me to use DDE. I understand that vb.net does not natively supprt it as it is an old technology.

Now fuzzyTech seems to only respond to the DDE connect and pokes when in debug mode. The only way I can find to get the program in to debug mode is from the menu bar (Debug > Interactive). So I have written an application that runs fuzzyTech, grabs the window and then accesses the menu to put it in to debug mode. My code can then use DDE. I have all of this working ok (although it does feel like a bit of a hack). The problem is I don't want users to be able to see this happening.

I want fuzzyTech to be hidden.After more research I found I could hide the window on startup by using fuzzypProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden. However when I do this my code to grab the window and send the menu commands then fails. I think this is because the window title becomes blank when hidden.So I need to know a way of controlling the program after it is hidden or hiding it after it is in debug mode. This is where I am stuck. I'm very new to programming and this has got me completely stumped.

Here is some of the code I am using:

Private fuzzypProcess As Process = New Process()
Private Sub LoadFuzzyTech()
Try
fuzzypProcess.StartInfo.FileName = projectPath & projectTitle & ".ftl"

[code]....

View 2 Replies

Call External Windows Application Form From Application?

Aug 17, 2011

I Have one Windows Application in which i have one MDI Form (Say App1). And I too have another Windows Application in which I have a Child Form (Say App2). So now i want to Call App2 from App1 .. And want to Display App2 form As MDIChild in App1 MDI Form . I am Able to open the Form of App2 , But how to set It As App1' Child .

View 2 Replies

Windows - Block MsgBox From External Application?

Oct 7, 2010

Is there a way to intercept a MsgBox() from an external application and block it using VB.Net?

For this discussion, let's say the MsgBox Title is "SQL Application" and the Message is "SQL Error - Try Again".

I have found some examples of looking for the MsgBox to pop-up (by watching for the Window title) and then sending key(s) to press OK, but I was curious if the whole process could be avoided. Otherwise, the user still sees a MsgBox or a "flash", even if it's only temporary.

View 1 Replies

Use Shell To Have Application Call An External Application But Its Not Working - Error: 'System.windows.shell'

Jun 3, 2011

I'm trying to use the Shell to have my application call an external application but its not working...I don't understand why. I get the following error: 'System.windows.shell' is a namespace and cannot be used as an expression!

Heres my code....any ideas what I'm doing wrong. Its got to be a simple...stupid error.

Private Sub mnuUpgrade_Click(ByVal Ctrl As Microsoft.Expression.Web.Interop.Legacy.CommandBarButton, ByRef CancelDefault As Boolean) Handles mnuUpgrade.Click

[CODE].....................

View 2 Replies

Controlling Windows Remote Desktop?

Mar 8, 2010

I am trying to overcome a problem I am having with remote desktop.Basically I have 2 machines running in different locations. I use remote desktop to access one of them (the "Remote Machine") from the other.("My PC")The "Remote Machine" is performing automated tasks that require the screen to be active, not the user login screen.

When I do so the Remote Machine logs off and presents the normal windows login screen.When I am finished reviewing the remote machine I log off and then I need to log back into the "remote" machine. It has no monitior but I can log in by pressing the enter key which sends a keypress to log into the user account( there is only one). In fact I do this the other way around. I press the enter key on the "Remote Machine" and this logs the user back in - terminating the remote session on "MyPC".

The problem is I have to physically go to the Remote Machine to press this enter key.This is a hassle - One solution is to remotely re-boot the remote pc but the lead time involved is too great.I am unable to fix this problem by tweaking setting or registry hacks so I guess the solution must be to cause the remote user to log back in programatically.I am an experienced VB user but I have never worked outside the windows environment. Ideally I would like to programmtically send a keystroke "{enter}" to the login screen but this doesn't work.

View 7 Replies

Declare And Pass Windows Handles

Sep 9, 2010

I've been using Shell() to launch an application, and Process.GetProcessById() to get the handle to that window, but I think I'm running into problems when passing the handle around to various functions. What is the best way to declare and pass windows handles so that they will be usable? After viewing the debug, it seems the Shell() and Process.GetProcessById() work fine. After I pass the handle off to the functions I need to use them in, the program starts spitting out garbage, and not doing what I want it to do. Short version of the proces

[Code]....

View 1 Replies

VS 2008 Controlling Windows Power Profile?

Jun 7, 2010

I have done a search on Google but not really found anything. Worst case I suppose I could use "powercgf.exe -l" to list them modes then try to get the GUIDs out of that.

View 6 Replies

.NET - Enumerating The Handles Not Windows Of A Specific Process?

Oct 16, 2009

I have some code designed to locate a specific process based off of its window text, gather the main handle, and then all of the child windows. However, I have run into one problem. I cannot seem to gather all the handles and their respective text. For example, when I test my program and do a handle count on the specific process, it tells me that there are more than 400 handles for this one process. How do I get the handle pointers for this process and also gather the text associated with these handles.I have included my source code for reference.

Code:Public Class Form1
Const GW_CHILD As Integer = 5 Const GW_HWNDNEXT As Integer = 2 Const WM_GETTEXT As Integer = &HD Const WM_GETTEXTLENGTH As Integer = &HE Const BM_SETSTATE As Integer = &HF3 Const WM_LBUTTONUP As Integer = &H202 Const WM_LBUTTONDOWN As Integer = &H201

[code]....

View 1 Replies

Enumerating The Handles Not Windows Of A Specific Process?

Aug 30, 2010

I have some code designed to locate a specific process based off of its window text, gather the main handle, and then all of the child windows. However, I have run into one problem. I cannot seem to gather all the handles and their respective text.

For example, when I test my program and do a handle count on the specific process, it tells me that there are more than 400 handles for this one process. How do I get the handle pointers for this process and also gather the text associated with these handles.

I have included my source code for reference.

Code:Public Class Form1
Const GW_CHILD As Integer = 5 Const GW_HWNDNEXT As Integer = 2 Const WM_GETTEXT As Integer = &HD Const WM_GETTEXTLENGTH As Integer = &HE Const BM_SETSTATE As Integer = &HF3 Const WM_LBUTTONUP As Integer = &H202 Const WM_LBUTTONDOWN As Integer = &H201

[code]....

View 9 Replies

VS 2008 Get Handles Of Two Windows With Same Class And Title

Sep 8, 2009

I need to make program that gets handles of two opened windows that have Same Class and Title. Only difference between them is its positions. And, after I get handles I want to SetForegroundWindow to make windows active when I need to.

My problems are:

a How to get handles of thouse windows (is it possible to do it by WindowFromPoint, since I know positions)?

b How to make thouse handles global after they are determined or pass it to the next Sub?

View 2 Replies

Controlling A Loop In An Application From Another Application?

Mar 2, 2011

I have 2 applications, "Application A" and "Application B" In application B, there is a loop that do some work Now, from Application A, I want to control this loop, in application B, so the loop gets run once each time Application A say so Up to this point, There is no problem, I just created a Mutex that I pass from an application to the other.

The problem comes when Application A want to stop the game -If application A terminate its thread without closing the Mutex, Application B does take it and the loop goes on non stop. But what I want is to exit the loop.I can immagine 3 ways to terminate the loop, but none of them apears to be the good way to do

1) Closing the mutex in application A. This will create an exception in Application B, which I can catch to terminate the loop

2) Create a custom windows message for Application A to notify Application B that the mutex needs to be close so Application B can exit the loop and close the mutex. ( However, I am using a mutex to avoid to use this windows message pathern, I do not want the UI thread to be involve in the mecanism )

3) Create another mutex that would be own by application A and that will be blocking another thread in Application B. This way, Application A by releasing this mutex can permit this other thread to set a boolean flag telling the thread in the loop to exit the loop.

To illustrate this, I made this short code. It implement the option 1) which is using the exception to exit the loop

Application A
Public Class Form1
Dim MutexA As Threading.Mutex

[code]....

View 8 Replies

Best Method Of Remotely Controlling/debugging A .NET Application?

Apr 25, 2011

I'm running a VB.NET application 24 hours a day on a dedicated machine. I'd like to be able to receive status updates and also control/debug the application remotely (i.e. from another computer via the internet).It would be an advantage if the communication was lightweight (in terms of bytes sent and received) so I can control the thing without needing a fast internet connection. Also, I'm running the application from within the IDE at the moment because there are some unhandled exceptions and it's easier to debug this way. It would be nice if I didn't have to compile it and catch all the errors.What is the easiest way to set something like this up, and what do I need to be aware of in terms of security?

Update:To clarify what input I need to give the application - in theory, none. If all went to plan I'd just set the application off and reading some sort of log would be fine. The problem is that it is unstable (mainly because it calls a web service which is very unstable and returns all sorts of weird things) and therefore seems to need constant input on my part.

It was my thinking that the only way I could do this sort of debugging remotely is by catching every error I could, reading the log, and somehow instructing the application to behave properly in future.

View 3 Replies

Make An External Application 'child' Of Main .Net Application

Jan 23, 2010

I use SetParent to make an external application a "child" of my Main .Net application. This works fine.What I need to know is why can't I use Me.MDIChildren(0)I thought that using SetParent would increase the number of children by 1, thus allowing me to reference it with the above code, but it shows there are no children in the array.I have been trying, without luck, for 2 days to try to maximize an external app being displayed in my app. I can get it to display, but I would love it if it could Dock to the same size as its container (a panel)

View 3 Replies

Use External Dll In Windows Service?

Apr 28, 2009

I am making use of a external dll in my vb.net program. When i run the program as a application, everything works fine. But when i use the same dll in windows service program, written in vb.net i get System.DllNotFound exception. The code to use the external dll is as follows[code]...Use external Dll in windows service?

View 2 Replies

Interact With External Windows Dialogs?

Apr 27, 2009

How can my VB.net application interact with windows modal dialog boxes?

For example when you click an HTML <input type=file> the dialog that opens is a windows form that isn't in my application, so how can I manipulate it?

View 4 Replies

VB Silverlight For Windows Phone "Handles Clause Requires A WithEvents Variable Defined In The Containing Type Or One Of Its Base Types"

May 16, 2012

when i am selecting form the xaml file a button and then tap event from the right (in order to set the tap event) it auto generates this sub :

[Code]....

View 1 Replies

Set A Button To Run An External Program From A Windows Form?

Jul 19, 2011

I have a program that I am working on and I would like to have it embed and run an AntiVirus program , but I am not sure if this can be accomplished with the use of a button.

[Code]...

View 5 Replies

VS 2010 External Windows Location/size?

Sep 24, 2010

I wam trying to create a application that will take a screenshot when the timer ticks over.What I need to find out is how do i Make a type of 'crosshair' system for the window that the screenshot will be taken.ike I will have my main VB app and the end-user will drag the crosshair over lets say, Their iTunes libary and the ap will get the height, width of the iTunes and then take a screenshot JUST OF THE ITUNES program, not the whole dekstop.

View 23 Replies

Windows Services - Stop A External Executable ?

Feb 8, 2010

I am developping a Windows Service in Visual Basic, witch will start an *.exe when starting. It's working pretty fine. Now how can I stop this *.exe while stopping this windows service? My code is as below:

Public Class MyWinService
Dim RetVal
Protected Overrides Sub OnStart(ByVal args() As String)[code]......

View 1 Replies

IE With External Application?

Oct 3, 2009

I have a quick, yet simple (i think?) question. How can i use the address bar to send commands to a external application?

Example:

AOL Instant Messenger I havent used this application in a long time. But i remembered if you wanted to add a friend to AIM from their online profile it directed them to a link such as:

aim:addfriend=contactID and AIM would pick this up and add it the contactID to the application. The link i posted is more than likely not the correct link they use but it shows what im trying to accomplish.

Im looking to achieve something along the lines of: myApplication:command=commandValue

View 3 Replies

Email Application, Controlling Text Position In Email Body?

Jan 18, 2010

I am buidling an application that users can use to submit text data and attachments to email recipients. Certain fields, quite a few in fact from the textboxes in the app will be in the email body, and some in the subject line.This is how I am doing it right now, but I figured there has to be a better way. In VB it is one single line of code, not many like it is here. Ideally I would like to be able to better control the positioning in the message body.

mail.Body = String.Concat(Label1.Text, " ", TextBox1.Text, " ", Label2.Text, " ", TextBox3.Text, " ", Label5.Text, " ", DateTimePicker1.Text, " ", Label3.Text, " ", TextBox2.Text, " ", Label6.Text, " ", RichTextBox1.Text, " ", Label7, " ", RichTextBox2.Text)

View 2 Replies

Center An External Application Using .net?

Mar 23, 2012

how to center an external app on the screen, an example would be Adobe Reader, using either Process.Start or Shell. I've 'attempted' both but haven't found anything to control the position. I've also found some code using Api32 functions, FindWindow, MoveWindow, etc, but have not been successful at those either.

View 3 Replies

Copy From An External Application?

Mar 17, 2009

I have looked all over for an answer to this question and have failed to find one. I have two applications. App1: I have no control over anything in this application aside from standard user inteface options. (Enter text, apply, ok) Someone else has created this program and I have no direct access to the database or any code. I can not make any changes to this application.App2: This is the application that I am currently creating. All changes will need to be made here.I currently have a program set up to copy information from App2 to App1. A user clicks a button in App2 and then goes to App1 and hits F8. App2 is waiting to get F8 and when it does it proceeds to use a series of sendkeys to enter the information from App2 into App1.Question 1: Is there a better way to get info from App2 into App1?I am trying to "smarten" my program up a bit. I would like it to read fields from App1 and compare them to certain variables and then do an action. I have tried to use sendkeys to copy from App1. This sometimes works, and other times the clipboard says object not collected it is not a valid format. So this method is obviously not reliable enough for me.Question 2: How do I copy data from a text box in App1? Sendkeys seems to not work. Again, keep in mind that I don't know textbox names in App1 so as far as I know, I can't do anything like textbox1.copy.

View 2 Replies

Move An External Application?

May 1, 2012

How can I move an external application. For example, notepad.location = 200, 200

how would I tell the program what notepad is?

View 4 Replies

Activate Application Through External Link

May 19, 2012

I want to be able to activate my application through my website. Like AIM, they have a protocol "aim?.." what ever, I was wondering how I might go about that? My application is standalone, I wonder if this would reduce the chances of this being possible.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved