hello,
This is my first time to post here, and I need some help with a little problem. I am trying to watch the process of of one application. and show it in a true/false field. here is what i got. I am showing you 2 different ones i have tried.
here is the first one...
Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As System.EventArg s) Handles MyBase.Load
Dim procname = "notepad.ex e"
Dim inum
Dim inum2
End Sub
Sub checkmem()
Dim procname = "notepad.ex e"
'Dim procname = "WCAPW32.ex e"
'notepade.exe = Process.GetCurr entProcess
Dim inum
'Dim x As Process = Process.GetCurr entProcess
If procname <> "" Then
x = GetCurrentProce ss(, procname)
Else
x = GetCurrentProce ss(True)
End If
Label1.Text = (Format(x(0, 1), "#,###"))
inum = (Format(x(0, 1), "#,###"))
End Sub
Private Sub Timer2_Tick(ByV al sender As System.Object, ByVal e As System.EventArg s) Handles Timer2.Tick
checkmem()
Dim inum2
Dim inum
inum2 = Replace(inum, ",", "")
If (inum2 > 4100) Then
RadioButton1.Ch ecked = True
Else
RadioButton1.Ch ecked = False
End If
here is the 2nd one i tried to make it easier... LOL...
Private Sub Timer2_Tick(ByV al sender As System.Object, ByVal e As System.EventArg s) Handles Timer2.Tick
Dim processes() As Process
processes = Process.GetProc essesByName("no tepad.exe")
'Dim proc = "notepad.ex e"
If ("notepade.e xe" > 2) Then
RadioButton1.Ch ecked = True
Else
RadioButton1.Ch ecked = False
End If
End Sub
**** if you can tell i am trying to put it with a counter so it will always check to see if the process will start, the first one did it by memmory, and the second one tried it by cpu.
thanks for any help.
1 1221
oh i forgot i am in vb.net 2003
thanks
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Premshree Pillai |
last post by:
Hello,
I recently posted a simple Python script--Watch That
Post--that lets you watch a URL for any changes.
I wrote it to watch posts on LiveJournal, but it can
watch any URL.
It's at http://premshree.seacrow.com/code/python/watch
|
by: jason |
last post by:
Does anyone have any ideas on a PAGE WATCH tool or an application that
allows a user to be notified when page changes automatically by email.
My immediate thoughts would be to use the FSO object to go in and check
files by date and then generate a CDO script.
Another possibility would be to limit the tool to database portions of the
site where I can track changes.
But, both approaches are complicated by the need to automatically...
|
by: Nancy Drew |
last post by:
hi all
i want to build a trouble ticket system. i'd like to have a component
written in vbscript watch a specific mail folder for income email (something
like 'troubletickets@acme.com') the system should write the sender's email
address, time received, and message body to sql server, return a new trouble
ticket, etc. anybody know how to set this kind of thing up?
tks
|
by: Neil |
last post by:
Hi,
If I have the code line "DateTime d1 = DateTime.Now;" and
look at d1 in the watch window, I thought I'd only see the
properties of the DateTime object variable d1.
However I seem to be seeing lots of other properties and
objects - can anyone explain what these are and where they
come from?
|
by: Peter Steele |
last post by:
Say I have a managed C++ app with some code that looks something like this:
void MyMethod()
{
struct Point { int x, y; };
Point* p = new Point;
p.x = 1;
p.y = 2;
| |
by: Brad |
last post by:
When debugging my current web project, in VS2003, I found I had lost the
ability to drill down on watch objects in the Watch Window; I could only
view the single value specific watch objects.
Here's what I discovered. In addition to my main web project and several
middle tier projects, I also added an "empty" web project in my solution
(Add - New Project - Empty Web Project). This empty web project is what is
causing the above...
|
by: |
last post by:
Hello,
I am working on an AntiSpyware software/utility using VB.NET 2005
I need to create a class to watch for processes starting or executables
starting running.
So far the solution that I have come up with is to use the
System.Diagnostic.Process to iterates through running processes... This is
tedious and CPU intensive...
I would like a solution similar to the FileSystemWatcher, that would notify
me as soon as a new executable or...
|
by: Alistair George |
last post by:
Could anyone tell me why I cannot bring up the watch window. MS help
says its there but no matter what I do, I cannot find any settings to
enable this debug missing menu item. Searched Google, asked others and
one other said he could not find it either. Usually MS says that you
need enterprise or whatever if a feature is missing but in this case
there is no comments - it just should be there!
Thanks,
Alistair.
|
by: Greg |
last post by:
Dear all,
I've trouble with debugging a huge programm.
I want to look into the properties of an object when I am at a breakpoint.
But in the watch window he tell's me that the object is "out of scope".
Two questions:
1.) Is there a way to look into an instance of an object even if it is not
"visible" to the actual method.
(Only with the watch window of the debugger)
I know there is only one instance in the hole application.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |