473,507 Members | 2,545 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

watch one process.

2 New Member
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(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim procname = "notepad.exe"
Dim inum
Dim inum2
End Sub
Sub checkmem()
Dim procname = "notepad.exe"
'Dim procname = "WCAPW32.exe"
'notepade.exe = Process.GetCurrentProcess
Dim inum
'Dim x As Process = Process.GetCurrentProcess
If procname <> "" Then
x = GetCurrentProcess(, procname)
Else
x = GetCurrentProcess(True)
End If
Label1.Text = (Format(x(0, 1), "#,###"))
inum = (Format(x(0, 1), "#,###"))
End Sub
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
checkmem()
Dim inum2
Dim inum
inum2 = Replace(inum, ",", "")
If (inum2 > 4100) Then
RadioButton1.Checked = True
Else
RadioButton1.Checked = False
End If

here is the 2nd one i tried to make it easier... LOL...
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
Dim processes() As Process
processes = Process.GetProcessesByName("notepad.exe")
'Dim proc = "notepad.exe"
If ("notepade.exe" > 2) Then
RadioButton1.Checked = True
Else
RadioButton1.Checked = 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.
Mar 19 '07 #1
1 1209
self
2 New Member
oh i forgot i am in vb.net 2003
thanks
Mar 19 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
3390
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...
3
1818
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...
10
4184
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...
3
2376
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...
2
1383
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;
7
2165
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. ...
3
1450
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...
3
2384
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,...
8
1667
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...
0
7223
marktang
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,...
0
7110
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...
0
7372
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7030
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7482
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
3191
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...
0
1540
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
758
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
411
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.