Beginner VB

Moderators: None (Apply to moderate this forum)
Number of threads: 1244
Number of posts: 2990

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Date Problemo Posted by hofadomma on 9 Jul 2002 at 9:57 AM
Hello Everyone, I need a little help in a program I'm trying to make.

A part of it is like this, and I need help on getting the date to update every time it is run according to the computers date....

example:

shell "xcopy d:\b\hofadomma.txt d:\a /e /y /d:07/09/2002"

now, The problem is..... how do I get the computers current date and fill into the date part everytime the program is run, in that exact format too! Any help is appreciated. Thanks.
Report
Re: Date Problemo Posted by paulj59 on 9 Jul 2002 at 2:05 PM
: Hello Everyone, I need a little help in a program I'm trying to make.
:
: A part of it is like this, and I need help on getting the date to update every time it is run according to the computers date....
:
: example:
:
: shell "xcopy d:\b\hofadomma.txt d:\a /e /y /d:07/09/2002"
:
: now, The problem is..... how do I get the computers current date and fill into the date part everytime the program is run, in that exact format too! Any help is appreciated. Thanks.
:

format$(Now(),"mm/dd/yyyy")
Report
Re: Date Problemo Posted by hofadomma on 9 Jul 2002 at 6:30 PM
: : Hello Everyone, I need a little help in a program I'm trying to make.
: :
: : A part of it is like this, and I need help on getting the date to update every time it is run according to the computers date....
: :
: : example:
: :
: : shell "xcopy d:\b\hofadomma.txt d:\a /e /y /d:07/09/2002"
: :
: : now, The problem is..... how do I get the computers current date and fill into the date part everytime the program is run, in that exact format too! Any help is appreciated. Thanks.
: :
:
: format$(Now(),"mm/dd/yyyy")


Thanks :)
:

Report
Re: Date Problemo Posted by hofadomma on 9 Jul 2002 at 6:33 PM
: : : Hello Everyone, I need a little help in a program I'm trying to make.
: : :
: : : A part of it is like this, and I need help on getting the date to update every time it is run according to the computers date....
: : :
: : : example:
: : :
: : : shell "xcopy d:\b\hofadomma.txt d:\a /e /y /d:07/09/2002"
: : :
: : : now, The problem is..... how do I get the computers current date and fill into the date part everytime the program is run, in that exact format too! Any help is appreciated. Thanks.
: : :
: :
: : format$(Now(),"mm/dd/yyyy")
:
:
: Thanks :)
: :
: Well that helped Alot! One last thing..... anyone know how to do this? When the program is run, how do you make it invisable, just show up in the task manager, not the task bar...... the program loads on formload so there is no interface or controls, just pure work as soon as it's executed. Thank you for your future help...

Report
Re: Date Problemo Posted by KDivad Leahcim on 9 Jul 2002 at 9:25 PM
: Well that helped Alot! One last thing..... anyone know how to do this? When the program is run, how do you make it invisable, just show up in the task manager, not the task bar...... the program loads on formload so there is no interface or controls, just pure work as soon as it's executed. Thank you for your future help...
:

Add a .bas module. Copy the code from Form_Load to a sub in the module named Main. Remove the form from the project. Run or compile. VB will complain about startup, select Sub Main. It should now work as you want.
Private Sub Main()

    'Code here

End Sub

VB doesn't make it real obvious, but no forms are required. As long as you have a form or a Sub Main, your app can execute.
Report
Re: Date Problemo Posted by paulj59 on 11 Jul 2002 at 8:43 AM
: : Well that helped Alot! One last thing..... anyone know how to do this? When the program is run, how do you make it invisable, just show up in the task manager, not the task bar...... the program loads on formload so there is no interface or controls, just pure work as soon as it's executed. Thank you for your future help...
: :
:
: Add a .bas module. Copy the code from Form_Load to a sub in the module named Main. Remove the form from the project. Run or compile. VB will complain about startup, select Sub Main. It should now work as you want.
:
: Private Sub Main()
: 
:     'Code here
: 
: End Sub
: 

: VB doesn't make it real obvious, but no forms are required. As long as you have a form or a Sub Main, your app can execute.
:

If you need a form, because you have controls, then set the form's .Visible property=False
If you can set the .BorderStyle property=0, it won't show in the task bar.
In your case, Mike's suggestion is best.
Report
Re: Date Problemo Posted by paulj59 on 11 Jul 2002 at 8:46 AM
: : : Well that helped Alot! One last thing..... anyone know how to do this? When the program is run, how do you make it invisable, just show up in the task manager, not the task bar...... the program loads on formload so there is no interface or controls, just pure work as soon as it's executed. Thank you for your future help...
: : :
: :
: : Add a .bas module. Copy the code from Form_Load to a sub in the module named Main. Remove the form from the project. Run or compile. VB will complain about startup, select Sub Main. It should now work as you want.
: :
: : Private Sub Main()
: : 
: :     'Code here
: : 
: : End Sub
: : 

: : VB doesn't make it real obvious, but no forms are required. As long as you have a form or a Sub Main, your app can execute.
: :
:
: If you need a form, because you have controls, then set the form's .Visible property=False
: If you can set the .BorderStyle property=0, it won't show in the task bar.
: In your case, Mike's suggestion is best.
:
Or maybe its Dave's?
Report
Re: Date Problemo Posted by KDivad Leahcim on 11 Jul 2002 at 11:36 AM
: : In your case, Mike's suggestion is best.
: :
: Or maybe its Dave's?
:

If you're talking 'bout me, it's Mike.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.