Microsoft Developer Network > Página Inicial dos Fóruns > Off-Topic Posts (Do Not Post Here) > how to display time value based on width of the line
Fazer uma PerguntaFazer uma Pergunta
 

Resposta Propostahow to display time value based on width of the line

  • sexta-feira, 6 de novembro de 2009 21:49ManasMSDN Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    hi,

    how can i display time on a line based on its width

    if i
    case 1: increase the line width, time value s should be interms of  minutes and seconds
    case 2: decrease the line width, time values  should be interms of  hours and minutes
    case 3: days
    case 4: months like that


    any formula plz help me!

    thanx in advance
    • EditadoManasMSDN sexta-feira, 6 de novembro de 2009 21:49description
    • EditadoManasMSDN sexta-feira, 6 de novembro de 2009 22:11text
    • MovidoeryangMSFTquinta-feira, 12 de novembro de 2009 8:02 (From:.NET Base Class Library)
    •  

Todas as Respostas

  • sábado, 7 de novembro de 2009 19:04DeborahKMVPMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     Contém Código
    There is an Add method for a date that you can use to increase a date by minutes, seconds, hours, or whatever.

    Here is an example:

            Dim dt1 As DateTime
            dt1 = DateTime.Now
            dt1 = dt1.AddDays(2)
            Debug.WriteLine(dt1.ToString)
    


    Hope this helps.
    www.insteptech.com ; msmvps.com/blogs/deborahk
    We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS!
  • segunda-feira, 9 de novembro de 2009 2:02konikula Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    Use myDate.Format(formatString)

    for example Now().Format("HH\:mm") will writeout current time in 24 short format

    check out custom format strings
    http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx

    you may also know that each valuetype (integer, double, timespan, time) has custom format strings which are very usefull time from time...

    Cheers, Matt
  • segunda-feira, 9 de novembro de 2009 15:14ManasMSDN Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     

    Hi,

    i am talking about , GDI+ stuff.

    how to draw a line based on time values.

    how can i display time on a line based on its width

    if i
    case 1: increase the line width, time value s should be interms of  minutes and seconds
    case 2: decrease the line width, time values  should be interms of  hours and minutes
    case 3: days
    case 4: months like that

  • quarta-feira, 11 de novembro de 2009 6:51eryangMSFTMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    Hi,
    If you are interested in GDI+ technology, you can consider posting it at GDI+ related forum for quicker and better support.

    Thanks,
    Eric
    Please remember to mark helpful replies as answers and unmark them if they provide no help.
  • quarta-feira, 18 de novembro de 2009 22:47ManasMSDN Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     

    hi,

    can anyone tell me where is the link   for GDI+ Forum.
    thanks

  • quinta-feira, 19 de novembro de 2009 6:12Saju Mathew Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     Resposta Proposta
    May be you can raise this in Windows Forms General

    http://social.msdn.microsoft.com/Forums/en-US/winforms

    • Sugerido como RespostaSaju Mathew segunda-feira, 23 de novembro de 2009 4:44
    •