Solved

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

Posted on 2009-05-13
6
194 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
  • 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

705 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now