كود ابرنامج:
Imports System.Threading '
Imports System.Globalization '
'
Public Class Form1
'Private moveTo As Point
Private mPrevPos As New Point
Dim hours As Integer = DateTime.Now.Hour
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Dim Today_Date As Date
'Dim Month_Nam As String
'Dim Month_Num As String
Me.ControlBox = False
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Text = ""
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
TransparencyKey = Color.White
'Button1.BackColor = Color.White
'PictureBox1.BackColor = Color.White
Me.BackColor = Color.White
End Sub
Private Sub PictureBox1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox1.DoubleClick
Me.Close()
End Sub
Private Sub PictureBox2_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox2.DoubleClick
Me.Close()
End Sub
Private Sub PictureBox3_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox3.DoubleClick
Me.Close()
End Sub
Private Sub PictureBox4_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox4.DoubleClick
Me.Close()
End Sub
Private Sub PictureBox5_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox5.DoubleClick
Me.Close()
End Sub
Private Sub PictureBox6_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox6.DoubleClick
Me.Close()
End Sub
Private Sub PictureBox7_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox7.DoubleClick
Me.Close()
End Sub
Private Sub PictureBox8_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox8.DoubleClick
Me.Close()
End Sub
Private Sub PictureBox9_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox9.DoubleClick
Me.Close()
End Sub
Private Sub PictureBox10_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox10.DoubleClick
Me.Close()
End Sub
Private Sub PictureBox11_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox11.DoubleClick
Me.Close()
End Sub
Private Sub PictureBox12_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox12.DoubleClick
Me.Close()
End Sub
Private Sub PictureBox1_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseMove
Dim delta As New Size(e.X - mPrevPos.X, e.Y - mPrevPos.Y)
If (e.Button = MouseButtons.Left) Then
Me.Location += delta
mPrevPos = e.Location - delta
Else
mPrevPos = e.Location
End If
End Sub
Private Sub PictureBox2_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox2.MouseMove
Dim delta As New Size(e.X - mPrevPos.X, e.Y - mPrevPos.Y)
If (e.Button = MouseButtons.Left) Then
Me.Location += delta
mPrevPos = e.Location - delta
Else
mPrevPos = e.Location
End If
End Sub
Private Sub PictureBox3_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox3.MouseMove
Dim delta As New Size(e.X - mPrevPos.X, e.Y - mPrevPos.Y)
If (e.Button = MouseButtons.Left) Then
Me.Location += delta
mPrevPos = e.Location - delta
Else
mPrevPos = e.Location
End If
End Sub
Private Sub PictureBox4_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox4.MouseMove
Dim delta As New Size(e.X - mPrevPos.X, e.Y - mPrevPos.Y)
If (e.Button = MouseButtons.Left) Then
Me.Location += delta
mPrevPos = e.Location - delta
Else
mPrevPos = e.Location
End If
End Sub
Private Sub PictureBox5_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox5.MouseMove
Dim delta As New Size(e.X - mPrevPos.X, e.Y - mPrevPos.Y)
If (e.Button = MouseButtons.Left) Then
Me.Location += delta
mPrevPos = e.Location - delta
Else
mPrevPos = e.Location
End If
End Sub
Private Sub PictureBox6_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox6.MouseMove
Dim delta As New Size(e.X - mPrevPos.X, e.Y - mPrevPos.Y)
If (e.Button = MouseButtons.Left) Then
Me.Location += delta
mPrevPos = e.Location - delta
Else
mPrevPos = e.Location
End If
End Sub
Private Sub PictureBox7_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox7.MouseMove
Dim delta As New Size(e.X - mPrevPos.X, e.Y - mPrevPos.Y)
If (e.Button = MouseButtons.Left) Then
Me.Location += delta
mPrevPos = e.Location - delta
Else
mPrevPos = e.Location
End If
End Sub
Private Sub PictureBox8_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox8.MouseMove
Dim delta As New Size(e.X - mPrevPos.X, e.Y - mPrevPos.Y)
If (e.Button = MouseButtons.Left) Then
Me.Location += delta
mPrevPos = e.Location - delta
Else
mPrevPos = e.Location
End If
End Sub
Private Sub PictureBox9_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox9.MouseMove
Dim delta As New Size(e.X - mPrevPos.X, e.Y - mPrevPos.Y)
If (e.Button = MouseButtons.Left) Then
Me.Location += delta
mPrevPos = e.Location - delta
Else
mPrevPos = e.Location
End If
End Sub
Private Sub PictureBox10_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox10.MouseMove
Dim delta As New Size(e.X - mPrevPos.X, e.Y - mPrevPos.Y)
If (e.Button = MouseButtons.Left) Then
Me.Location += delta
mPrevPos = e.Location - delta
Else
mPrevPos = e.Location
End If
End Sub
Private Sub PictureBox11_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox11.MouseMove
Dim delta As New Size(e.X - mPrevPos.X, e.Y - mPrevPos.Y)
If (e.Button = MouseButtons.Left) Then
Me.Location += delta
mPrevPos = e.Location - delta
Else
mPrevPos = e.Location
End If
End Sub
Private Sub PictureBox12_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox12.MouseMove
Dim delta As New Size(e.X - mPrevPos.X, e.Y - mPrevPos.Y)
If (e.Button = MouseButtons.Left) Then
Me.Location += delta
mPrevPos = e.Location - delta
Else
mPrevPos = e.Location
End If
End Sub
Private Sub Label3_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Label3.DoubleClick
Me.Close()
End Sub
Private Sub Label3_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label3.MouseMove
Dim delta As New Size(e.X - mPrevPos.X, e.Y - mPrevPos.Y)
If (e.Button = MouseButtons.Left) Then
Me.Location += delta
mPrevPos = e.Location - delta
Else
mPrevPos = e.Location
End If
End Sub
Private Sub Label3_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label3.MouseDown
If e.Button = Windows.Forms.MouseButtons.Right Then
'ContextMenuStrip1.Show(Me, e.Location)
ContextMenuStrip1.Show(Me, Me.Location.X, Me.Location.Y)
End If
End Sub
Private Sub Label2_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Label2.DoubleClick
Me.Close()
End Sub
Private Sub Label2_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label2.MouseMove
Dim delta As New Size(e.X - mPrevPos.X, e.Y - mPrevPos.Y)
If (e.Button = MouseButtons.Left) Then
Me.Location += delta
mPrevPos = e.Location - delta
Else
mPrevPos = e.Location
End If
End Sub
Private Sub Label2_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label2.MouseDown
If e.Button = Windows.Forms.MouseButtons.Right Then
ContextMenuStrip1.Show(Me, e.Location)
'ContextMenuStrip1.Show(Me, Me.Location.X, Me.Location.Y)
End If
End Sub
Private Sub Label1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Label1.DoubleClick
Me.Close()
End Sub
Private Sub Label1_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label1.MouseMove
Dim delta As New Size(e.X - mPrevPos.X, e.Y - mPrevPos.Y)
If (e.Button = MouseButtons.Left) Then
Me.Location += delta
mPrevPos = e.Location - delta
Else
mPrevPos = e.Location
End If
End Sub
Private Sub Label1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label1.MouseDown
If e.Button = Windows.Forms.MouseButtons.Right Then
'ContextMenuStrip1.Show(Me, e.Location)
ContextMenuStrip1.Show(Me, Me.Location.X, Me.Location.Y)
End If
End Sub
Private Sub PictureBox1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseDown
If e.Button = Windows.Forms.MouseButtons.Right Then
ContextMenuStrip1.Show(Me, e.Location)
'ContextMenuStrip1.Show(Me, Me.Location.X, Me.Location.Y)
End If
End Sub
Private Sub PictureBox2_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox2.MouseDown
If e.Button = Windows.Forms.MouseButtons.Right Then
ContextMenuStrip1.Show(Me, e.Location)
'ContextMenuStrip1.Show(Me, Me.Location.X, Me.Location.Y)
End If
End Sub
Private Sub PictureBox3_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox3.MouseDown
If e.Button = Windows.Forms.MouseButtons.Right Then
ContextMenuStrip1.Show(Me, e.Location)
'ContextMenuStrip1.Show(Me, Me.Location.X, Me.Location.Y)
End If
End Sub
Private Sub PictureBox4_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox4.MouseDown
If e.Button = Windows.Forms.MouseButtons.Right Then
ContextMenuStrip1.Show(Me, e.Location)
'ContextMenuStrip1.Show(Me, Me.Location.X, Me.Location.Y)
End If
End Sub
Private Sub PictureBox5_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox5.MouseDown
If e.Button = Windows.Forms.MouseButtons.Right Then
ContextMenuStrip1.Show(Me, e.Location)
'ContextMenuStrip1.Show(Me, Me.Location.X, Me.Location.Y)
End If
End Sub
Private Sub PictureBox6_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox6.MouseDown
If e.Button = Windows.Forms.MouseButtons.Right Then
ContextMenuStrip1.Show(Me, e.Location)
'ContextMenuStrip1.Show(Me, Me.Location.X, Me.Location.Y)
End If
End Sub
Private Sub PictureBox7_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox7.MouseDown
If e.Button = Windows.Forms.MouseButtons.Right Then
ContextMenuStrip1.Show(Me, e.Location)
'ContextMenuStrip1.Show(Me, Me.Location.X, Me.Location.Y)
End If
End Sub
Private Sub PictureBox8_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox8.MouseDown
If e.Button = Windows.Forms.MouseButtons.Right Then
ContextMenuStrip1.Show(Me, e.Location)
'ContextMenuStrip1.Show(Me, Me.Location.X, Me.Location.Y)
End If
End Sub
Private Sub PictureBox9_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox9.MouseDown
If e.Button = Windows.Forms.MouseButtons.Right Then
ContextMenuStrip1.Show(Me, e.Location)
'ContextMenuStrip1.Show(Me, Me.Location.X, Me.Location.Y)
End If
End Sub
Private Sub PictureBox10_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox10.MouseDown
If e.Button = Windows.Forms.MouseButtons.Right Then
ContextMenuStrip1.Show(Me, e.Location)
'ContextMenuStrip1.Show(Me, Me.Location.X, Me.Location.Y)
End If
End Sub
Private Sub PictureBox11_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox11.MouseDown
If e.Button = Windows.Forms.MouseButtons.Right Then
ContextMenuStrip1.Show(Me, e.Location)
'ContextMenuStrip1.Show(Me, Me.Location.X, Me.Location.Y)
End If
End Sub
Private Sub PictureBox12_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox12.MouseDown
If e.Button = Windows.Forms.MouseButtons.Right Then
ContextMenuStrip1.Show(Me, e.Location)
'ContextMenuStrip1.Show(Me, Me.Location.X, Me.Location.Y)
End If
End Sub
Private Sub AboutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AboutToolStripMenuItem.Click
MsgBox("3D Hijri Program Ver 1.0 " & Chr(10) & "Programmed by:" & Chr(10) & "Ayman Khoshouey 2013" & Chr(10) & "E-Mail: khoshouey@yahoo.com" & Chr(10) & "Mobile: (+2010)-1800-2225" & Chr(10) & "Cairo-Egypt")
End Sub
Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click
Me.Close()
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim Today_Date As Date
Dim Month_Nam As String
Dim Month_Num As String
'Dim Info_Label As String
Dim Ar As CultureInfo = New CultureInfo("AR-SA")
Thread.CurrentThread.CurrentCulture = Ar
Ar.DateTimeFormat.Calendar = New HijriCalendar
Ar.NumberFormat.DigitSubstitution = DigitShapes.Context
'Label1.Text = Format(Date.Now, " dddd,d MMM yyyy")
Label1.Text = Format(Date.Now, "yyyy")
Label2.Text = Format(Date.Now, "dddd")
Today_Date = Format(Date.Now, " dddd,d MMM yyyy")
Month_Nam = Format(Date.Now, "MM")
Month_Num = Format(Date.Now, "dd")
Ar.DateTimeFormat.Calendar = New GregorianCalendar
Ar.NumberFormat.DigitSubstitution = DigitShapes.Context
Label3.Text = Format(Date.Now, "dddd,d MMM yyyy")
'Label2.Text = Month_Nam
'Label3.Text = Month_Num
'PictureBox12.Visible = True
'Month_Nam = " "
Select Case Month_Nam
Case "01"
PictureBox1.Visible = True
Case "02"
PictureBox2.Visible = True
Case "03"
PictureBox3.Visible = True
Case "04"
PictureBox4.Visible = True
Case "05"
PictureBox5.Visible = True
Case "06"
PictureBox6.Visible = True
Case "07"
PictureBox7.Visible = True
Case "08"
PictureBox8.Visible = True
Case "09"
PictureBox9.Visible = True
Case "10"
PictureBox10.Visible = True
Case "11"
PictureBox11.Visible = True
Case "12"
PictureBox12.Visible = True
End Select
Select Case Month_Num
Case "01"
NumBox1.Visible = True
Case "02"
NumBox2.Visible = True
Case "03"
NumBox3.Visible = True
Case "04"
NumBox4.Visible = True
Case "05"
NumBox5.Visible = True
Case "06"
NumBox6.Visible = True
Case "07"
NumBox7.Visible = True
Case "08"
NumBox8.Visible = True
Case "09"
NumBox9.Visible = True
Case "10"
NumBox10.Visible = True
Case "11"
NumBox11.Visible = True
Case "12"
NumBox12.Visible = True
Case "13"
NumBox13.Visible = True
Case "14"
NumBox14.Visible = True
Case "15"
NumBox15.Visible = True
Case "16"
NumBox16.Visible = True
Case "17"
NumBox17.Visible = True
Case "18"
NumBox18.Visible = True
Case "19"
NumBox19.Visible = True
Case "20"
NumBox20.Visible = True
Case "21"
NumBox21.Visible = True
Case "22"
NumBox22.Visible = True
Case "23"
NumBox23.Visible = True
Case "24"
NumBox24.Visible = True
Case "25"
NumBox25.Visible = True
Case "26"
NumBox26.Visible = True
Case "27"
NumBox27.Visible = True
Case "28"
NumBox28.Visible = True
Case "29"
NumBox29.Visible = True
Case "30"
NumBox30.Visible = True
End Select
'Month_Nam = ""
'Month_Num = "01"
If Month_Nam = "01" And Month_Num = "01" Then
'InfoLabel2.Visible = True
'InfoLabel1.Visible = False
InfoTextBox2.Visible = True
InfoTextBox1.Visible = False
'InfoLabel2.Text = InfoLabel2.Text.Substring(3) & InfoLabel2.Text.Substring(0, 3)
InfoTextBox2.Text = InfoTextBox2.Text.Substring(3) & InfoTextBox2.Text.Substring(0, 3)
Else
'InfoTextBox1.Text = InfoTextBox1.Text.Substring(3) & InfoTextBox1.Text.Substring(0, 3)
InfoTextBox1.Text = InfoTextBox1.Text.Substring(3) & InfoTextBox1.Text.Substring(0, 3)
End If
If Month_Nam = "01" And Month_Num = "10" Then
'InfoLabel1.Text = " "
InfoTextBox3.Visible = True
InfoTextBox1.Visible = False
InfoTextBox3.Text = InfoTextBox3.Text.Substring(3) & InfoTextBox3.Text.Substring(0, 3)
End If
If Month_Nam = "03" And Month_Num = "12" Then
'InfoLabel1.Text = " "
InfoTextBox4.Visible = True
InfoTextBox1.Visible = False
InfoTextBox4.Text = InfoTextBox4.Text.Substring(3) & InfoTextBox4.Text.Substring(0, 3)
End If
If Month_Nam = "08" And Month_Num = "15" Then
InfoTextBox5.Visible = True
InfoTextBox1.Visible = False
InfoTextBox5.Text = InfoTextBox5.Text.Substring(3) & InfoTextBox5.Text.Substring(0, 3)
'InfoLabel1.Text = " "
End If
If Month_Nam = "10" And Month_Num = "01" Then
InfoTextBox6.Visible = True
InfoTextBox1.Visible = False
InfoTextBox6.Text = InfoTextBox6.Text.Substring(3) & InfoTextBox6.Text.Substring(0, 3)
'InfoLabel1.Text = " "
End If
If Month_Nam = "12" And Month_Num = "10" Then
'InfoLabel1.Text = " "
InfoTextBox7.Visible = True
InfoTextBox1.Visible = False
InfoTextBox7.Text = InfoTextBox7.Text.Substring(3) & InfoTextBox7.Text.Substring(0, 3)
End If
'InfoLabel1.Text = InfoLabel1.Text.Substring(3) & InfoLabel1.Text.Substring(0, 3)
Select Case hours
' Case Is < 12
'Label1.Text = " "
'ElseIf hours < 17 Then
' Str = "Afternoon"
'ElseIf hours >= 12 Then
'Str = "Evening"
Case Is >= 18
'Label1.Text = " "
'Process.Start("C:\Users\khoshoueyae\Documents\3D Hijri Arabic.exe")
Me.Close()
Case Else
Exit Sub
'End If
End Select
End Sub
Private Sub InfoTextBox1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles InfoTextBox1.DoubleClick
Me.Close()
End Sub
Private Sub InfoTextBox2_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles InfoTextBox2.DoubleClick
Me.Close()
End Sub
Private Sub InfoTextBox3_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles InfoTextBox3.DoubleClick
Me.Close()
End Sub
Private Sub InfoTextBox4_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles InfoTextBox4.DoubleClick
Me.Close()
End Sub
Private Sub InfoTextBox5_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles InfoTextBox5.DoubleClick
Me.Close()
End Sub
Private Sub InfoTextBox6_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles InfoTextBox6.DoubleClick
Me.Close()
End Sub
Private Sub InfoTextBox7_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles InfoTextBox7.DoubleClick
Me.Close()
End Sub
Private Sub YesToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles YesToolStripMenuItem.Click
Me.TopMost = True
End Sub
Private Sub NoToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NoToolStripMenuItem.Click
Me.TopMost = False
End Sub
Private Sub CalendarToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CalendarToolStripMenuItem.Click
FormCalendar.Show()
End Sub
'Private Sub Label1_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles Label1.MouseHover
' Label1.ForeColor = Color.Cyan
'End Sub
Private Sub ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem.Click
MsgBox("..........." & Chr(10) & " / " & Chr(10) & " ")
End Sub
End Class
يمكن رفع الصور المتحركة للبرنامج اذا رغب احد فى ذلك حيث لم اتمكن من رفعها فى الموقع