facebook comment box - dark
facebook comment box - light
ok now go to this link scroll down and you will see something like this
VB.NET, C#, Java, HTML, JQuery, Javascript, PHP, Software Reviews, Computer Tips and Tech News
Using System.Media;
SoundPlayer wave = new SoundPlayer(); string path = "path to .WAV"; wave.SoundLocation = path; wave.Play();
public partial class Form1 : Form {
protected override CreateParams CreateParams { get { CreateParams cp = base.CreateParams; cp.ClassStyle |= CS_DROPSHADOW; return cp; } }
Imports System.Text.RegularExpressions Module Module1 Public Enum ValidationType Only_Numbers = 1 Only_Characters = 2 Not_Null = 3 Only_Email = 4 End Enum Public Sub AssignValidation(ByRef CTRL As Windows.Forms.TextBox, ByVal Validation_Type As ValidationType) Dim txt As Windows.Forms.TextBox = CTRL Select Case Validation_Type Case ValidationType.Only_Numbers AddHandler txt.KeyPress, AddressOf number_Leave Case ValidationType.Only_Characters AddHandler txt.KeyPress, AddressOf OCHAR_Leave Case ValidationType.Not_Null AddHandler txt.Leave, AddressOf NotNull_Leave Case ValidationType.Only_Email AddHandler txt.Leave, AddressOf Email_Leave End Select End Sub Public Sub number_Leave(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Dim numbers As Windows.Forms.TextBox = sender If InStr("1234567890.", e.KeyChar) = 0 And Asc(e.KeyChar) <> 8 Or (e.KeyChar = "." And InStr(numbers.Text, ".") > 0) Then e.KeyChar = Chr(0) e.Handled = True End If End Sub Public Sub OCHAR_Leave(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) If InStr("1234567890!@#$%^&*()_+=-", e.KeyChar) > 0 Then e.KeyChar = Chr(0) e.Handled = True End If End Sub Public Sub NotNull_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Dim No As Windows.Forms.TextBox = sender If No.Text.Trim = "" Then MsgBox("This field Must be filled!") No.Focus() End If End Sub Public Sub Email_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Dim Email As Windows.Forms.TextBox = sender If Email.Text <> "" Then Dim rex As Match = Regex.Match(Trim(Email.Text), "^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,3})$", RegexOptions.IgnoreCase) If rex.Success = False Then MessageBox.Show("Please Enter a valid Email Address", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information) Email.BackColor = Color.Red Email.Focus() Exit Sub Else Email.BackColor = Color.White End If End If End Sub End Module
AssignValidation(Me.TextBox1, ValidationType.Only_Numbers) AssignValidation(Me.TextBox2, ValidationType.Only_Characters) AssignValidation(Me.TextBox3, ValidationType.Not_Null) AssignValidation(Me.TextBox4, ValidationType.Only_Email)
string godmode = @"D:\god.{ED7BA470-8E54-465E-825C-99712043E01C}"; Directory.CreateDirectory(godmode);
Dim godmode As String = "D:\god.{ED7BA470-8E54-465E-825C-99712043E01C}" Directory.CreateDirectory(godmode)
Imports System.Drawing.Drawing2D Public Class Form1 'Author : Mohamed Shimran 'Blog : http://www.ultimateprogrammingtutorials.blogspot.com Dim g As Graphics = Me.CreateGraphics Dim offsetvalue As Integer = 150 Dim x, y, cx, cy As Integer Dim randd As New Random Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.Timer1.Start() rota = 10 x = randd.Next(0, Me.Width) y = randd.Next(0, Me.Height) cx = randd.Next(5, 10) cy = randd.Next(5, 10) End Sub Dim rota As Integer Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint Dim g As Graphics = e.Graphics g.Clear(Color.Green) Static angle As Integer x += cx y += cy If x > Me.Width - 150 Then cx = -cx ElseIf x < 0 Then cx = -cx End If If y > Me.Height - 150 Then cy = -cy ElseIf y < 0 Then cy = -cy End If Dim G_path As GraphicsPath = New GraphicsPath() Dim rectangle As RectangleF = New RectangleF(x, y, 200, 100) Dim str_format As StringFormat = New StringFormat() str_format.Alignment = StringAlignment.Center str_format.LineAlignment = StringAlignment.Center G_path.AddRectangle(rectangle) G_path.AddString("Ultimate programming tutorials", Me.Font.FontFamily, CInt(Me.Font.Style), Me.Font.Height + 15, rectangle, str_format) angle += rota If angle > 360 Then rota = -rota ElseIf angle < 0 Then rota = -rota End If g.DrawPath(New Pen(Brushes.Black, 4), G_path) g.FillPath(Brushes.Azure, G_path) Dim matrix As Matrix = New Matrix() matrix.Translate(0, 0) matrix.RotateAt(angle, New PointF(Me.Width / 2 + (50), Me.Height / 2 - (50 / 2))) G_path.Transform(matrix) g.DrawPath(New Pen(Brushes.White, 4), G_path) g.FillPath(Brushes.Black, G_path) g.DrawPath(Pens.Black, G_path) End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Invalidate() End Sub End Class
Imports MySql.Data.MySqlClient Public Class form1 'Author : Mohamed Shimran 'Blog : http://www.ultimateprogrammingtutorials.blogspot.com Private mysql_connect As New MySqlConnection Private Sub connect_mysql() Dim db_name As String = "Database Name" Dim db_host As String = "Database Host" Dim username As String = "Database Username" Dim password As String = "Database Password" If Not mysql_connect Is Nothing Then mysql_connect.Close() mysql_connect.ConnectionString = String.Format("server={0}; user id={1}; password={2}; database={3}; pooling=false", db_host, username, password, db_name) Try mysql_connect.Open() Catch ex As MySqlException MsgBox("Connecting To Database Error:[" & ex.Message & "]") End Try End Sub End Class