DROP statements removes existing entities.
Search This Blog
Wednesday, March 19, 2014
DateDiff Visual Basic Example
VB.NET > Functions > DateDiff
Returns a value specifying the number of time intervals
between two dates.
Example:
Returns a value specifying the number of time intervals
between two dates.
Example:
Dim dt1 As Date = #3/1/2014#
Dim dt2 As Date = #4/1/2014#
MessageBox.Show("Day diff: " & DateDiff(DateInterval.Day, dt1, dt2) & " Week diff: " & DateDiff(DateInterval.Weekday, dt1, dt2))
Etichete:
VB.NET
Monday, March 17, 2014
Wednesday, March 12, 2014
MessageBox C# Example
C# > Forms > MessageBox
Examples:
A. Displays a message box with specified text.
MessageBox.Show("Text message");
B. Displays a message box with specified text, caption, and buttons.
string message = "Do you want to close this windows?";
Examples:
A. Displays a message box with specified text.
B. Displays a message box with specified text, caption, and buttons.
string message = "Do you want to close this windows?";
string caption = "Question";
MessageBoxButtons buttons = MessageBoxButtons.YesNo;
DialogResult result = MessageBox.Show(message, caption, buttons);
if (result == System.Windows.Forms.DialogResult.Yes)
{
this.Close();
}
Etichete:
c#
Monday, March 10, 2014
AppActivate Visual Basic
VB.NET > Functions > AppActivate
Activates an application that is already running.
Example:
Start and activate notepad
Activates an application that is already running.
Example:
Start and activate notepad
AppActivate(Shell("C:\Windows\System32\notepad.exe", AppWinStyle.NormalFocus))
Etichete:
VB.NET
Thursday, March 6, 2014
C# Random Color
C# > Color > Random
Random rnd = new Random();
Color randomColor = Color.FromArgb(rnd.Next(255), rnd.Next(255), rnd.Next(255));
Etichete:
c#
Subscribe to:
Posts (Atom)