|
Welcome, Did you consider moving to .NET ?
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
www.ITS.co.za
|
|
|
|
|
I have considered it, but I am not primarily a VB programmer. I spend most of my time in the Notes/Domino web world -- LotusScript, JavaScript, HTML, and some of the rest on the iSeries (RPG). The VB apps we have are just oddball little things -- this one prints a PDF file automatically from an RPG program -- and since I'm reasonably comfortable in VB6 that's what I did it in.
I've heard that moving to .NET is a big learning curve, so up to now I've stayed away from it ...
|
|
|
|
|
Then when you get Stuck you wont get help
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
www.ITS.co.za
|
|
|
|
|
Hello once again guys.
I used this coding for the showing of date and time. this is supposed to appear when i press a command button named "new record".
text1=date
text2=time
But this doesn't work! Any better one for time and date?
ST
|
|
|
|
|
How about DateTime.Now()?
Dim currentTime As DateTime = DateTime.Now()
TextBox1.Text = currentTime.ToShortDateString()
TextBox2.Text = currentTime.ToShortTimeString()
|
|
|
|
|
Well, i don't know much but does this show the current time on your computer in a textbox?
Thankyou
ST
|
|
|
|
|
|
Well, i tried it but it is giving a compile error: syntax error and this gets highlighted
Dim currentTime As DateTime = DateTime.Now()
What could the problem be?
Thankyou!
ST
|
|
|
|
|
I think you're using VB6, that is the problem.
|
|
|
|
|
you are right. i am using vb6. is there any better way of doing this?
Regards
ST
|
|
|
|
|
|
Use VB.Net? If I remember correctly there is a Date type in VB and you just need to do something like:
Dim myDate as Date
myDate = Now()
I could be wrong it's over 5 years since I last used VB6 and my memory's not what it was.
If you are using VB6 then my suggestion (for your previous question) to use the ErrorProvider won't help you (it's a VB.Net control).
Regards
David R
|
|
|
|
|
ShayanTanwir wrote: is there any better way of doing this?
yes there is.
For one, choose a modern language. VB6 is 20 years old and obsolete; today's Basic is called VB.NET
Once you are sure about the language choice, learn it in a decent way: follow a course, or buy and study a book (a physical book, not an e-book, and no I am not recommending any particular one, go browse some in a book store).
Then read some of the articles here on CodeProject and start experimenting.
Don't try and do it without good fundamentals, it does not work.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Luc Pattyn wrote: VB6 is 20 years old
No its not, it only came out about 1999. If I've told you once, I've told you a million times, don't exaggerate!
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Ashfield wrote: VB6 is 20 years old ... No its not
Correction: VB is 20 years old and VB6, its last incantation, is now obsolete.
Is that better?
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Yes, much. You mustn't confuse those poor souls who are still using it - most of them aren't 20 years old
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
happy to oblige
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Ashfield wrote: No its not, it only came out about 1999
Excuse me, but I beg to differ. I clearly remember VB6 rearing its ugly head somewhere toward the end of 1998. Oh, how I loathe the Dark Ages.
|
|
|
|
|
Quite possibly. To many beers ago to remember
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
If you're going to ask questions on any forum, not just CP's, you really need to specify that you're using VB6. Everyone will assume you're using VB.NET since VB6 has not been support by Microsoft for quite some time now.
|
|
|
|
|
We should boycott all VB6 questions in the forum!!!!
Until I get stuck on some dumb legacy code and need help.
It would help if the OP would be a bit more specific. Very rarely is there too much info. in the orig. post.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
|
--> dim currentTime as Date=DateTime.Now()
--> Me.TextBox.Text=currentTime.ToShortDate()
--> Now it will work.... Enjoy....
J A Nasir K
|
|
|
|
|
Hi
- command button cannot be named "new record", it should be named "new_record" or "NewRecord", no space is allowed in the name of object, or you are talking about "caption" ?
' in CommandButton Click
Text1 = Time()
Text2 = Date
hth
Samir R. Ibrahim
|
|
|
|
|
Hi,
In code a loop has perfomed an heavy task in minutes. There is a cancel button on the form which must immediately cancels the currently running loop inside a procedure.
How could you do that? How could you stop all the running tasks (loop) inside the form and execute the Button1_Click procedure which should closes the form when it gets clicked at once. I tought the easiest way might be the just immediately closing the form or disposing it. But when I push the button it is not responding on time because of running loops inside another procedure with even application.doevents statement inside the loops.
But I beleive that there should be more professional approaches to do that and I have no idea about it.
Thank You.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|