|
|
Comments and Discussions
|
|
 |
|

|
can we use it in web project
mannu
|
|
|
|
|

|
hello. i'm a beginner. Can you brief me on how to download this software so that I can use it in visual studio. I cant find the .dll file.
|
|
|
|

|
"...who want to use TimePicker to pick seconds, just use the Minutes value and place a label next to it called Seconds". - this doesn't work. I've downloaded demo-project and tried to follow this advice but got no luck.
|
|
|
|

|
Good you be more specific on what is not working exactly?
|
|
|
|

|
The label called Seconds behaves like simple label control: it displays the text from text property and no seconds and picking availability.
|
|
|
|

|
Hi,
first I wanna say, that i'm not really expert, but I'm learning.
I was searching for a tool like timepicker to use it in MS Excel 2007. Unfortunaltely I was not able to install/use it in Excel. There was just a "dll" in the demo file. In the source file there was not one. (I tried to use the one in the Demo file, but that did not work, either.
Can you help me?
With greetings
Floko
|
|
|
|

|
Hi Fioko,
Could you tell me what the error was? The dll in the Zip is build with .NET 2.0. Maybe something special is required with Office 2007. Maybe you have to put a reference to an Office dll or put a special method in the TimePicker projet. I haven't done any .NET for Office. I just moved to Framework 3.5.
What about rebuilding the code in VS 2008? Did that work? Can you then put it in a normal .NET project, let's say a Windows Forms project?
Louis
|
|
|
|

|
Put this:
for (int i = 0; i < this.Controls.Count; i++)
{
Button btn = this.Controls[i] as Button;
if (btn != null)
{
btn.UseCompatibleTextRendering = true;
}
}
in HourMinuteSelectorForm.cs, HourSelectorForm.cs, MinuteSelectorForm.cs constructors.
|
|
|
|

|
Works!
Thank you!
|
|
|
|

|
How to use the TimePicker to allow TimeSpans greater than 24 hours?
|
|
|
|

|
I used two listboxes side by side on a panel. Set the listboxes to multicolumn and the panel.visible to false until a textbox is clicked.
You'll need to adjust the listboxes width and height to get the column count right.
After the minutes is selected the panel.visible = false.
The code shown here uses two textboxes needed for a start and end time.
Dennis
bool startclicked = false;
string[] h = {
"00","04","08","12","16","20",
"01","05","09","13","17","21",
"02","06","10","14","18","22",
"03","07","11","15","19","23" };
string[] m = {
"00","10","20","30","40","50",
"01","11","21","31","41","51",
"02","12","22","32","42","52",
"03","13","23","33","43","53",
"04","14","24","34","44","54",
"05","15","25","35","45","55",
"06","16","26","36","46","56",
"07","17","27","37","47","57",
"08","18","28","38","48","58",
"09","19","29","39","49","59" };
for (int i = 0; i < h.Length; ++i) HourlistBox.Items.Add(h[i]);
for (int i = 0; i < m.Length; ++i) MinutelistBox.Items.Add(m[i]);
HourlistBox.ColumnWidth = 30;
MinutelistBox.ColumnWidth = 30;
private void StartTimetextBox_Click(object sender, EventArgs e)
{
Timepanel.Visible = true;
startclicked = true;
}
private void EndTimetextBox_Click(object sender, EventArgs e)
{
Timepanel.Visible = true;
startclicked = false;
}
private void SetHour(object sender, bool wasminute)
{
string h = "00";
try
{
h = HourlistBox.SelectedItem.ToString();
}
catch { }
string m = "00";
try
{
m = MinutelistBox.SelectedItem.ToString();
}
catch { }
if(startclicked == true) StartTimetextBox.Text = h + ":" + m;
else EndTimetextBox.Text = h + ":" + m;
if (wasminute) Timepanel.Visible = false;
}
private void HourlistBox_SelectedIndexChanged(object sender, EventArgs e)
{
if (HourlistBox.SelectedIndex == -1) return;
SetHour(sender, false);
}
private void MinutelistBox_SelectedIndexChanged(object sender, EventArgs e)
{
if (MinutelistBox.SelectedIndex == -1) return;
SetHour(sender, true);
}
|
|
|
|

|
I was testing out this control to see if it would work for my app and it was fine until I moved the app over to the second monitor so i could tweak some code. The form shows up all the way to the right on the first window. The vertical position is correct, but not the horizontal.
The answer to your problem may not be the answer to your question. --Me--
|
|
|
|

|
Hi!
I experienced a problem with the font size in the dropdown menu:
The numbers above 9 are not shown completely. There is just the first digit shown.
In the demo everythig is fine, though...
So I changed the fontsize down to 6, so that I was able to work with it, but thats non-durabale solution i think...
Is this problem know to anyone else?
Greeting
Christoph
|
|
|
|

|
Hi Christoph,
I did notice this problem in the Designer inside VS .NET 2005. I have no clue why it behaves this way. I did put time into investigating this matter. When used in an application (i.e. the demo app), it works fine. It's the same code so it should work. My impression was maybe a different drawing engine is used inside VS .NET.
Louis-Philippe Carignan
|
|
|
|

|
Thank You for the answer!
I just found the solution:
I had CompatibleTextRenderingDefault set to "false":
Application.SetCompatibleTextRenderingDefault(false);
Now, when its "true", everything works fine.
(.NET default it is "true", I think.)
So it really semms to be a problem with the .NET designer. Not a different drawing engine, but a different way of drawing.
Greeting
Christoph
|
|
|
|

|
There was a related Urdu Timepicker I saw in CP forums. Can be there some move to bring all these under a single umbrella and each language as a configuration directive?
|
|
|
|

|
Hi,
I did a search on the word "urdu" and found a DateTimePicker and a Textbox for Urdu. Nothing on a TimePicker. My control doesn't show any dates, only times. While I am not familiar with the Urdu language, I would believe time is displayed with arabic numbers. But I could be wrong.
If possible, could you point me to the actual TimePicker in Urdu?
Louis-Philippe
|
|
|
|

|
I think that's a good aproach to making it easy to select a time, but, folowing the "Calendar" approach for date picking, a "Clock face" would meet the need for a time picking, don't you think?
In my opinion, a control like yours could bring usability problems:
- Users may not instantly learn how to use the control
- There are just too many options in the drop down view, and user can become overwhelmed
I know that your work requires a good effort, but the control may be just not good enough to be included in a project, I would rather keep the DateTimePicker option.
Don't take it personal, it's just a professional point of view.
Jm
|
|
|
|

|
This is a nice way to represent time. Thanks for sharing this.
|
|
|
|

|
Hai,
I'm a beginner of ASP.NET 2.0
The .Net TimePicker control is good. But this control is in the previous version of ASP.NET. So, Its little bit tough to understand for me. And I'm also doing small project on Timesheet. Where employees should enter their Start Time, End Time, Break Time.So, if you provide me the code that will be very helpful for my project.So please provide me the code in newer version of it.Thank You in Advance...
-- modified at 1:33 Saturday 16th June, 2007
|
|
|
|

|
My name is Emilia,I'm a C# developer.I've used TimePicker control in my App.Thanks a lot for sharing this control.I have a question:
How user can exit from time picker only using keyboard?I could not handle this,would you please help me?
Thanks alot
|
|
|
|

|
Good question! I never thought about this one. I would recommend adding a delegate to the KeyPress event on each button. I tried adding a delegate to the KeyPress event of the form on which all the buttons reside. No luck! Nothing happens.
So, short answer would be to add the delegate to the KeyPress event of each button. You could then define a default key (the Spacebar comes to mind) to close the picker. You could put more logic to move the focus on a button when a key is pressed. For example, pressing 9 would put the focus on the button named '9' and so on. Maybe a property where you can accept key strokes would be of value.
I am planning on migrating the control to 2.0 and 3.0 this Fall. As always, lots on my plate.
|
|
|
|

|
Thanks a lot,I'll try it.
|
|
|
|

|
Its really nice....
I have used it in my app.
so Thanks
nidhi
|
|
|
|

|
hi. i m getting an issue. when i m runnin on .net framwork version 1.1 it is working fine.But when i m running under framework version 2.0, the control is not comming properly. only single digit are appearing on the control when drop down is clicked. In case of Hrs for 0-9 on 0 is appearing , for 10-19 only 1 is appearing and 20-24 only 2 is appearing. Similarly for Min. The value selected appears correctly . i hope i m able to put my issue clearly. Whats going wrong ?
Deepabh
|
|
|
|

|
I'm facing the same problems. I love the control and I have used this control for a long time with .NET 1.1 and after updating to 2.0 it suddenly doesn't work.
I converted the control to VS2005 and noticed that the forms are just too small, so if you change the font to 7 you can see all the numbers.
But my C# skills are so bad that I couldn't solve other problems I'm facing with this control in VS2005 and build a working dll.
So please if there is someone with some C# skills this control would be usable again with a reasonable amount of work.
|
|
|
|

|
I also tried to increase the size of the individual buttons. It did not solve the problem completely. A dsadvantage is that the size of the control increases. I decided not to use it for that reason.
|
|
|
|

|
You have to go into all 3 forms, set the labels text position to be MID LEFT justified (instead of MID CENTER) Then set the labels to AutoSize = True.
All the labels now show correctly.
The answer to your problem may not be the answer to your question. --Me--
|
|
|
|

|
Hi everyone,
I saw many of you are looking for similar implementations for web pages. You may want to check out the control that I have developed for ASP.Net 2.0. You can get it from my blog http://dipeshbatheja.blogspot.com/.
ENJOY!
Dipesh Batheja
|
|
|
|

|
Hi
Did anyone find a fix for Timepicker not working on a Tab Control Page?
|
|
|
|
|

|
A quick question 4 the author: I found that both forms (the one where you set hours and the one where you set minutes) have ResetMinutes property. What good does that do on the minute selector form? Is that a copy-paste bug or am I missing sth?
Thanks and happy hollidays,
Miha
|
|
|
|

|
The control is great, thanks for sharing it. Has been really helpful as I needed something that would work with a TimeSpan value rather than DateTime as I needed to display negative time values. The only problem I had was that the negative sign was being displayed on the wrong side, I found that RightToLeft was set to Yes for both the hour and minute labels in the designer code. I have made some small changes to the TimePicker.cs code to display negative values correctly. I only changed the 24 hour formats as I thought the 12 hour formats wouldn't be appropriate for negative values anyway. Here's the changes:
private static String NEG_ZERO = "-0"; private void GenerateFormatedText(TimeSpan oSelectedTime) { ... // This section parse the hours if (l_aTimes[0].Equals(HH)) { // The format is from 00 to 24 if((l_nHour < 0) && (l_nHour > -10)) { m_oLnkHours.Text = NEG_ZERO; l_nHour = Math.Abs(l_nHour); } else if((l_nHour < 10) && (l_nHour >= 0)) { m_oLnkHours.Text = ZERO; } m_oLnkHours.Text += Convert.ToString(l_nHour); m_oLnkAMPM.Visible = false; } ...
if (l_aTimes[1].Equals(MM)) { // The format is 00 to 59 if(l_nMinute < 0) { if(m_oLnkHours.Text[0] != '-') { m_oLnkHours.Text = string.Format("-{0}", m_oLnkHours.Text); } l_nMinute = Math.Abs(l_nMinute); } if ((l_nMinute < 10) && (l_nMinute >= 0)) { m_oLnkMinutes.Text = ZERO; } m_oLnkMinutes.Text += Convert.ToString(l_nMinute); } ...
private void InitializeComponent() { ... // // m_oLnkHours // m_oLnkHours.TextAlign = ContentAlignment.TopRight; // // m_oLnkMinutes // m_oLnkMinutes.TextAlign = ContentAlignment.TopRight;
|
|
|
|

|
Nice control! I'd like to use it, but I have found a problem. When the TimePicker is placed on a tabPage of a TabControl, the TimePicker only shows the seperator and the minutes. The hours are not visible. However, the dropdown part of the control works fine. What can I do to make the control work on a tabPage?
|
|
|
|

|
Has anyone fixed the problem when the TimePicker is
placed on a tabPage of a TabControl???
|
|
|
|

|
Has anybody a solution for this problem?
|
|
|
|

|
Was wondering if anyone has found a solution to this problem? thank you.
eatwork
|
|
|
|

|
Check the initiallization of TimePicker and you'll probably see something like below.
(StartTime is an instance of TimePicker)
this.StartTime.BackColor = System.Drawing.Color.Transparent;
this.StartTime.ButtonColor = System.Drawing.SystemColors.Control;
this.StartTime.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F,
this.StartTime.Location = new System.Drawing.Point(624, 426);
this.StartTime.Name = "StartTime";
this.StartTime.SelectedColor = System.Drawing.Color.White;
this.StartTime.SeparatorColor = System.Drawing.Color.Black;
this.StartTime.Size = new System.Drawing.Size(134, 22);
this.StartTime.TabIndex = 313;
this.StartTime.Format = "hh:MM";
this.StartTime.Margin = new System.Windows.Forms.Padding(0);
this.StartTime.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.StartTime.Value = System.TimeSpan.Parse("11:59:00");
I happened to move the LAST 4 LINES above the line
this.tabPage2.Controls.Add(this.StartTime);
, while those 4 lines were originally located under the line.
It's now working.
|
|
|
|

|
Do you have a version with support for seconds? If not, how easily can I extend your library to add such a support?
-Thanks
|
|
|
|

|
It's easy to extend. Create yr own control, add two TimePickers onto it. The first one is to select hours and minutes and the second one to select seconds. Just set the second one's TimeSelector to Minutes (and treat them as seconds of course) ... If you want the control that alreay does all this please let me know (by replying) and I will send it to you.
Miha
|
|
|
|

|
Could you add a TimeSelector value for half hour intervals i.e 00:00, 00:30, 01:00 etc?
|
|
|
|

|
Would I be able to get your modified time picker control? thanks
eatwork
|
|
|
|

|
Do you have your TimePicker control (presented here as a Windows Form control) for ASP.NET?
|
|
|
|

|
Hi I have developed a similer control for ASP.net 2.0 (works for IE 5.5+). If you need a copy or more info mail me at dipesh_batheja@yahoo.com.
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
|
A variation on the standard .NET date-time picker
| Type | Article |
| Licence | |
| First Posted | 7 Jul 2003 |
| Views | 208,266 |
| Downloads | 5,008 |
| Bookmarked | 82 times |
|
|