Search Results

Search found 22569 results on 903 pages for 'win32 process'.

Page 14/903 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • Opening up process and grabbing window title. Where did I go wrong?

    - by user1632018
    In my application I allow for the users to add a program from a open file dialog, and it then adds the item to a listview and saves the items location into the tag. So what I am trying to do is when the program in the listview is selected and the button is pressed, it starts a timer and this timer checks to see if the process is running, and if it isn't launches the process, and once the process is launched it gets the window title of the process and sends it to a textbox on another form. EDIT: The question is if anyone can see why it is not working, by this I mean starting the process, then when it's started closing the form and adding the process window title to a textbox on another form. I have tried to get it working but I can't. I know that the process name it is getting is right I think my problem is to do with my for loop. Basically it isn't doing anything visible right now. I feel like I am very close with my code and im hoping it just needs a couple minor tweaks. Any help would be appreciated. Sorry if my coding practices aren't that great, im pretty new to this. EDIT:I thought I found a solution but it only works now if the process has been started already. It won't start it up. Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Dim s As String = ListView1.SelectedItems(0).Tag Dim myFile As String = Path.GetFileName(s) Dim mu As String = myFile.Replace(".exe", "").Trim() Dim f As Process Dim p As Process() = Process.GetProcessesByName(mu) For Each f In p If p.Length > 0 Then For i As Integer = 0 To p.Length - 1 ProcessID = (p(i).Id) AutoMain.Name.Text = f.MainWindowTitle Timer1.Enabled = False Me.Close() Next Else ProcessID = 0 End If If ProcessID = 0 Then Process.Start(myFile) End If Next End Sub

    Read the article

  • Can 'screen' grab an existing process and tie itself to it?

    - by warren
    Scenario: Started a process that's going to take "a while" to complete outside of screen. Need to leave the terminal / netowrk hiccups Process lost Would be nice if: Started a process outside of screen Realize error Run screen <magic-goes-here> and it grabs the active process to itself From the man pages and --help info, I don't see a way this can be done. Is this possible directly with screen? If not, is it possible to change the owning shell of a process, so that the bash (or other shell of your choosing) instance inside screen can have a command run which will change the parent shell of the initial process to itself from the originator?

    Read the article

  • Execute C++ exe from C# form using Process.start()

    - by Dan
    Hi, I'm trying to create a C# form app that will allow me to use all of my previous C++ programs from one central program. I'm able to open the exes with Process.start, however it does not compile the code correctly. Example code: Process.Start("C:\\Documents and Settings\\dan\\Desktop\\test.exe"); This will bring up the console and act like it's running, but it does not run like when I normally compile out of the C++ editor. Is there a startinfo variable I need to set to signify that it's a c++ program or something along that line? Also, is there any way to execute a C++ program using process.start that will allow me to pass it variables through the command line via argc and argv? Thanks

    Read the article

  • Failed to Kill Process in SQL 2008

    - by Andrea.Ko
    I have a process with the following information, and i execute the kill process to kill this id, and it return me "Only user processes can be killed." SPID:11 Status:BACKGROUND Login:sa HostName: . BlkBy: . DBName: SAFEMIG Command:CHECKPOINT Normally, all the session to login to this server, it should have a HostName which display our PC name, but this connection is with a dot, so not sure who is executing what process that have this connection. I execute "dbcc inputbuffer(11)" It return me"EventType= No Event, Parameters = 0 and EventInfo=Null" Appreciate for any help\advice on this problem!

    Read the article

  • Programmatic resource monitoring per process in Linux

    - by tuxx
    Hi, I want to know if there is an efficient solution to monitor a process resource consumption (cpu, memory, network bandwidth) in Linux. I want to write a daemon in C++ that does this monitoring for some given PIDs. From what I know, the classic solution is to periodically read the information from /proc, but this doesn't seem the most efficient way (it involves many system calls). For example to monitor the memory usage every second for 50 processes, I have to open, read and close 50 files (that means 150 system calls) every second from /proc. Not to mention the parsing involved when reading these files. Another problem is the network bandwidth consumption: this cannot be easily computed for each process I want to monitor. The solution adopted by NetHogs involves a pretty high overhead in my opinion: it captures and analyzes every packet using libpcap, then for each packet the local port is determined and searched in /proc to find the corresponding process. Do you know if there are more efficient alternatives to these methods presented or any libraries that deal with this problems?

    Read the article

  • Java respawn process

    - by Bart van Heukelom
    I'm making an editor-like program. If the user chooses File-Open in the main window I want to start a new copy of the editor process with the chosen filename as an argument. However, for that I need to know what command was used to start the first process: java -jar myapp.jar blabalsomearguments // --- need this information Open File (fileUrl) exec("java -jar myapp.jar blabalsomearguments fileUrl"); I'm not looking for an in-process solution, I've already implemented that. I'd like to have the benefits that seperate processes bring.

    Read the article

  • Strategies for porting application from Win32 API to GTK+

    - by Vitor Braga
    I have a legacy application written in C, using the raw Win32 API. The general level of abstraction is low and raw dependency on <windows.h> is common. I would like to port this application to GTK+. There are any kind of guidelines or best practices on how to do this? I've previously ported a MFC application to Qt, but the application was very abstracted - it draw it's own set of widgets, for example - and initial porting was very straightforward. I've been thinking at first using Wine to build a native Linux executable and then trying to slowly refactor it into a GTK+ app. Does some one have best practices or previous experiences to share about this?

    Read the article

  • Problem with System.Diagnostics.Process RedirectStandardOutput to appear in Winforms Textbox in real

    - by Jonathan Websdale
    I'm having problems with the redirected output from a console application being presented in a Winforms textbox in real-time. The messages are being produced line by line however as soon as interaction with the Form is called for, nothing appears to be displayed. Following the many examples on both Stackoverflow and other forums, I can't seem to get the redirected output from the process to display in the textbox on the form until the process completes. By adding debug lines to the 'stringWriter_StringWritten' method and writing the redirected messages to the debug window I can see the messages arriving during the running of the process but these messages will not appear on the form's textbox until the process completes. Grateful for any advice on this. Here's an extract of the code public partial class RunExternalProcess : Form { private static int numberOutputLines = 0; private static MyStringWriter stringWriter; public RunExternalProcess() { InitializeComponent(); // Create the output message writter RunExternalProcess.stringWriter = new MyStringWriter(); stringWriter.StringWritten += new EventHandler(stringWriter_StringWritten); System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo(); startInfo.FileName = "myCommandLineApp.exe"; startInfo.UseShellExecute = false; startInfo.RedirectStandardOutput = true; startInfo.CreateNoWindow = true; startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; using (var pProcess = new System.Diagnostics.Process()) { pProcess.StartInfo = startInfo; pProcess.OutputDataReceived += new System.Diagnostics.DataReceivedEventHandler(RunExternalProcess.Process_OutputDataReceived); pProcess.EnableRaisingEvents = true; try { pProcess.Start(); pProcess.BeginOutputReadLine(); pProcess.BeginErrorReadLine(); pProcess.WaitForExit(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } finally { pProcess.OutputDataReceived -= new System.Diagnostics.DataReceivedEventHandler(RunExternalProcess.Process_OutputDataReceived); } } } private static void Process_OutputDataReceived(object sender, System.Diagnostics.DataReceivedEventArgs e) { if (!string.IsNullOrEmpty(e.Data)) { RunExternalProcess.OutputMessage(e.Data); } } private static void OutputMessage(string message) { RunExternalProcess.stringWriter.WriteLine("[" + RunExternalProcess.numberOutputLines++.ToString() + "] - " + message); } private void stringWriter_StringWritten(object sender, EventArgs e) { System.Diagnostics.Debug.WriteLine(((MyStringWriter)sender).GetStringBuilder().ToString()); SetProgressTextBox(((MyStringWriter)sender).GetStringBuilder().ToString()); } private delegate void SetProgressTextBoxCallback(string text); private void SetProgressTextBox(string text) { if (this.ProgressTextBox.InvokeRequired) { SetProgressTextBoxCallback callback = new SetProgressTextBoxCallback(SetProgressTextBox); this.BeginInvoke(callback, new object[] { text }); } else { this.ProgressTextBox.Text = text; this.ProgressTextBox.Select(this.ProgressTextBox.Text.Length, 0); this.ProgressTextBox.ScrollToCaret(); } } } public class MyStringWriter : System.IO.StringWriter { // Define the event. public event EventHandler StringWritten; public MyStringWriter() : base() { } public MyStringWriter(StringBuilder sb) : base(sb) { } public MyStringWriter(StringBuilder sb, IFormatProvider formatProvider) : base(sb, formatProvider) { } public MyStringWriter(IFormatProvider formatProvider) : base(formatProvider) { } protected virtual void OnStringWritten() { if (StringWritten != null) { StringWritten(this, EventArgs.Empty); } } public override void Write(char value) { base.Write(value); this.OnStringWritten(); } public override void Write(char[] buffer, int index, int count) { base.Write(buffer, index, count); this.OnStringWritten(); } public override void Write(string value) { base.Write(value); this.OnStringWritten(); } }

    Read the article

  • documentBuilder: The process cannot access the file because it is being used by another process

    - by st mnmn
    I am using DocumentBuilder (of openXML api), to those who doesn't know the documentBuilder I'll give a short explanation: it has a function 'BuildDocument' which gets list of sources (each source contains wmldocument), and string of fileName to save to. public static void BuildDocument(List<Source> sources, string fileName) the purpose of this function is to build one word docx which contains all the sources. it merges some docs to one. at the end of its functionality it saves the doc using: File.WriteAllBytes(...) but when I run my project on the server I keep getting the error: "The process cannot access the file because it is being used by another process." few times it works ok. and in the visualStudio it also works without errors. what can be the problem?

    Read the article

  • Get Process ID of Program Started with C# Process.Start

    - by ThaKidd
    Thanks in advance of all of your help! I am currently developing a program in C# 2010 that launches PLink (Putty) to create a SSH Tunnel. I am trying to make the program able to keep track of each tunnel that is open so a user may terminate those instances that are no longer needed. I am currently using System.Diagnostics.Process.Start to run PLink (currently Putty being used). I need to determine the PID of each plink program when it is launched so a user can terminate it at will. Question is how to do that and am I using the right .Net name space or is there something better? Code snippet: private void btnSSHTest_Click(object sender, EventArgs e) { String puttyConString; puttyConString = "-ssh -P " + cboSSHVersion.SelectedText + " -" + txtSSHPort.Text + " -pw " + txtSSHPassword.Text + " " + txtSSHUsername.Text + "@" + txtSSHHostname.Text; Process.Start("C:\\Program Files (x86)\\Putty\\putty.exe", puttyConString); }

    Read the article

  • Background process in linux using Ruby on Rails

    - by Salil
    Hi All, I want to do some process such as sending emails or using ffmpeg commands in backgound as it takes to much time. I want it should run in a background. I am using Fedora 10. Also can i check whether my background process is running successfully or not . is it posssible?if yes what would be the steps i should follow.Any help is appreciated. Thanks in Advance.

    Read the article

  • Buisness Rule and Process Management?

    - by elgcom
    After some searching in google and wikipedia, I still can not get a clear image about the "difference" between BRMS (Business Rule Management System) and BPM (Business process management)/workflow system. can those two concepts do the same thing from each other? (theoretically) A "rule" can be modeled as a "process" as well. isn't it?

    Read the article

  • How to automaticly close process that uses more that specified amount of memory on windows

    - by SINTER
    How to automatically close process that uses more that specified amount of memory on windows. Is it possible to specify some amount of memory (for example 1MB) and to run some executable file with those parameters? If process tries to allocate more than that amount of memory it should close and return some error value. Is there an easy way to do something like that on windows? Excuse my English.

    Read the article

  • Software development process for a part time University project for 1 developer?

    - by Pricey
    I will be doing a part time University project soon and the time frame for it is around 8 months with approximately 10-15 hours a week spent working on it, with a review by a tutor each quarter. My question is what software development process would you recommend using when the course requires you to work on your own in order to manage yourself as well as the project? I wanted to use a weekly or bi-weekly iterative approach to my work but a lot of the processes seem tailored to teams of people. I am looking at XP (Extreme Programming) OR Scrum as something that is less than the norm for University work but again Scrum I don't know a lot about yet, and a question I have is; can you say you are doing XP without pair-programming? because my tutor seems to think that I have to stick to all the practices otherwise I can't do it (nevermind if I am working alone). We can have external user input as well but due to the small timescales with part time work it may be more beneficial for myself to be the user as well, which is not what I prefer considering how I can get lost in the design.

    Read the article

  • Can I use standard tools to get the full name of a process, when its name has embedded spaces?

    - by fred.bear
    I understand that it may be a rare situation for an executable to have spaces in it, but it could happen. An example may be the best explanation.. Using standard tools, I want to determine the location (on the file system) of the executable which owns(?) the current window... get the current window ID ...(xdotool getactivewindow ) use the ID to get the PID ...(wmctrl -p -l | sed ... ID .... use the PID to get the executable's name ... (ps -A ... here is where I run into problems ! Whith ps, when listing only the executable's name (-o ucmd), it truncates the name to 15 characters, so this rules out this option for any name which is longer. Widening the column (-o ucmd:99 ) makes no difference.. If pgrep is anything to go by, its matching is limited to 15 because of stat (see: info pgrep).. Listings in variants of "full" mode (eg -A w w) are not useful when the name concerned has spaces in it, because this name is separated from its args by another space!.. Also, in "full" mode, if the process was started by a link, the name of the link is shown, rather than the executable's name. Is there some way to do this (using standard tools)? ...or are spaces a show stopper here?

    Read the article

  • Can I draw Qt objects directly to Win32 DC (Device Context)?

    - by Kevin
    I can draw Qt objects to an QImage and then draw the image to HDC or CDC. This may hurt our application's performance. It would be great if I can draw Qt objects directly to Win32 HDC or MFC CDC. I expect that there is a class, say QWin32Image for clear, then I can use it in this way: QWin32Image image(hdc, 100, 100, Format_ARGB32_Premultiplied); QPainter painter(&image); painter.drawText(....); Is it possible for my thought? Or is there a better way to do that?

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >