[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Easy one this time , (bolox again)

Posted on 2002-05-15
4
Medium Priority
?
156 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 200 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show, step by step, how to integrate R code into a R Sweave document
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
Suggested Courses

830 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