You must Sign In to post a response.
  • Category: Windows

    Digital clock in windows title bar

    Hi Friends,

    How to place on digital clock in windows title bar? I want to place the digital clock in right side near by minimize, maximize button. How can i do this?

    Thanks in advance.
  • #499662
    Refer below link for sample code,

    http://www.codeproject.com/KB/selection/DigitalClockControl.aspx


    Regards,
    Asheej T K

  • #499666
    Hi Asheej,

    Thank you for your response but i want to display the clock in windows title bar.

    Regards,
    V.M. Damodharan
    "Your talent will be worthless, when you have fear and tension."

  • #499713
    use a timer control and change the heading like this.


    frm1.Title = "Time + system.DateTIme.Now.ToShortTimeString();

    Thanks & Regards
    Anil Kumar Pandey
    Microsoft MVP, DNS MVM

  • #499793
    Hi Anil,

    I want to display the title in left side and the time is display at right side near by maximize and minimize control box.

    Regards,
    V.M. Damodharan
    "Your talent will be worthless, when you have fear and tension."

  • #499889
    Hi Damo,

    try this,

    private void timer1_Tick(object sender, EventArgs e)
    {
    this.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
    this.Text = DateTime.Now.ToString("h:mm:ss");

    }

  • #499931
    Hello karthekeyan,

    Your code displays only the time. I need the title as left and time as right. I don't want to give a space. Because the title text is display in dynamically.

    Ex:

    Form1                   3:57 PM

    Regards,
    V.M. Damodharan
    "Your talent will be worthless, when you have fear and tension."

  • #500299
    hi

    try like this in timer tick event da.

    string s = this.Text;
    string[] a = { " Time:" };

    string[] b = s.Split(a,StringSplitOptions.RemoveEmptyEntries);
    this.Text = b[0] + " Time:" + DateTime.Now.ToString("h:mm:ss");



    balaji

  • #500301
    Hi Balaji,

    I want to display the title in left side and display the clock in right side. Read the question clearly and check all other posts da.

    Regards,
    V.M. Damodharan
    "Your talent will be worthless, when you have fear and tension."


  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.