16,016,306 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Gouthamitks (Top 8 by date)
Gouthamitks
18-Jun-14 2:08am
View
The problem is when i insert time in seconds for eg.,100, and click start . Timer runs,but when i click pause and click resume.,the time is running very fast.
Gouthamitks
18-Jun-14 2:01am
View
I made it in windows application. But the timer control is not working correctly.
Here is the code for the windows form
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace SuperTimer
{
public partial class SuperTimer : Form
{
int Rtime = 0, hours = 0, mins = 0, seconds = 0, Usertime, i, j, k, l, m, n,stop,resume;
public SuperTimer()
{
InitializeComponent();
}
private void SuperTimer_Load(object sender, EventArgs e)
{
btnpause.Enabled = false;
}
public void btnstart_Click(object sender, EventArgs e)
{
btnpause.Enabled = true;
if (txtsec.Text != string.Empty)
{
if (btnstart.Text == "Start")
{
btnstart.Text = "Reset";
Time();
Timer mytimer = new Timer();
mytimer.Tick += new EventHandler(timer_Tick);
mytimer.Interval = 1000;
mytimer.Start();
lblsec.Text = seconds.ToString();
stop = 2;
}
else
{
Reset();
return;
}
}
else
{
lbltimeup.Visible = false;
lblmsg.Text = "Please Enter Time in Seconds";
lblmsg.ForeColor = Color.Red;
}
}
private void Reset()
{
Timer mytimer = new Timer();
txtsec.Text = string.Empty;
mytimer.Stop();
lblsec.Text = "00";
lblmm.Text = "00";
lblhrs.Text = "00";
btnstart.Text = "Start";
stop = 1; seconds = 0;
mins = 0;
hours = 0;
//mytimer.Start();
}
private void Time()
{
lblmsg.Text = string.Empty;
if (txtsec.Text != string.Empty)
{
Usertime = int.Parse(txtsec.Text.ToString());
hours = Usertime / 3600;
Rtime = Usertime - (hours * 3600);
Usertime = Rtime;
mins = Usertime / 60;
Rtime = Usertime - (mins * 60);
seconds = Rtime;
Conditions();
lblhrs.Text = hours.ToString();
lblmm.Text = mins.ToString();
lblsec.Text = seconds.ToString();
}
//else
//{
// lbltimeup.Visible = false;
// lblmsg.Text = "Please Enter Time in Seconds";
// lblmsg.ForeColor = Color.Red;
//}
}
private void Conditions()
{
// if (btnstart.Text == "Start")
// {
if (seconds == 0 && mins != 0)
{
mins = mins - 1;
seconds = 59;
}
if (seconds == 0 && mins == 0)
{
hours = hours - 1;
mins = 59;
seconds = 59;
}
// }
else
return;
}
private void TimerDispalys()
{
seconds = int.Parse(lblsec.Text);
if (seconds != 0)
{
j = seconds;
for (i = 0; i <= j; i++)
{
Timerdisplay();
seconds = seconds - 1;
}
}
}
private void Timerdisplay()
{
lblsec.Text = seconds.ToString();
}
private void txtsec_TextChanged(object sender, EventArgs e)
{
}
Gouthamitks
16-Jun-14 2:51am
View
Thank you Asim. Can u tel me how to do slicing in photoshop..and use them in vs ..pls provide links to that so i can do
Gouthamitks
16-Jun-14 2:49am
View
can we use wpf for web application? I am developing an intranet application.
Gouthamitks
16-Jun-14 2:48am
View
Thank you DD. But i dnt know css properly. Is it better to use images modified by photoshop and use them in my login page eg.,like header,title,login background,controls etc..in login.aspx in visual studio editor
Gouthamitks
16-Jun-14 1:38am
View
I need a good looking page for login and also a masterpage for my web application. Pls give me proper guidance on how to do it. Presently i am using vs2010 and ps cs4 for designing
Gouthamitks
16-Jun-14 1:35am
View
Hai. I know photo editing in photoshop. So i preferred it. Is it possible in visual stuido to make our own webpage for login that looks like a professional one like in photoshop template?
Gouthamitks
27-Mar-14 9:52am
View
Thank you BotCar. It worked.
Show More