Click here to Skip to main content
14,743,331 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Need help. I have created some code to search a machine for issues and report what it is to a richtext box. It works fine but i want to add an image next to the text to show if its an alert or just a warning. Please help..

The Code below is what i use to see if there is an issue and if so it will display if that the service is stopped. This is in a back ground worker. I have added the pictures i need to my resource file i just dont know how to show it to the left of the text.


Try

MyObjSearcher = New System.Management.ManagementObjectSearcher(MyMgtScope.Path.ToString, _
"Select * From Win32_Service WHERE Name = 'remoteregistry' ")

' Execute the query
MyColl = MyObjSearcher.Get()

For Each MyObj In MyColl
Dim RemoteReg As String

RemoteReg = (MyObj("state"))

If RemoteReg = "Stopped" Then
RemoteRegistryService = "Remote Registry Service is " & RemoteReg & vbCrLf
End If
Next



Catch ex As Exception

End Try
Posted
Comments
Zachary.shupp 22-Jan-12 20:50pm
   
I read both articals and i still need some help i dont get either one. I tried both but neither worked.

1 solution

The code snippets are a bit unreadable, but you can find out how to do it from this[^] article. Same with this[^] article.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900