MMM-dd-yy hh:mm
The WinStatusBar™ Date style is a type of panel used to display the current date.
Add an UltraStatusBar to your Windows Form.
In the Property Pages scroll down to the Panels Property. Click the ellipsis to bring up the Panels Collection.
Click the "Add" button. This will add a new panel.
Scroll the properties until you come to the Style property. Set the Style property equal to Date.
Set the DateTimeFormat property to determine how the date will be displayed. For example, a setting of "
MMM-dd-yy hh:mm
" will display the abbreviated month, 2 digit day and year as well as the hour and minute.
Click OK to close the window and you will see a Date panel added to the status bar.
In Visual Basic:
Imports Infragistics.Win.UltraWinStatusBar ... Private Sub Set_the_Panel_Style_to_Date_Load(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles MyBase.Load ' Create new panel Dim myPanel As New UltraStatusPanel() ' Set the style for the panel myPanel.Style = PanelStyle.Date ' Set the DateTimeFormat property myPanel.DateTimeFormat = "MMM-dd-yy hh:mm" ' Add the panel to the element Me.UltraStatusBar1.Panels.Add(myPanel) End Sub
In C#:
using Infragistics.Win.UltraWinStatusBar; ... private void Set_the_Panel_Style_to_Date_Load(object sender, EventArgs e) { // Create new panel UltraStatusPanel myPanel = new UltraStatusPanel(); // Set the style for the panel myPanel.Style = PanelStyle.Date; // Set the DateTimeFormat property myPanel.DateTimeFormat = "MMM-dd-yy hh:mm"; // Add the panel to the element this.ultraStatusBar1.Panels.Add(myPanel); }