?
Solved

server status visual basic ??

Posted on 2006-11-24
7
Medium Priority
?
267 Views
Last Modified: 2013-11-25
hey experts!

im looking for a script thats can add a computer and ping the ipaddress to check if its up

webserver1  192.168.5.1  OK(green)
webserver2  192.168.5.2  Down(Red)

does anyone have something writed down ? :)
need answers fast

Thx
0
Comment
Question by:aamodt
  • 4
  • 2
7 Comments
 
LVL 17

Expert Comment

by:Cem Türk
ID: 18009622
what do you mean by "add a computer" ?
adding a to a list of computers to ping?
0
 
LVL 17

Expert Comment

by:Cem Türk
ID: 18009685
0
 
LVL 7

Author Comment

by:aamodt
ID: 18011629
yeah meen to add computers via a button and textbox with ip or hostname in it

hostname 192.168.5.2.1 <- if ping OK show OK in green text or something if dont Down
0
Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

 
LVL 7

Author Comment

by:aamodt
ID: 18011647
i dont need so advance like that cem_turk .. i can just use

        If My.Computer.Network.Ping(txtbox1, 1000) Then ???

right ?  but dont know how to add and store the computer inn the form
0
 
LVL 7

Author Comment

by:aamodt
ID: 18036914
did figure it out :))
0
 
LVL 1

Accepted Solution

by:
ftplds earned 2000 total points
ID: 18280928
Create an access Database with coputer_id ( autonumber)
computer Name (text)
ComputerIP (text)

create an array of two command buttons
create an array of two text boxes
Here is the form load event
Private Sub Form_Load()
With DataEnvironment1
Load DataEnvironment1
Dim c As Integer
c = 8
Dim l As Integer
Dim tr As Integer
If .rsadd.State <> 0 Then .rsadd.Close
.rsadd.Open
tr = .rsadd.RecordCount
Dim h As Integer
h = 200
l = 300
Dim txtintnextindex As Integer
Dim intnextIndex As Integer
Do Until intnextIndex = tr
txtintnextindex = Text1.UBound + 1
intnextIndex = Command1.UBound + 1
Load Text1(txtintnextindex)
Load Command1(intnextIndex)
Command1(intnextIndex).ZOrder 0
Text1(txtintnextindex).ZOrder 0
Command1(intnextIndex).Visible = True
Command1(intnextIndex).Top = h
Command1(intnextIndex).Left = l
Command1(intnextIndex).Caption = .rsadd.Fields("addname")
Text1(txtintnextindex).Text = .rsadd.Fields("ipaddress")
.rsadd.MoveNext
h = h + 700
If .rsadd.AbsolutePosition = c Then
l = l + 1700
h = 200
c = c + 8
End If
Command1(0).Visible = False
Text1(0).Visible = False
Loop
 'Label1.Caption = tr
End With
 Exit Sub
ce:
Form2.Caption = " Now displaying " & Space(1) & tr & " different addresses"
Form2.BackColor = &HC0FFFF

Here is the command1 code
Private Sub Command1_Click(Index As Integer)
Dim ti As Integer
ti = Index
Dim ad As String
ad = Text1(ti).Text
Shell ("Ping " & ad), vbNormalFocus
End Sub
Good luck
0
 
LVL 7

Author Comment

by:aamodt
ID: 18282356
thx good help :)
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question