Support Forums

Full Version: List IP And The Time Of Day [tut]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How to show ip(Written by Slurms Makenzi)
  1. Add A Label
Code:
Imports System.Net
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  Dim wc As New webclient
  Label1.text = wc.DownloadString("http://www.team-neff.info/")
    End Sub
End Class


How to show time and date(Written by Slurms Makenzi)

  • Add a timer
  • Add a Label

Code:
Public Class Form1
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  Timer1.Start()
    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
  Label1.Text = Date.Now
    End Sub
End Class

Maybe you should show some pictures to help users have a better understanding.
Wow great thanks and check the pm
Label1.Text = Date.Now
End Sub
End Class
Code:
Label1.Text = Date.Now


There's more optionality with using DateAndTime instead of Date

Some other examples are:
Code:
Label1.Text = DateAndTime.DateString
Code:
Label1.Text = DateAndTime.Today
The difference between these two is just a "-" and the "/" format for the month/day/year format.

Code:
Label1.Text = DateAndTime.TimeOfDay
This will get the specific time of day without the date.

You can also extract exact values or create your own format for the date and time using DateAndTime
Did you responded to my pm?
(07-03-2011, 03:17 AM)H-Q Wrote: [ -> ]Did you responded to my pm?

Me? or someone else? I never got a PM
(07-03-2011, 04:09 AM)Ace Wrote: [ -> ]Me? or someone else? I never got a PM
haha not you Thumbsup