Click here to Skip to main content
15,919,028 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: How to convert open office document to pdf ?? [modified] Pin
JC.KaNNaN7-Jan-10 2:12
JC.KaNNaN7-Jan-10 2:12 
QuestionHide a complete row... Pin
MacIntyre6-Jan-10 18:04
MacIntyre6-Jan-10 18:04 
AnswerRe: Hide a complete row... Pin
Dave Kreskowiak7-Jan-10 0:30
mveDave Kreskowiak7-Jan-10 0:30 
QuestionHow to monitor drive activity in vb 2008 Pin
RevEd6-Jan-10 14:21
RevEd6-Jan-10 14:21 
AnswerRe: How to monitor drive activity in vb 2008 Pin
Dave Kreskowiak6-Jan-10 14:49
mveDave Kreskowiak6-Jan-10 14:49 
AnswerRe: How to monitor drive activity in vb 2008 Pin
Andy_L_J6-Jan-10 15:06
Andy_L_J6-Jan-10 15:06 
AnswerRe: How to monitor drive activity in vb 2008 Pin
Dimitri Witkowski6-Jan-10 22:26
Dimitri Witkowski6-Jan-10 22:26 
AnswerRe: How to monitor drive activity in vb 2008 Pin
RevEd7-Jan-10 15:53
RevEd7-Jan-10 15:53 
Here's the answer: From bdbodger at MSDN (and also Dmitry Vitkovsky here at the Code Project)

http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvb/thread/62900f1e-1969-49bb-92cd-4c4eb8c7456d/?prof=required

Create a form and add 2 PerformanceCounter controls . For the first one set Catagory property to LogicalDisk , CounterName to Disk Read Bytes/sec , InstanceName to _Total for the second PerformanceCounter set CounterName to Disk Write Bytes/sec and the other values the same as the first PerformanceCounter . You will need to create 4 small images that you will use with a notifyIcon and add them to your resources such as these

<some graphics shown here>

Set the form WindowState property to Minimized and the ShowInTaskbar property to false . Add a timer set it's enabled property to true , interval 100 and add a NotifyIcon . Then try this code

Public Class Form1

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim both As Integer = 0
If (PerformanceCounter1.NextValue > 0) Then
both += 1
End If

If (PerformanceCounter2.NextValue > 0) Then
both += 2
End If

Select Case both
Case 0
NotifyIcon1.Icon = My.Resources.blue
Case 1
NotifyIcon1.Icon = My.Resources.green
Case 2
NotifyIcon1.Icon = My.Resources.green2
Case 3
NotifyIcon1.Icon = My.Resources.greengreen
End Select
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
NotifyIcon1.Icon = My.Resources.blue
End Sub

Private Sub NotifyIcon1_MouseClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles

NotifyIcon1.MouseClick
If e.Button = Windows.Forms.MouseButtons.Right Then
NotifyIcon1.Visible = False
Application.Exit()
End If
End Sub
End Class
____________________________________________________________________________________________

Change InstanceName to monitor a particular disk drive .

Thumbs Up | :thumbsup:

Blessings
RevEd

QuestionOffice version Problem in Outlook Add-in Pin
dcdhingra6-Jan-10 5:02
dcdhingra6-Jan-10 5:02 
QuestionDate manipulation and SQL.... Pin
Johnkokk5-Jan-10 23:15
Johnkokk5-Jan-10 23:15 
AnswerRe: Date manipulation and SQL.... Pin
Luc Pattyn6-Jan-10 2:14
sitebuilderLuc Pattyn6-Jan-10 2:14 
AnswerRe: Date manipulation and SQL.... Pin
loyal ginger6-Jan-10 4:34
loyal ginger6-Jan-10 4:34 
GeneralRe: Date manipulation and SQL.... Pin
Johnkokk6-Jan-10 20:54
Johnkokk6-Jan-10 20:54 
QuestionHow to open existing file in VB6 Pin
JC.KaNNaN5-Jan-10 22:59
JC.KaNNaN5-Jan-10 22:59 
AnswerRe: How to open existing file in VB6 Pin
Eddy Vluggen6-Jan-10 1:30
professionalEddy Vluggen6-Jan-10 1:30 
QuestionStackOverflowException [SOLVED] [modified] Pin
#realJSOP5-Jan-10 8:44
professional#realJSOP5-Jan-10 8:44 
AnswerRe: StackOverflowException Pin
MikeMarq5-Jan-10 9:14
MikeMarq5-Jan-10 9:14 
GeneralRe: StackOverflowException Pin
#realJSOP5-Jan-10 9:31
professional#realJSOP5-Jan-10 9:31 
QuestionHot to set Color as Red when Combo Style is set as other than DropDownList [modified] Pin
janaswamy uday5-Jan-10 6:44
janaswamy uday5-Jan-10 6:44 
AnswerRe: Hot to set Color as Red when Combo Style is set as other than DropDownList [modified] Pin
TheComputerMan6-Jan-10 15:33
TheComputerMan6-Jan-10 15:33 
QuestionProblem with UDPClient Receive function Pin
xairoy5-Jan-10 3:08
xairoy5-Jan-10 3:08 
AnswerRe: Problem with UDPClient Receive function Pin
DaveAuld5-Jan-10 4:40
professionalDaveAuld5-Jan-10 4:40 
GeneralRe: Problem with UDPClient Receive function Pin
xairoy5-Jan-10 20:46
xairoy5-Jan-10 20:46 
QuestionHow to open openoffice document in vb 6.0 Pin
JC.KaNNaN5-Jan-10 2:28
JC.KaNNaN5-Jan-10 2:28 
AnswerRe: How to open openoffice document in vb 6.0 Pin
Dave Kreskowiak5-Jan-10 3:53
mveDave Kreskowiak5-Jan-10 3:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.