28 Temmuz 2013 Pazar
Kayan Panel Menü Örneği
PROJE KODLARINI
İNDİR
Public Class KayanMenu Dim pensure As Integer Dim Balon1, Balon2, Balon3, Balon4, Balon5 As Boolean #Region " FORM OLAYLARI..." Private Sub KayanMenu_FormClosing(sender As Object, e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing SaveSetting(Application.ProductName, Application.ProductName, "pencere animasyon süresi", ComboTS.Text.ToString) End Sub Private Sub KayanMenu_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ComboTS.Text = GetSetting(Application.ProductName, Application.ProductName, "pencere animasyon süresi", 20) pensure = ComboTS.Text.ToString Me.Width = 470 Me.Height = 522 Panel2.Height = 0 Panel3.Height = 0 Panel4.Height = 0 Panel5.Height = 0 Panel1.Height = 0 Timer5.Enabled = True Call lbl5() CheckBox1.Checked = GetSetting(Application.ProductName, Application.ProductName, "Bar Yönü", False) End Sub #End Region #Region " LABEL-TİMER OLAYLARI..." Private Sub lbl1() Timer1.Enabled = True If Balon1 = False Then Balon2 = False Balon3 = False Balon4 = False Balon4 = False Balon1 = True Else Balon1 = False End If End Sub Private Sub lbl2() Timer2.Enabled = True If Balon2 = False Then Balon1 = False Balon3 = False Balon4 = False Balon5 = False Balon2 = True Else Balon2 = False End If End Sub Private Sub lbl3() Timer3.Enabled = True If Balon3 = False Then Balon1 = False Balon2 = False Balon4 = False Balon5 = False Balon3 = True Else Balon3 = False End If End Sub Private Sub lbl4() Timer4.Enabled = True If Balon4 = False Then Balon1 = False Balon2 = False Balon3 = False Balon5 = False Balon4 = True Else Balon4 = False End If End Sub Private Sub lbl5() Timer5.Enabled = True If Balon5 = False Then Balon1 = False Balon2 = False Balon3 = False Balon4 = False Balon5 = True Else Balon5 = False End If End Sub #End Region #Region " TIMER OLAYLARI..." Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick If Panel2.Height = 0 And Panel3.Height = 0 And Panel4.Height = 0 Then If Balon1 = True Then If Panel5.Height > 0 Then Panel5.Height = 0 'panel5 açıksa kapat If Panel1.Height < 290 Then Panel1.Height = Panel1.Height + pensure End If Else If Panel1.Height > 0 Then Panel1.Height = Panel1.Height - pensure End If End If End If End Sub Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick If Panel1.Height = 0 And Panel3.Height = 0 And Panel4.Height = 0 And Panel5.Height = 0 Then If Balon2 = True Then If Panel2.Height < 290 Then Panel2.Height = Panel2.Height + pensure End If Else If Panel2.Height > 0 Then Panel2.Height = Panel2.Height - pensure End If End If End If End Sub Private Sub Timer3_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer3.Tick If Panel1.Height = 0 And Panel2.Height = 0 And Panel4.Height = 0 And Panel5.Height = 0 Then If Balon3 = True Then If Panel3.Height < 290 Then Panel3.Height = Panel3.Height + pensure End If Else If Panel3.Height > 0 Then Panel3.Height = Panel3.Height - pensure End If End If End If End Sub Private Sub Timer4_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer4.Tick If Panel1.Height = 0 And Panel2.Height = 0 And Panel3.Height = 0 And Panel5.Height = 0 Then If Balon4 = True Then If Panel4.Height < 290 Then Panel4.Height = Panel4.Height + pensure End If Else If Panel4.Height > 0 Then Panel4.Height = Panel4.Height - pensure End If End If End If End Sub Private Sub Timer5_Tick(sender As System.Object, e As System.EventArgs) Handles Timer5.Tick If Panel1.Height = 0 And Panel2.Height = 0 And Panel3.Height = 0 And Panel4.Height = 0 Then If Balon5 = True Then If Panel5.Height < 290 Then Panel5.Height = Panel5.Height + pensure End If Else If Panel5.Height > 0 Then Panel5.Height = Panel5.Height - pensure If Panel5.Height = 290 Then Panel5.Height = 0 End If End If End If 'Me.Text = Panel5.Height End Sub #End Region #Region " LİNKLABEL TIKLAMA OLAYLARI..." Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked Call lbl1() End Sub Private Sub LinkLabel2_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel2.LinkClicked Call lbl2() End Sub Private Sub LinkLabel3_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel3.LinkClicked Call lbl3() End Sub Private Sub LinkLabel4_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel4.LinkClicked Call lbl4() End Sub Private Sub LinkLabel5_LinkClicked(sender As System.Object, e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel5.LinkClicked Call lbl5() End Sub #End Region #Region " MENÜ MOUSE_ENTER OLAYLARI..." Private Sub TsAnaMn_MouseEnter(sender As System.Object, e As System.EventArgs) Handles TsAnaMn.MouseEnter Call lbl1() End Sub Private Sub TsIkon_MouseEnter(sender As System.Object, e As System.EventArgs) Handles TsIkon.MouseEnter Call lbl2() End Sub Private Sub TsRadiButton_MouseEnter(sender As System.Object, e As System.EventArgs) Handles TsRadiButton.MouseEnter Call lbl3() End Sub Private Sub TsSeçenekler_MouseEnter(sender As System.Object, e As System.EventArgs) Handles TsSeçenekler.MouseEnter Call lbl4() End Sub Private Sub TsHkk_MouseEnter(sender As System.Object, e As System.EventArgs) Handles TsHkk.MouseEnter Call lbl5() End Sub Private Sub ComboTS_TextChanged(sender As System.Object, e As System.EventArgs) Handles ComboTS.TextChanged pensure = ComboTS.Text.ToString End Sub #End Region #Region " MENÜ İÇİNDEN TIKLAMA OLAYLARI..." Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click Dim frm As New Form frm.Show() End Sub Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Button1.PerformClick() End Sub #End Region Private Sub CevirBtn_Click(sender As System.Object, e As System.EventArgs) Handles CevirBtn.Click If CheckBox1.Checked = False Then CheckBox1.Checked = True Else CheckBox1.Checked = False End Sub Private Sub CheckBox1_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles CheckBox1.CheckedChanged If CheckBox1.Checked = False Then tsUstToolTipBar.Dock = DockStyle.Top CevirBtn.Image = YanIm.Image Me.Width = 470 Me.Height = 526 FlowLayoutPanel1.Top = 38 tsUstToolTipBar.Height = 32 Else CevirBtn.Image = UstimPic.Image FlowLayoutPanel1.Top = 7 FlowLayoutPanel1.BringToFront() tsUstToolTipBar.Dock = DockStyle.Right tsUstToolTipBar.Width = 38 Me.Width = 470 + 42 Me.Height = 522 - 30 FlowLayoutPanel1.Height = Me.Height End If SaveSetting(Application.ProductName, Application.ProductName, "Bar Yönü", CheckBox1.Checked) End Sub End Class
Sonraki Kayıt
Önceki Kayıt
Ana Sayfa