Solved

Easy one this time , (bolox again)

Posted on 2002-05-15
4
147 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
This article will show, step by step, how to integrate R code into a R Sweave document
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

912 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

22 Experts available now in Live!

Get 1:1 Help Now