473,402 Members | 2,064 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,402 software developers and data experts.

numericUpDown with time

Hi. I would like to create numericupdown control that's value is time in
format 12:12.
Is this posible?
Value property contains only decimal.
PK
Nov 17 '05 #1
3 11339
You'll need to create a custom control from scratch. The usual time
selection interfaces enable the user to change the hour, minute or second
using some up / down indication. This would be a control for someone of
intermediate control creation skill level.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"piotrek" <pi*************@gmail.com> wrote in message
news:b6**************************@news.chello.pl.. .
Hi. I would like to create numericupdown control that's value is time in
format 12:12.
Is this posible?
Value property contains only decimal.
PK

Nov 17 '05 #2
Hello

As far as i think , u can use the DomainUpDown Control , or inherit a Custom
Control from it to achieve ur goal.

ALI RAZA SHAIKH
MCAD.Net

www.programmersparadise.cjb.net
alirazashaikh.blogspot.com

"piotrek" <pi*************@gmail.com> wrote in message
news:b6**************************@news.chello.pl.. .
Hi. I would like to create numericupdown control that's value is time in
format 12:12.
Is this posible?
Value property contains only decimal.
PK

Nov 17 '05 #3
hmm.
Then i designed i class:

public class NumericUpDownEx : NumericUpDown
{
static decimal first = 0;
public NumericUpDownEx()
{
}
protected override void UpdateEditText()
{
if (Value == 59)
{
if (first == 23) first = 0;
else first++;
Value = 0;
}
String fs = first.ToString();
String fsw = Value.ToString();
if (first <= 9)
{
fs = "0" + fs ;
}
if (Value <= 9) fsw = "0" + fsw;
this.Text = fs + ":" + fsw;

}

}

Now i would like user to change values without clicking ( just entering with keyboard ).
Do you know if there is an event when i try to enter data into numericupdown ?
Nov 17 '05 #4

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

Similar topics

21
by: | last post by:
Hi, I am setting the NumericUpDown .Value property and the ValueChanged event is NOT being fired. Does this ONLY get fired when I change it on the UI and not programatically? Thanks
10
by: Bonj | last post by:
I'm using a number of NumericUpDown controls on my form, which controls printer settings such as number of pages. However I want to override one of the default behaviours of the control, namely...
0
by: Koert | last post by:
Hi In the NumericUpDown control I have to detect that Tab was pressed so I have inherited the NumericUpDown and overroden the PreProcessMessage function. In the DateTimePicker (for example) this...
3
by: abc my vclass | last post by:
My win-form have many numericupdown controls to applied. But numericupdown control don't like textbox, text box control can automatic selected text when got focus. Is there any method can let me...
4
by: illegal.prime | last post by:
Hey all, I have a NumericUpDown control on a Panel or potentially a Form that have AutoScroll enabled. When the NumericUpDown is active I would like the Form/Panel/whatever not to scroll when I...
5
by: Len Weltman | last post by:
I am trying to pass a NumericUpDown object into a class method using Visual Studio 2005, but the control type is not found in Intellisense and the type declaration is flagged as an error. Here...
2
by: Stephan Zaubzer | last post by:
Hi all, I encountered a problem with NumericUpDown yesterday and managed to reproduce the error with a very easy examle. I have a Windows Application with only one Form, which contains only one...
2
by: =?Utf-8?B?U2hhcm9u?= | last post by:
Hello experts, I posted a disturbing question in here:...
7
by: pamela fluente | last post by:
My numericUpDowns show numbers in the format 1.500,56 (italy). Instead, I need *invariantly* that they show and accept the format 1,500.56, as in the USA. What's the right way to do that? I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.