Solved

Easy one this time , (bolox again)

Posted on 2002-05-15
4
151 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

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

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…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

690 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