Support Forums
List IP And The Time Of Day [tut] - Printable Version

+- Support Forums (https://www.supportforums.net)
+-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87)
+--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18)
+---- Forum: Visual Basic and the .NET Framework (https://www.supportforums.net/forumdisplay.php?fid=19)
+---- Thread: List IP And The Time Of Day [tut] (/showthread.php?tid=19914)



List IP And The Time Of Day [tut] - Slurms Makenzi - 06-24-2011

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




RE: List IP And The Time Of Day [tut] - Black Ghost - 06-29-2011

Maybe you should show some pictures to help users have a better understanding.


RE: List IP And The Time Of Day [tut] - H-Q - 06-29-2011

Wow great thanks and check the pm


RE: List IP And The Time Of Day [tut] - ControL1 - 06-29-2011

Label1.Text = Date.Now
End Sub
End Class


RE: List IP And The Time Of Day [tut] - AceInfinity - 07-03-2011

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


RE: List IP And The Time Of Day [tut] - H-Q - 07-03-2011

Did you responded to my pm?


RE: List IP And The Time Of Day [tut] - AceInfinity - 07-03-2011

(07-03-2011, 03:17 AM)H-Q Wrote: Did you responded to my pm?

Me? or someone else? I never got a PM


RE: List IP And The Time Of Day [tut] - H-Q - 07-03-2011

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