Solved

Easy one this time , (bolox again)

Posted on 2002-05-15
4
145 Views
Last Modified: 2013-11-13
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
0
Comment
Question by:bolox
4 Comments
 
LVL 4

Accepted Solution

by:
RichW earned 50 total points
ID: 7011329
Add a Winsock Control to your form.

Text1 = Winsock1.LocalIP
Text2 = Now
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 7011371
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
 
LVL 18

Expert Comment

by:mdougan
ID: 7012163
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
 
LVL 1

Author Comment

by:bolox
ID: 7015698
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

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

743 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now