C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Hit count for windows application


Posted Date: 02 Sep 2008      Total Responses: 3

Posted By: ashok       Member Level: Bronze     Points: 1


Hi All,

Normally u will be familiar with term "hit count" for web applications,
Now i have created an windows application, but this should only work for three times.

how can i count the number of application launches.

Pls help me.

Ashok




Responses

Author: Kundan Kumar Sinha    02 Sep 2008Member Level: GoldRating:     Points: 3
Hi,

You can do the following thing.

On the launch of application search for one log file at some specific location. It will not exist if the application is launched for first time. So create the file and write some value, like "a" in the file.

When the application opened next file search for the file, it will be existing, raed the value. If it is "a" then change it with "b", and if it is "b" then change it with "c".

If it is "c" then close the application.

Regards,
Kundan



Author: ashok    02 Sep 2008Member Level: BronzeRating:     Points: 2
thanQ kundan,

am trying the same with having a text file but it has got no security
we can edit the text file thats problem.

Ashok


Author: Gajendra    04 Sep 2008Member Level: BronzeRating:     Points: 3
Ashok,
U mean at any point of time there could not be more than 3 instances running in the machine right. If this is your requirement we can control like this.
At starting of application set one value 1 in DB table, next starting of app check the attribute value if it is less than 3 allow application start. On application close decrement the attribute vlue in DB.

Gajendra



Post Reply
You must Sign In to post a response.
Next : how to validate datetimepicker in windows application
Previous : How to read XML file from windows application
Return to Discussion Forum
Post New Message
Category: Windows

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

conference calls

Contact Us    Privacy Policy    Terms Of Use