I have an app that calls another executable and then minimizes it until I need it. But when I do this, my app loses focus and when the user types into my app it inputs unwanted input to the minimized external application.
Is there a way to give and take focus between my vb app and the external one?
In VB.NET, you can set focus to an external application using
AppActivate("Windows Name")
or
AppActivate(processID As Integer)
Now this works fine if you do for example:
Dim intNotePad As Integer = Shell("C:WINNTNotepad.exe", AppWinStyle.MinimizedNoFocus) AppActivate(intNotePad)
But when I do:
For Each theprocess As Process In processlist If InStr(theprocess.ProcessName, "DWG") Then strProcessList += String.Format("Process: {0} ID: {1}", theprocess.ProcessName, theprocess.Id) + vbCrLf AppActivate(theprocess.ID)
[code]....
then it doesn't find the window, even if it's open and even if it finds the window using the window title.But I need it by process ID.How can I do that?I need it to set focus on a 3rd party installer in a windows installer setup project.
I have an application which calls an external process. I would like this process to be open as soon as it is called. i.e. with no user interaction.This is because I would like to send Keys to it to interact.I know how crude this is but this is a thrid party application that my boss has promised will open is a specific way. Dim procSungard As System.Diagnostics.Process = _
I am wondering if it is possible to call an application, say "notepad.exe" (among other application's that are already open) and setting focus on the same, so the user can readily start working on it.
Essentially what I would like to do is press a button, this then triggers a code to focus on a certain program, focus on a certain textbox and input the text from the clipboard not via pasting.
Now I have been able to achieve all of the above fairly easily except for one crucial component, focusing on the desired component. This program is essentially to automate some data entering for users via hotkeys, therefore I can't simply simulate tabs as it will not always be in the same position. So now comes the question, how do I focus on specific textboxes/controls in other programs?
I've been able to find huge walls of code with no explanation beyond "this is a concept". However no documentation or relevant examples.
I need to program an application which acts like a passwordfiller.
Describtion: When i open up internet explorer a popup comes up requesting my username and password and i need a way to set my application near the popup and fill it in.
Here is what i need:
- Get Window hwnd (using find window api) *Ok - Get Window state *Ok - Get window Position *Help - Get Window Length and Width *Help - Focus on the window *Help - Sendkeys *Ok
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.
I'm hoping someone can provide me with some help in regards to this, here's a quick overview of what I'm doing: I'm using user32.dll API on a 2 second timer to detect which window is open, FindWindow(), once I've found the window I'm looking for, I use FindWindowEx() to get the child window of the previously found one.
So I've got my window which contains 2 items. An image, and an Input box.
2 questions (Minor, and Major)
Minor: Is there a better way to monitor when a particular window opens?
Major: How would I extract the image that is held on the form? And then insert text into the input box?
Note: The image is variable - it's polled from a website.
I want to know how to send keys to some application, for example, minimized notepad.I have searched in google, youtube and this forum too.Ppl saying that with Sendkeys.send you can only send keys to application what is in focus of screen. So, can anybody post code here for sending keys to application?
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 .
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)
I am having problem setting focus on specific cell in my Datagridview1 . On Form1 when clicking on cell 3 in any row, I am callig a Dialog1. However, when done working with it, and closing the Dialog1, the focus returns to cell 3 in my Datagridview1 . I like to set the focus on the next cell(4) making it the current cell.
And few other things, I am always getting this exception: Operation is not valid because it results in a reentrant call to the SetCurrentCellAddressCore function.
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
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
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.
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]
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.
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.
I have got Skype configured to launch minimized on windows starts.Now I need to bring Skype to front from a button from my full screen application button. I have got this code:
For Each p As Process In Process.GetProcessesByName("skype") ShowWindow(p.MainWindowHandle, SHOW_WINDOW.SW_NORMAL) Next p
I am developing a program where I will save the information from a "Log file" from an external application..I have a biometrics system that reads and saves the log file to disk,once the user logs to the system, the system will save the file to a log file after that the system that i will develop will read the data from the "log file"(probably a text file) and send it to sql server.
I am developing a program where I will save the information from a "Log file" from an external application..example: I have a biometrics system that reads and saves the log file to disk,once the user logs to the system, the system will save the file to a log file after that the system that i will develop will read the data from the "log file"(probably a text file) and send it to sql server what event should I use?
i'm working on visual basic with an external program and want to lunch this program from visual basic like withe the shell but what i need the most is to make him incorporated into the form means that the executable is lunched within the form included into it in order to make them like one part for the user is there any way to make it with any version of VB or .net or visual studio even the 2010 ?
I'm wondering if there is any way to exit an external batch application. My project is to make a server auto Restarting program, and the application that runs the server is titled runserver.bat I am using Visual Basic 2010 Beta 1 (with .NET 4.0 framework),
how can I make start my external application "DXSETUP.exe" at center screen position using this code?
Private Sub Panel3_MouseClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel3.MouseClick Try Me.Hide() Threading.Thread.Sleep(2000)