Getting A Window's Process Name?
Oct 23, 2009
How would I get a window's process name? For example, if im using firefox, and im on VBForums, I want my program to look for a window with a name of "VBForums - Visual Basic and VB .NET Discussions and More!" and then get its process name.
View 4 Replies
ADVERTISEMENT
Nov 30, 2010
i am using a server that remain working when i close the window ,how to stop the process
View 5 Replies
Nov 17, 2009
i am using a server that remain working when i close the window how to stop the process
View 4 Replies
Mar 27, 2009
I have been working on a program to hide windows for an active process. I found some examples on the internet explaining how to do this. The problem, however, is that after I hide the windows I cannot get them back. The process still shows up in task manager but i cannot restore the window..
Imports System.Runtime.InteropServices
Imports System.Diagnostics
Public Class Form1
[code].....
View 1 Replies
Jun 17, 2010
what I am trying to do its to automate a user interraction by code.First I have a button named "start" once pushed I navigate with webbrowser to download a file. What I try to do it is to find the window "File download" by his title name, I allready made a seperate thread to loop into to list of process until it found the window "File download"
Where I need help, it is with the process list. I try that code below but I don't see the process "File download" in the list.and once I found it I would like to use sendMessage() api to simulate the click of save.I would like to find another window after to catch the window "save as" and click save and if the window that ask for overwriting appear I would like to find it too and click yes.
Why I use webbrowser instead of httpwebrequest it is because the web site required to login, i try using cookie, etc. No success so I decided to use webbrowser, I navigate first into the login page, I login manually and once it is done I can click the button to start downloading. I want to make an automatic download loop, I have lot of files to download on that site, sometimes .doc and other times it is .pdf
I didn't found a way yet how to force webbrowser to ask for downloading .pdf instead of opening it in acrobat, if someone can help me for that point too
[Code]...
View 4 Replies
Apr 19, 2012
How to resize minwindow in outside process
View 4 Replies
Apr 14, 2009
I have the below code in a function. It is meant to start a process hidden and return the ProcessID. The problem is when RunProcess.Start happens the window is not hidden.
[Code]...
View 2 Replies
Jul 6, 2009
I am making a key presser for a game and I have it to just spam the keys, but I want it to send the keys to a certain process or window. Here is what I have:
Private Sub Timer8_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer8.Tick
SendKeys.Send(1)
SendKeys.Send(2)
SendKeys.Send(3)
SendKeys.Send(4)
SendKeys.Send(5)
SendKeys.Send(6)
SendKeys.Send(7)
'#7 in box'
That's an example of 1 timer. Is there any way to make it just send the keys to a process I am kinda new to this.
Process.GetProcessesByName("SRO_Client")
View 2 Replies
May 20, 2011
I have 2 desktop programms..I will call them P1 and P2.So, P1 launches P2 as a process. However, at some point I want to be able to show a window in P2. My problem was that this window, when called, was showing correctly placed, in the middle of the screen, but in the back of P1.So, in order to show it as the top most window, above all others applications running on my computer, I used the windows API:
Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
Const SWP_NOSIZE = &H1[code]...
Now the window shows on top of all other, but it is placed in the top left corner of the screen, resized to much small dimentions, that I cannot even see the controls on it.
View 1 Replies
Oct 31, 2009
For Each MyProc As Process In Process.GetProcesses If MyProc.MainWindowTitle <> "" Then ListBox1.Items.Add(MyProc.MainWindowTitle) Next How can I get the Process name of the Window?
View 3 Replies
Jun 28, 2010
I am looking to go from the process name to the windows title.[code]...
View 1 Replies
Mar 18, 2012
I have 3 questions: How to get the process which the main window is active How to change the WindowState of that process main window How to resize the process main window[URl]..
View 9 Replies
Jan 10, 2006
How can I hide a window knowing his process ID?
I am writing a program which opens another application with the "shell" command (so it's easy for me to get the procID). Once it is running I want to hide or show it when needed by pressing a button in my program...
View 3 Replies
Oct 29, 2010
I have this application that I haven't created and I don't have the source for. But it's really handy in handling and recording the time I've used on different projects. But it has this annoying pop-up that comes up that contains a window and some debug text I believe. It wasn't done by a professional, it was just a hobby project. Everything is working even though this window appear. So I was wondering if it's possible to "hijack" a window and minimizing or closing it somehow?
View 1 Replies
Jan 6, 2010
The user32.dll provides functions to get the process id from a process executable name, and I can also obtain the active or foreground window that the user is working.Can I determine what windows the targeted process has opened? Otherwise, can I find out what details about the process that opened the foreground/active window?
My code needs to run only when another specific process is running and the user is actively using that window, while that window is the top-most window on the desktop.
View 1 Replies
Dec 17, 2008
I have an application that while running (it doesn't have to have focus, it can be minimized or another window can have focus) can listen and respond to global hot keys pressed. For instance I have the key combo Ctrl+Shift+0. When this hot key is pressed my app can recognize this and then I can do something.
This "something" that I want to do is:
1. Know what window is currently active and has focus when the hot key was pressed. And...
2. Change the size of said window
I can currently identify what window has focus by the following (the code block is inside the function that fires when the hot key is pressed):
Code:
Private Declare Function GetForegroundWindow Lib "user32.dll" () As IntPtr
Private Declare Function GetWindowThreadProcessId Lib "user32.dll" (ByValhwnd As IntPtr, ByRef lpdwProcessID As Integer) As Integer
[Code]....
I can get the handle to the active window and the process that owns that window.
Having this information, how can I get access to the window itself? Furthermore, get access to it's properties so I can change the size of this thing? I'm not sure If this is the right information to be gathering for what I'm trying to accomplish but it seems that I'm close.
View 1 Replies
Sep 28, 2004
i used an old VB6 algorithm to subclass a window and made a few changes at the 'hook method' to make it work in .NET.
Private Declare Function SetWindowLong Lib "user32.dll" Alias "SetWindowLongA" (ByVal hWnd As Integer, ByVal nIndex As Integer, ByVal dwNewLong As delWindowProc) As Integer
[Code].....
View 2 Replies
Sep 3, 2009
i am trying to write a code who find a window and draw line or string on it but nothing found yet,the process can aslo be a game so did it required to use 'Direct3dx' i try something like this but not woking...
[Code]...
View 2 Replies
Sep 18, 2009
I have this code, which will get all windows thats open, like explorer.exe do. It will write all the titles to listbox1, like this example.I will then try to do many things, like close, minimize, maximize, and restore like this:[code]but how do I do this with the selected index in my listbox. My code must somehow get the processname, or processID from the Window-name.
View 2 Replies
Aug 1, 2011
We create a window service that will launch multiple process of an application with different configuration. And application further communicate with sql server. It works fine when we start service manually from service manager. It launch all the process ( try with launching 3 process ). But when we test it by restart the machine and service launch automatically then it launch only one process third one. I check the event log in event viewer. I see the following message by MSSQL$MSSQLEXPRESS service
Login failed for user 'dduser'. Reason: Failed to open the explicitly specified database. [CLIENT: <local machine>]
one thing we also tried by delaying ( with thread sleep ) the code execution of service. Then by starting machine again , it launch 2 process , first one still not launch.
View 3 Replies
Feb 10, 2010
I haven't programmed in Visual Basic before. I downloaded the 2008 Visual Basic and I'm trying to write something that activates the frontmost window of the parent process. I realize that there's a few steps... find the parent process, get its first window (z-axis wise), then raise that window even though it currently isn't the active program.
I've found some example code on the net, but none of it compiles, even code I found at Microsoft. I'm guessing that it's all an older syntax that's no longer supported. [code]...
View 2 Replies
Jan 1, 2010
This is a program in vb.net, but I'm planning to use an outside process by using system.diagnostics.process.start("C:Otherprogram.exe") Now what I want to do is to resize the default size of window of outside process, can I do that?So that only the things that will be needed by the user can be seen?
View 2 Replies
Sep 7, 2011
I have an application that gathers information from a user into a Win.Form and then uses the Process.Start() to start Notepad and then using Sendkeys write the Notepad document.Sometimes this works great and sometimes the Notepad window is not started as the foreground process and the document is not written.What is the best way to ensure that the window opened by Process.Start("Notepad.exe") is the active window for the duration of the Process?
View 10 Replies
Sep 6, 2011
I would like to launch a command line exe I created. For now it's a test program that writes Hello World to the console. I can launch it, but the shell window it displays it in only stays for a split second.
I know I can add a line to my console mode program (readline). But I would like to control it from the process launch. I will be using console mode programs that I did not write myself, and many of them don't stall the output. I can't find the right properties and methods to control the default shell behavior!
View 5 Replies
Apr 27, 2012
How we can kill the other running process in window with VB.NET 2.0 framework?
View 4 Replies
Sep 22, 2010
I have this in a VB.NET console application:
Dim p As ProcessStartInfo
p = New ProcessStartInfo(Environment.CurrentDirectory & "injavac.exe",ClassName & ".java")
Dim ps As Process = Process.Start(p)
This does run the java compiler on the file, but it does so in a new window. I want the output from javac to appear in the same console that is running my application. How can I do this? Perhaps there is another method for running commands in the current console? Or maybe I can supress the second console window from opening and redirect its output to the current console?
View 2 Replies
Dec 23, 2011
I have an windows application from where i start another EXE by using the system.diagnostics.process.
I do as follows:
private myExe as System.Diagnostics.Process
myExe = New System.Diagnostics.Process()
myExe.StartInfo.WorkingDirectory = "...my path ..."
myExe.StartInfo.FileName = "...my exe..."
myExe.Start()
View 8 Replies
Jun 6, 2010
how can i allow resizing of window that doesnt allow resizing,.
View 2 Replies
Jan 7, 2012
So i want to start an application with my vb.net app and it should start as a hidden process, meaning no window and nothing in the task bar, only in the task manager ofcourse.
This is what i do
Dim fov As New Process
If CheckBox2.Checked = True Then
RichTextBox1.Text = RichTextBox1.Text & vbCrLf & "* - Launching"
fov.StartInfo.FileName = ("test.exe")
[Code]...
This does not work.. I have also tried the "fov.StartInfo.CreateNoWindow = True" command which does not work either. I can live with a solution that would start the window minimized instead of totally hidden.
View 9 Replies
Jun 10, 2009
I am using the code below, but it still shows the program.For example, if I pass in CALCIt will start the calculator but show it.
Code: Public Function ExecuteFileHidden(ByVal lFile As String, ByVal largs() As String) As String Dim oSTR As String = "" oSTR += "Attempting to execute " & lFile & vbCrLf Try Dim p As New System.Diagnostics.Process p.StartInfo.FileName = lFile Dim a As String = "" For Each l In
[code]....
View 1 Replies