Solved

Need object for User interface for choose time (hours only in a day).

Posted on 2009-05-13
6
199 Views
Last Modified: 2013-12-17
Hi experts!

  Im using C# 2008 , WinForm NET 2. I need to help  user to enter time in a.m p.m or 0-24 hours style depend of customer regional setting. Best think is which dbl. click to show him available choose, some thing like calendar but only for time.
This time calendar need to have only hour for 1 day, not need to choose minutes and seconds.

 Can you suggest code in C# or additional components?

 Thank you.
0
Comment
Question by:dvplayltd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 4

Expert Comment

by:Wardy_01
ID: 24372703
From your description it sounds like you might benefit from using a little outlook integration if this is a corporate application.
You can reference the outlook com object and drop an outlook view on to your winform then let that handle everything.

or

If you need something above and beyond the functionality provided by outlook you can always do it yourself.
You could use the standard .NET 2.0 calendar control from your toolbar and override the DayRender event to render out a custom look for your given day.

Hopefully this should be what you need :)
Good luck !!!
0
 

Author Comment

by:dvplayltd
ID: 24372740
hello Wardy 01,

This do not help.I can not be sure Outlook is installed first and second i need user only to choose time, not day. There operation which are do every day and I need user to choose that will do it some range hour - let say from 10 a.m. to 12 a.m.
0
 
LVL 4

Accepted Solution

by:
Wardy_01 earned 500 total points
ID: 24372918
oh ok ...

In that case I would recommend you use a standard textbox control and combine it with a regular expression validator.

This will force the user to enter a time in a specific format.

Or ...

use 2 drop downs and have 1 for the hour and 1 for the minutes, put all available values in there and then have a submit button that passes that on / moves the user to the next operation.

If you are trying to log something that happens right now then try using the "DateTime.Now" object also you can bind the drop downs to a datetime object for programming use.
0
Raise the IQ of Your IT Alerts

From IT major incidents to manufacturing line slowdowns, every business process generates insights that need to reach the people required to take action. You need a platform that integrates with your business tools to create fully enabled DevOps toolchains.

You need xMatters.

 

Author Comment

by:dvplayltd
ID: 24373070
this is much better .. with combobox . I need only hour, not minutes, so one combobox is OK.

But hope to get something ready .. not I to do it. :-)

Thanks.
0
 
LVL 4

Expert Comment

by:Wardy_01
ID: 24373144
no worries :)

Glad I could help !!

Also ...
behind the intereface set the value chosen in a datetime object to allow you to keep and pass the format of the object around in your applcation.

Good Luck !!
0
 
LVL 4

Expert Comment

by:Wardy_01
ID: 24373150
don't forget to mark the answer so others can benefit :)
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question