473,327 Members | 2,074 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

I need to set a limit on my application working...

I need to set a limit on my application working... I want the application not to work as from 31/03/05 and I need to know how to code this. Surely there must be a simple code to check the date at start-up of the app??

How do I do this???

Scott
Nov 21 '05 #1
8 1052
You can use DateTime.Now to get the current date and time on whatever computer it is running on.

"Scott" <ho*******@virgin.net> wrote in message news:GJ***************@newsfe2-gui.ntli.net...
I need to set a limit on my application working... I want the application not to work as from 31/03/05 and I need to know how to code this. Surely there must be a simple code to check the date at start-up of the app??

How do I do this???

Scott
Nov 21 '05 #2
I'm aware of that, but what code do I do to cancel the app and bring up a text saying "expired!" before the app is useful
"Marina" <so*****@nospam.com> wrote in message news:OB**************@TK2MSFTNGP14.phx.gbl...
You can use DateTime.Now to get the current date and time on whatever computer it is running on.

"Scott" <ho*******@virgin.net> wrote in message news:GJ***************@newsfe2-gui.ntli.net...
I need to set a limit on my application working... I want the application not to work as from 31/03/05 and I need to know how to code this. Surely there must be a simple code to check the date at start-up of the app??

How do I do this???

Scott
Nov 21 '05 #3
You could show a MessageBox and then Application.Exit

However, you sh ould be aware that this will be easily defeated by hackers...
"Scott" <ho*******@virgin.net> wrote in message news:kT***************@newsfe2-gui.ntli.net...
I'm aware of that, but what code do I do to cancel the app and bring up a text saying "expired!" before the app is useful
"Marina" <so*****@nospam.com> wrote in message news:OB**************@TK2MSFTNGP14.phx.gbl...
You can use DateTime.Now to get the current date and time on whatever computer it is running on.

"Scott" <ho*******@virgin.net> wrote in message news:GJ***************@newsfe2-gui.ntli.net...
I need to set a limit on my application working... I want the application not to work as from 31/03/05 and I need to know how to code this. Surely there must be a simple code to check the date at start-up of the app??

How do I do this???

Scott
Nov 21 '05 #4
MessageBox.Show("Expired!")
Application.Exit()
"Scott" <ho*******@virgin.net> wrote in message news:kT***************@newsfe2-gui.ntli.net...
I'm aware of that, but what code do I do to cancel the app and bring up a text saying "expired!" before the app is useful
"Marina" <so*****@nospam.com> wrote in message news:OB**************@TK2MSFTNGP14.phx.gbl...
You can use DateTime.Now to get the current date and time on whatever computer it is running on.

"Scott" <ho*******@virgin.net> wrote in message news:GJ***************@newsfe2-gui.ntli.net...
I need to set a limit on my application working... I want the application not to work as from 31/03/05 and I need to know how to code this. Surely there must be a simple code to check the date at start-up of the app??

How do I do this???

Scott
Nov 21 '05 #5
"Marina" <so*****@nospam.com> schrieb:
MessageBox.Show("Expired!")
Application.Exit()


I prefer 'Return' in my 'Sub Main' :-).

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #6
Some apps don't have a sub main. They have a form as a start up object.

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:uO**************@TK2MSFTNGP12.phx.gbl...
"Marina" <so*****@nospam.com> schrieb:
MessageBox.Show("Expired!")
Application.Exit()


I prefer 'Return' in my 'Sub Main' :-).

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #7
>
I prefer 'Return' in my 'Sub Main' :-).

--

I prefer me.close in my 'mainform' ;-)

Nov 21 '05 #8
"Marina" <so*****@nospam.com> schrieb:
Some apps don't have a sub main. They have a form as a start up object.


MSDN on 'Application.Exit':

---
*CAUTION* The 'Form.Closed' and 'Form.Closing' events are not raised when
the 'Application.Exit' method is called to exit your application. If you
have validation code in either of these events that must be executed, you
should call the 'Form.Close' method for each open form individually before
calling the 'Exit' method.
---

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: NurAzije | last post by:
Best Regards, I am a php developer, have worked on websites for more than 6 years, I work with a company on a project, now we have a new project and I must give the best solution on how we can do...
15
by: chahnaz.ourzikene | last post by:
Hi all, This is the first i post in this newsgroup, i hope my english is not too bad... Let's get straight to the point ! I have a little probleme using threads in my little training example :...
4
by: MFA | last post by:
Hi All Is there any limit to include files (<!--#include file="xyz.asp"-->). I have developed an application where I am including different files on the base of diffirent conditions and values...
2
by: Alper AKCAYOZ | last post by:
Hello, I have developped an application used by Windows Forms (.NET) at Visual C++ ..NET v2003. I would like to limit my application to one instance working at a moment. More than one working...
4
by: MS News \(MS ILM\) | last post by:
Hello, How do I handle a user uploading a file from the browser that exceeds the limit set by web or machine config files global.asax or handlers or module How can I return to the same...
10
by: Vic Spainhower | last post by:
Hello, I have a php program that is building a grid (HTML table) from a MySQL database. The problems started when I added a dropdown menu to the grid and when I did the form buttons would not...
15
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to...
10
by: strife | last post by:
Hi, This is a homework question. I will try to keep it minimal so not to have anyone do it for me. I am really just stuck on one small spot. I have to figure out the highest number from a users...
2
by: D. Susman | last post by:
Hi, I know that this issue is indeed strictly operating system dependent but I am just curious: I have a five dimensional array, whose size sums to 68 MB (almost). This array is contained by...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.