Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Online Check

Hello Guys ✌,

im releasing a very simple but usefull tool.

Picture :

[Image: aXm6cjP.png]

Code
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If My.Computer.Network.Ping(TextBox1.Text) Then
            Label3.ForeColor = Color.Green
            Label3.Text = "Online"
        Else
            Label3.ForeColor = Color.Red
            Label3.Text = "Offline"
        End If
    End Sub
End Class


-mnjx
Thanks for sharing, will try it out now :)
Try adding Themes man, you won't regret it.
[Image: New-Signature-v2.png]
(Aug 31, 2014 09:40 AM)oRequiem Wrote:  Try adding Themes man, you won't regret it.

Most of my Tools have Themes but these which im showing here are just for the Source Code Preview ✌
Thanks for sharing.. will check it... ;)
BTC - bc1q3efew3yzfwhdz290dafykaw0a2w56g2j69g2c6
ETH - 0xf1c873217032468990D3313da6509D1b813c4671
USDT - 0xf1c873217032468990D3313da6509D1b813c4671
PP - [email protected]
(Aug 31, 2014 09:20 AM)mnjx Wrote:  
Code
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
      If My.Computer.Network.Ping(TextBox1.Text) Then
      Label3.ForeColor = Color.Green
      Label3.Text = "Online"
      Else
      Label3.ForeColor = Color.Red
      Label3.Text = "Offline"
      End If
    End Sub
End Class

I understand that you are willing to help beginners, but please...
Code
Public Class Form1
Rename the form, please. Not a problem, just an habit to take.

Code
Handles Button1.Click
I know this is the only button on the whole form, but again, if it's aimed to beginners, you should name it.

Code
My.Computer.Network.Ping(TextBox1.Text)
Same thing about control name, but you got the point.
The real problem here, is the use of the Microsoft.VisualBasic.MyServes namespace (In the form of My.*), which is a port of an old VB6 namespace, and thus shouldn't be used anymore (Heck, we are at .Net 4.5.1 dude).

Just in term of dependencies, I believe (according to MSDN) that it requires the VB6 runtime to be ran. Not a big deal in anyway, just something to be pointed out.

I can't be bothered to open up VS & to check for this, but in most cases, Microsoft.VisualBasic methods are wrappers for actual .Net function, and thus are not the best in term of optimization.
Here is what you should use instead: http://msdn.microsoft.com/fr-fr/library/....110).aspx

This is in no way intended as an offense, I'm just pointing out what needs to be pointed out.
(Aug 31, 2014 05:04 PM)Yui Asuna Wrote:  I understand that you are willing to help beginners, but please...
Code
Public Class Form1
Rename the form, please. Not a problem, just an habit to take.

Code
Handles Button1.Click
I know this is the only button on the whole form, but again, if it's aimed to beginners, you should name it.

Code
My.Computer.Network.Ping(TextBox1.Text)
Same thing about control name, but you got the point.
The real problem here, is the use of the Microsoft.VisualBasic.MyServes namespace (In the form of My.*), which is a port of an old VB6 namespace, and thus shouldn't be used anymore (Heck, we are at .Net 4.5.1 dude).

Just in term of dependencies, I believe (according to MSDN) that it requires the VB6 runtime to be ran. Not a big deal in anyway, just something to be pointed out.

I can't be bothered to open up VS & to check for this, but in most cases, Microsoft.VisualBasic methods are wrappers for actual .Net function, and thus are not the best in term of optimization.
Here is what you should use instead: http://msdn.microsoft.com/fr-fr/library/....110).aspx

This is in no way intended as an offense, I'm just pointing out what needs to be pointed out.

Thank you so much for this, I was still using the 'my' method of pinging a network. But thanks to you, I was able to choose a range of different options that has helped me create many different network applications. 😁
(Aug 31, 2014 05:04 PM)Yui Asuna Wrote:  I can't be bothered to open up VS & to check for this, but in most cases, Microsoft.VisualBasic methods are wrappers for actual .Net function, and thus are not the best in term of optimization.

Wrong, First you say it's an old Vb6 namespace, and then you say it's a wrapper for .net? lol.
It's a wrapper for the WinAPI, just like .Net itself, everything is basically.

You're correct when you said it shouldn't be used anymore, at least within .net.
Thanks man the will be useful so you dont have to use online tools anymore :)
The title is missleading. I thought that it shows online status of a client.
Whats the difference of going to that website and seeing if it will work?
(Sep 7, 2014 04:58 PM)Centuries Wrote:  Whats the difference of going to that website and seeing if it will work?

Because this is a desktop application. Some people are lazy. 😉