Easy one this time , (bolox again)

I have searched through EE, but WOW LOADS OF WAYS OF DOING IT............

all i want is for two text boxes to have the following data in them at runtime.

text1.text = internal network IP address, eg, 10.57.222.111

text2.text = date and time NOW!!

no rush this time

thanx again everyone
LVL 1
boloxAsked:
Who is Participating?
 
RichWCommented:
Add a Winsock Control to your form.

Text1 = Winsock1.LocalIP
Text2 = Now
0
 
TimCotteeHead of Software ServicesCommented:
Assuming you only have one local ip address that is. Some of us have multiple network cards. Anyway that'll work, though if you want the time to be really the current time you will need to add a timer with 500ms resolution and update the value in the _Timer event otherwise that time is going to be just a snapshot.
0
 
mdouganCommented:
and the code under the timer or whever you want to put the date into the textbox is:

text2.text = Format(Now(), "mm/dd/yyyy hh:nn:ss AM/PM")

You can play around with the date format string, or use one of the named formats like "Short Date" if you want the format to take the users Local into consideration.
0
 
boloxAuthor Commented:
thankyou for your VERY quick answer,sorry it tok me ages to get back to you, the weather was sooo good yesterday i thought i would bunk off work.

B
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.