-
Prospect
cegonsoft private limited | Date Time Picker in VB.NET
The Date Time Picker control is commonly used in the windows environment to allow the user select a particular date. In .NET it is represented by the System.Windows.Forms.DateTimePicker class. It can be selected from the toolbox and placed on the form in the designer. Usually we only change its Name property. The most frequently used event for the date time picker is ValueChanged. It is triggered when the user selects a new date from the control. The following event handler uses this event to print the value of selected date in a message box
Private Sub dtpSelectedDate_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dtpSelectedDate.ValueChanged
Dim msg As String = dtpSelectDate.Text
msg += vbcrlf + " Day: " + dtpSelectDate.Value.Day.ToString()
msg += vbcrlf + " Month: " + dtpSelectDate.Value.Month.ToString()
msg += vbcrlf + " Year: " + dtpSelectDate.Value.Year.ToString()
msg += vbcrlf + " Day of Week: " + dtpSelectDate.Value.DayOfWeek.ToString()
MessageBox.Show(msg)
End Sub
In the code above, we have separately collected and printed the day, month, year and the day of the week in a message box.
Visit: Cegonsoft
-
Prospect
This is very good one and very understandable one..thanks.
cegonsoft training will provide this new type of concept that we can date pick from ASP in \AJAX
When the ASP.NET Ajax Control Toolkit first came out with the CalendarExtender, I just loved it. That smooth transition when navigating from month to month or year to year really won me over. I’ve also loved how I could use it as a simple ASP.NET Control by integrating it in my pages and using from my code-behind.
I took a look at the jQuery UI DatePicker widget (from an ASP.NET Developers point of view), which again completely won me over. What was it this time? Well … the speed, the options, the themes, the frequent updates, the ease of integration, etc.
Well this post started probably out of disappointment and I wanted to call it: Why I abandoned using the CalendarExtender and choose to go with the jQuery UI DatePicker instead. The disappointment started from a CSS issue, namely I’ve been using some default values for tables like:
1.border-collapse: separate;
2.border-spacing: 2px;
Of course the lovely CalendarExtender doesn't override these, and of course due to the fact that it specifies a default width (which works well in normal / default conditions) the last column of days can’t be seen.
-
Emerald Star member
ASP.NET is a server side scripting technology that enables scripts (embedded in web pages) to be executed by an Internet server.
ASP.NET is a Microsoft Technology
ASP stands for Active Server Pages
ASP.NET is a program that runs inside IIS
IIS (Internet Information Services) is Microsoft's Internet server
IIS comes as a free component with Windows servers
IIS is also a part of Windows 2000 and XP Professional
The .NET Framework is the infrastructure for the Microsoft .NET platform.
The .NET Framework is an environment for building, deploying, and running Web applications and Web Services.
Training in CEGONSOFT:
CEGONSOFT is one of the country's fastest growing Information Technology Solution Company. CEGONSOFT has established itself with three independent successful divisions.
Software Training
Software Development
HR Consultancy
Providing International Certifications after the course and job assistance will be done through the HR.
Cegonsoft
Last edited by madhusundar; 10-01-2011 at 10:33 AM.
-
Prospect
Virtual and abstract
ABSTACT classes or methods are the one which is declared as template but there is no implementation. As such it will not work.
Suppose In the cases, when you create some class as template. But there is no real implementation in that. You want the user who uses this class to write the implementation. In such cases declare the functions as ABSTRACT.
public abstract class BoxObject {
/* declare fields */
/* declare non-abstract methods */
abstract void paint();
}
VIRTUAL classes or methods are the one which is declared with default implementation. If the user of the class who derives this want to add some implementation, he can add it.
using System;
namespace Virtual_Sample
{
class Base
{
public virtual void Printval(){Console.WriteLine("Base Value");}
}
class Derived : Base
{
public virtual void Printval(){Console.WriteLine("Derived");}
}
class Test
{
static void Main(string[] args)
{
Base b;
Derived d;
b = new Base();
d = new Derived();
b.Printval(); // output --> “Base Value”
d.Printval(); // output --> "Derived"
b = new Derived();
b.Printval(); // output --> "Derived"
}
}
}
Cegonsoft
-
Prospect
Cegonsoft provides the very good training in the advance technologies.They also provide the software development process.They provide the quality projects and they provide the very good industrial training experience.
In cegonsoft technologies HR consultancy is in very good manner.They provide the interviews in many companies and also they provide the good training for the students to get the placements in the good companies.
Cegonsoft also have the many client companies.They give opportunities to their students to get placement in that companies.
Cegonsoft
-
Prospect
Date Time Picker Demo
Imports System
Imports System.Data
Imports System.Windows.Forms
Imports System.Drawing
Public Class MainClass
Shared Sub Main()
Dim form1 As Form = New Form1
Application.Run(form1)
End Sub
End Class
<Global.Microsoft.VisualBasic.CompilerServices.Des ignerGenerated()> _
Partial Public Class Form1
Inherits System.Windows.Forms.Form
'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.DateTimePicker1 = New System.Windows.Forms.DateTimePicker
Me.Label1 = New System.Windows.Forms.Label
Me.Label2 = New System.Windows.Forms.Label
Me.DateTimePicker2 = New System.Windows.Forms.DateTimePicker
Me.SuspendLayout()
'
'DateTimePicker1
'
Me.DateTimePicker1.Location = New System.Drawing.Point(64, 16)
Me.DateTimePicker1.Name = "DateTimePicker1"
Me.DateTimePicker1.Size = New System.Drawing.Size(200, 20)
Me.DateTimePicker1.TabIndex = 0
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(8, 16)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(51, 13)
Me.Label1.TabIndex = 1
Me.Label1.Text = "Start Date"
'
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.Location = New System.Drawing.Point(8, 48)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(48, 13)
Me.Label2.TabIndex = 3
Me.Label2.Text = "End Date"
'
'DateTimePicker2
'
Me.DateTimePicker2.Location = New System.Drawing.Point(64, 48)
Me.DateTimePicker2.Name = "DateTimePicker2"
Me.DateTimePicker2.Size = New System.Drawing.Size(200, 20)
Me.DateTimePicker2.TabIndex = 2
'
'Form1
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(292, 273)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.DateTimePicker2)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.DateTimePicker1)
Me.Name = "Form1"
Me.Text = "UseDateTimePicker"
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents DateTimePicker1 As System.Windows.Forms.DateTimePicker
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents DateTimePicker2 As System.Windows.Forms.DateTimePicker
End Class
cegonsoft
-
Prospect
Hi,
Cegonsoft is the best IT Training Centre providing training on various technologies including .NET in Karnataka and Tamilnadu.
Their comprehensive .NET course provides in-depth coverage of all .NET features from fundamental to advanced topics.
They also provide Placement Assistance for their trainees and International Certification after completion of Course.
Cegonsoft
-
Prospect
It's a nice date time picker example in vb.
Cegonsoft
-
Prospect
Hi,
There are countless capabilities in the new Visual Studio .NET, but how do we even begin to understand the impact they will have on our windows and web applications is a huge challenge.
Cegonsoft is the best IT training center providing training on lots of technologies.Dot Net is one of them. They are providing training as per industry standards and requirements.They also place their students in reputed companies and multinationals right after completion of course.
Cegonsoft
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules