12 Haziran 2013 Çarşamba
Renk Paletli Not defteri Örneği
HAZIR KODLARINI
İNDİR
'AcikHoparlorPicBox.SendToBack() 'arkaya 'KHopalorPicBox.BringToFront() 'Öne Imports System.Text Imports System.IO Imports System.Drawing.Color Public Class Form1 Const i As Integer = &HA1 Const j As Integer = 2 Dim renk As String #Region " BAŞLIKSIZ FORM SADECE KENAR ÇİZGİLERİ VAR" Private mouse_offset As Point 'Başlıksız form-kenarlı Protected Overrides ReadOnly Property CreateParams() As CreateParams 'Başlıksız form-kenarlı Get Const WS_CAPTION As Integer = &HC00000 Dim baseParams As CreateParams = MyBase.CreateParams 'Caption olmasın baseParams.Style = baseParams.Style And Not WS_CAPTION Return baseParams End Get End Property #End Region #Region " Boyutlandırma değişkenleri" Dim GripDrag As Boolean Dim InitialSizeX As Integer Dim InitialSizeY As Integer #End Region #Region " FORM OLAYLARI..." Private Sub Form2_FormClosing(sender As Object, e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing Dim sonuc As DialogResult If MetinDegisti Then sonuc = MessageBox.Show("( " & DsyAdi & " )" & " Dosyası değişti." & vbCrLf & "Saklamak istermisiniz?", _ " Sakla?", MessageBoxButtons.YesNo, _ MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) If sonuc = Windows.Forms.DialogResult.Yes Then DsySaklaMn.PerformClick() MetinDegisti = False e.Cancel = False Else e.Cancel = False End If End If End Sub Private Sub Form2_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load Me.FormBorderStyle = GetSetting(Application.ProductName, Application.ProductName, "Kenar Çizgisi", Me.FormBorderStyle) PanelGizle = True DurumBarPic.Cursor = Cursors.Default SuruklePic.Cursor = Cursors.SizeNWSE SuruklePic.BackColor = Transparent Me.Label1.Text = "İsimsiz" DsyYolu = Label1.Text Call UzantiBicimiNe() ''REM ----------------------------------------------- 'command If Environment.GetCommandLineArgs.Length > 1 Then Dim workPr As Process() = Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName) For Each pro As Process In workPr If Process.GetCurrentProcess().Id <> pro.Id Then pro.Kill() End If Next DsyYolu = Environment.GetCommandLineArgs(1) Me.Label1.Text = System.IO.Path.GetFileName(DsyYolu) Dim uzanti As String uzanti = System.IO.Path.GetExtension(DsyYolu) uzanti = uzanti.ToUpper() Select Case uzanti Case ".RTF" RTBox.LoadFile(DsyYolu, RichTextBoxStreamType.RichText) Case ".TXT", ".HTM" RTBox.Clear() TxtOku = New IO.StreamReader(DsyYolu, System.Text.Encoding.Default) RTBox.Text = TxtOku.ReadToEnd TxtOku.Close() TxtOku = Nothing RTBox.Focus() RTBox.SelectionStart = 0 RTBox.SelectionLength = 0 End Select MetinDegisti = False GeriAlMn.Enabled = False GeriAlMn.Enabled = False End If ''REM ----------------------------------------------- End Sub Private Sub Form2_GotFocus(sender As Object, e As System.EventArgs) Handles Me.GotFocus Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None End Sub Private Sub KapatPic_Click(sender As System.Object, e As System.EventArgs) Handles KapatPic.Click Me.Close() End Sub Private Sub MinimizePic_Click(sender As System.Object, e As System.EventArgs) Handles MinimizePic.Click Me.ShowInTaskbar = True Me.WindowState = FormWindowState.Minimized End Sub #End Region #Region " RİCHTEXTBOX OLAYLARI...." Private Sub RichTextBox1_MouseMove(sender As System.Object, e As System.Windows.Forms.MouseEventArgs) Panel1.SendToBack() Panel1.Visible = False End Sub Private Sub RichTextBox1_MouseLeave(sender As System.Object, e As System.EventArgs) Panel1.SendToBack() Panel1.Visible = False End Sub Private Sub RichTextBox1_TextChanged(sender As System.Object, e As System.EventArgs) PanelGizle = True End Sub #End Region #Region " MENÜ OLAYLARI.." Private Sub FontSecMn_MouseMove(sender As System.Object, e As System.Windows.Forms.MouseEventArgs) Handles FontRengiSecMn.MouseMove If PanelGizle = True Then Exit Sub Button43.Visible = True Panel1.Top = 25 Panel1.Left = 275 Panel1.Visible = True Panel1.BringToFront() Me.OtomatikBtn.Text = "Otomatik" secilenPanel = "FontRengiSec" Call PanelSec() FontRengiSecMn_ButtonClick(sender, e) End Sub Private Sub FontRengiSecMn_ButtonClick(sender As System.Object, e As System.EventArgs) Handles FontRengiSecMn.ButtonClick Select Case secilenPanel Case "FontRengiSec" Me.FontRengiPic.BackColor = Button43.BackColor 'Color.Black Me.RTBox.SelectionColor = FontRengiPic.BackColor Case "FontDolguRengi" Me.RTBox.BackColor = AFRengiPic.BackColor Me.RTBox.SelectionColor = Me.RTBox.ForeColor Me.RTBox.BackColor = White Case "FontSaydamlaştır" 'seçili yer varmı öğren Dim p As Integer = Me.RTBox.SelectionStart Me.RTBox.SelectAll() Me.RTBox.SelectionColor = Me.RTBox.SelectionColor 'Yalnız seçilen renk eski haline gelir Me.RTBox.SelectionBackColor = Me.RTBox.BackColor 'Control.DefaultBackColor 'Arkafonu seçili metni seçilmemiş hale getirir AFRengiPic.BackColor = Me.RTBox.BackColor Me.RTBox.DeselectAll() Me.RTBox.SelectAll() AFonRengiMn_ButtonClick(sender, e) Me.RTBox.DeselectAll() RTBox.SelectionStart = p p = Nothing Case Else secilenPanel = "FontRengiSec" OtomatikBtn.PerformClick() 'FontRengiPic.BackColor = Color.Black 'Me.RTBox.SelectionColor = FontRengiPic.BackColor End Select End Sub Private Sub FontRengiSecMn_DropDownOpening(sender As System.Object, e As System.EventArgs) Handles FontRengiSecMn.DropDownOpening Panel1.Top = 25 Panel1.Left = 275 Button43.Visible = True Me.OtomatikBtn.Text = "Otomatik" PanelGizle = False Panel1.Visible = True Panel1.BringToFront() secilenPanel = "FontRengiSec" Call PanelSec() End Sub Private Sub FontRengiSecMn_Click(sender As System.Object, e As System.EventArgs) Handles FontRengiSecMn.Click secilenPanel = "FontRengiSec" OtomatikBtn.PerformClick() End Sub Private Sub AFonRengiMn_MouseMove(sender As System.Object, e As System.Windows.Forms.MouseEventArgs) Handles AFonRengiMn.MouseMove If PanelGizle = True Then Exit Sub Button43.Visible = False Panel1.Top = 25 Panel1.Left = 310 Panel1.Visible = True Panel1.BringToFront() Me.OtomatikBtn.Text = "Saydam" secilenPanel = "FontDolguRengi" End Sub Private Sub RenkUtusuMn_MouseMove(sender As System.Object, e As System.Windows.Forms.MouseEventArgs) Handles RenkKutusuMn.MouseMove If PanelGizle = True Then Exit Sub Button43.Visible = False Panel1.Top = 25 Panel1.Left = 340 Panel1.Visible = True Panel1.BringToFront() Me.OtomatikBtn.Text = "Saydam" secilenPanel = "FontSaydamlaştır" End Sub Private Sub AFonRengiMn_DropDownOpening(sender As System.Object, e As System.EventArgs) Handles AFonRengiMn.DropDownOpening Panel1.Top = 25 Panel1.Left = 310 PanelGizle = False Panel1.Visible = True Panel1.BringToFront() Button43.Visible = False OtomatikBtn.Text = "Saydam" secilenPanel = "FontDolguRengi" Call FontDolguRengi() End Sub Public Sub FontDolguRengi() Me.RTBox.SelectionBackColor = AFRengiPic.BackColor Call PanelSec() Exit Sub End Sub Private Sub RenkKutusuMn_DropDownOpening(sender As System.Object, e As System.EventArgs) Handles RenkKutusuMn.DropDownOpening Panel1.Top = 25 Panel1.Left = 340 PanelGizle = False Button43.Visible = False Panel1.Visible = True Panel1.BringToFront() OtomatikBtn.Text = "Saydam" secilenPanel = "FontSaydamlaştır" 'Call FontSaydamlaştır() End Sub Public Sub FontSaydamlaştır() 'Stop Dim p As Integer = Me.RTBox.SelectionStart Me.RTBox.SelectAll() Me.RTBox.SelectionColor = Me.RTBox.SelectionColor 'Yalnız seçilen renk eski haline gelir Me.RTBox.SelectionBackColor = Me.RTBox.BackColor 'Control.DefaultBackColor 'Arkafonu seçili metni seçilmemiş hale getirir AFRengiPic.BackColor = Me.RTBox.BackColor 'Button40.BackColor Me.RTBox.DeselectAll() Me.RTBox.SelectAll() 'AFonRengiMn_ButtonClick(sender, e) Me.RTBox.DeselectAll() Me.RTBox.SelectionStart = p p = Nothing End Sub Private Sub KaydırmaÇubuğuEkleToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles KaydırmaÇubuğuEkleToolStripMenuItem.Click If Me.RTBox.ScrollBars = RichTextBoxScrollBars.None Then Me.RTBox.ScrollBars = RichTextBoxScrollBars.ForcedVertical Else Me.RTBox.ScrollBars = RichTextBoxScrollBars.None End If End Sub Private Sub AFonRengiMn_ButtonClick(sender As System.Object, e As System.EventArgs) Handles AFonRengiMn.ButtonClick Button43.Visible = False Me.RTBox.SelectionBackColor = AFRengiPic.BackColor Me.RTBox.ForeColor = System.Drawing.Color.Black 'Button43.BackColor ' Exit Sub 'Dim bDlg As New ColorDialog 'bDlg.AnyColor = True 'bDlg.SolidColorOnly = False 'bDlg.AllowFullOpen = True 'bDlg.FullOpen = True 'If bDlg.ShowDialog() = Windows.Forms.DialogResult.OK Then ' Call TumArkaFonSec() ' RTBox.BackColor = bDlg.Color 'End If End Sub Private Sub AFRengi_Click(sender As System.Object, e As System.EventArgs) Handles AFRengiPic.Click AFonRengiMn_ButtonClick(sender, e) End Sub Private Sub KapatPic_MouseLeave(sender As System.Object, e As System.EventArgs) Handles KapatPic.MouseLeave Dim tooltip As New ToolTip() tooltip.SetToolTip(KapatPic, "Kapat") End Sub Private Sub GeriAlMn_Click(sender As System.Object, e As System.EventArgs) Handles GeriAlMn.Click Me.RTBox.Undo() If Me.RTBox.TextLength <= 0 Then KopyalaMn.Enabled = False DsySaklaMn.Enabled = False FarkliSaklaMn.Enabled = False YeniMn.Enabled = False Else YeniMn.Enabled = True KopyalaMn.Enabled = True DsySaklaMn.Enabled = True FarkliSaklaMn.Enabled = True End If End Sub Private Sub ileriAlMn_Click(sender As System.Object, e As System.EventArgs) Handles ileriAlMn.Click Me.RTBox.Redo() 'If RTBox.TextLength >= 0 Then ' KopyalaMn.Enabled = True 'Else ' KopyalaMn.Enabled = False 'End If End Sub Private Sub RTBox_TextChanged(sender As System.Object, e As System.EventArgs) Handles RTBox.TextChanged DsySaklaMn.Enabled = True FarkliSaklaMn.Enabled = True YeniMn.Enabled = True ileriAlMn.Enabled = Me.RTBox.CanRedo GeriAlMn.Enabled = Me.RTBox.CanUndo If Me.RTBox.TextLength >= 0 Then KopyalaMn.Enabled = True Else KopyalaMn.Enabled = False End If MetinDegisti = True End Sub Private Sub KopyalaMn_Click(sender As System.Object, e As System.EventArgs) Handles KopyalaMn.Click Me.RTBox.Copy() Call UzantiBicimiNe() End Sub Private Sub UzantiBicimiNe() If Me.RTBox.CanPaste(DataFormats.GetFormat(DataFormats.Text)) Then MnYapıstir.Enabled = True YapistirMn.Enabled = True 'panoda kayıt var Else MnYapıstir.Enabled = False End If If Me.RTBox.TextLength = 0 Then KopyalaMn.Enabled = False End Sub Private Sub YapistirMn_Click(sender As System.Object, e As System.EventArgs) Handles YapistirMn.Click Me.RTBox.Paste() End Sub Private Sub RTBox_SelectionChanged(sender As System.Object, e As System.EventArgs) Handles RTBox.SelectionChanged If Me.RTBox.SelectedText = "" Then KopyalaMn.Enabled = False Else KopyalaMn.Enabled = True End If End Sub Private Sub YapistirMn_MouseDown(sender As System.Object, e As System.Windows.Forms.MouseEventArgs) Handles YapistirMn.MouseDown If e.Button = Windows.Forms.MouseButtons.Right Then YapistirMn.Enabled = False Clipboard.Clear() YapistirMn.Enabled = False End If End Sub Private Sub MNKapat_Click(sender As System.Object, e As System.EventArgs) Handles MNKapat.Click Me.Close() End Sub Private Sub RenkKutusuMn_ButtonClick(sender As System.Object, e As System.EventArgs) Handles RenkKutusuMn.ButtonClick 'TAMAM RTBox_SelectionChanged(sender, e) If RKSRengiPic.BackColor <> White Then Call FontSaydamlaştır() : Exit Sub If KopyalaMn.Enabled = False Then Call SaydamYap() Else Call TumArkaFonSec() End If End Sub Public Sub SaydamYap() Dim p As Integer = Me.RTBox.SelectionStart Me.RTBox.SelectAll() 'Me.RTBox.ForeColor = Button43.BackColor 'siyah Me.RTBox.SelectionBackColor = Button35.BackColor Me.RTBox.BackColor = Button35.BackColor 'Me.RTBox.SelectionColor = Button43.BackColor Me.RTBox.DeselectAll() RKSRengiPic.BackColor = White End Sub Public Sub TumArkaFonSec() Dim p As Integer = Me.RTBox.SelectionStart Me.RTBox.SelectAll() Me.RTBox.SelectionBackColor = RKSRengiPic.BackColor RTBox.BackColor = RKSRengiPic.BackColor Me.RTBox.DeselectAll() Me.RTBox.SelectionStart = p p = Nothing End Sub Private Sub FontSecOzel_Click(sender As System.Object, e As System.EventArgs) Handles RenkSecOzel.Click ' FontSecOzel Dim bDlg As New ColorDialog bDlg.AnyColor = True bDlg.SolidColorOnly = False bDlg.AllowFullOpen = True bDlg.FullOpen = True If bDlg.ShowDialog() = Windows.Forms.DialogResult.OK Then Select Case secilenPanel Case "FontRengiSec" FontRengiPic.BackColor = bDlg.Color Button43.BackColor = bDlg.Color RTBox.SelectionColor = Button43.BackColor Case "FontDolguRengi" AFRengiPic.BackColor = bDlg.Color Me.RTBox.SelectionBackColor = AFRengiPic.BackColor Case "FontSaydamlaştır" RKSRengiPic.BackColor = bDlg.Color RTBox.SelectionColor = RKSRengiPic.BackColor End Select End If End Sub Private Sub OtomatikBtn_Click(sender As System.Object, e As System.EventArgs) Handles OtomatikBtn.Click Select Case secilenPanel Case "FontRengiSec" If Not Me.RTBox.SelectionFont Is Nothing Then Dim SimdikiFont As System.Drawing.Font = Me.RTBox.SelectionFont Dim YeniFontStili As System.Drawing.FontStyle Me.RTBox.SelectionColor = Button43.BackColor Me.RTBox.SelectionColor = Me.RTBox.SelectionColor ' DefaultForeColor Me.RTBox.SelectionFont = New Font(SimdikiFont.FontFamily, SimdikiFont.Size, YeniFontStili) End If Case "FontDolguRengi" AFRengiPic.BackColor = DefaultBackColor 'c.BackColor Me.RTBox.BackColor = Button35.BackColor ' AFRengiPic.BackColor Panel1.Hide() Case "FontSaydamlaştır" 'seçili yer varmı öğren Call SaydamYap() RenkKutusuMn_ButtonClick(sender, e) Panel1.Hide() End Select End Sub #End Region #Region " RENK PALETİ OLAYLARI..." Private Sub OzelBtn_Click(sender As System.Object, e As System.EventArgs) Dim bDlg As New ColorDialog bDlg.AnyColor = True bDlg.SolidColorOnly = False bDlg.AllowFullOpen = True bDlg.FullOpen = True If bDlg.ShowDialog() = Windows.Forms.DialogResult.OK Then Me.RTBox.SelectionBackColor = bDlg.Color End If End Sub Private Sub FontSecMn_ButtonClick(sender As System.Object, e As System.EventArgs) Handles FontSecMn.ButtonClick Dim f As New FontDialog f.ShowColor = True f.ShowEffects = True If f.ShowDialog() = Windows.Forms.DialogResult.OK Then Me.RTBox.SelectionFont = f.Font Me.RTBox.SelectionColor = f.Color End If End Sub Private Sub RTBox_MouseMove(sender As System.Object, e As System.Windows.Forms.MouseEventArgs) Handles RTBox.MouseMove PanelGizle = True Panel1.SendToBack() Panel1.Visible = False End Sub #End Region #Region " Formu ikonBarTStrip ve Durum Bardan SÜRÜKLE, FormBoyutlaPic'den BOYUTLANDIR" Private Sub ikonBarTStrip_MouseDown(sender As System.Object, e As System.Windows.Forms.MouseEventArgs) Handles ikonBarTStrip.MouseDown Dim msg As Message = Message.Create(Me.Handle, i, New IntPtr(j), IntPtr.Zero) Me.DefWndProc(msg) End Sub Private Sub SuruklePic_MouseDown(sender As System.Object, e As System.Windows.Forms.MouseEventArgs) Handles SuruklePic.MouseDown If e.Button = Windows.Forms.MouseButtons.Left Then GripDrag = True InitialSizeX = Me.Width InitialSizeY = Me.Height End If End Sub Private Sub SuruklePic_MouseMove(sender As System.Object, e As System.Windows.Forms.MouseEventArgs) Handles SuruklePic.MouseMove If GripDrag = True Then Me.Width = InitialSizeX + (Windows.Forms.Cursor.Position.X - (Me.Width + Me.Location.X)) Me.Height = InitialSizeY + (Windows.Forms.Cursor.Position.Y - (Me.Height + Me.Location.Y)) InitialSizeX = Me.Width InitialSizeY = Me.Height Me.Refresh() End If End Sub Private Sub SuruklePic_MouseUp(sender As System.Object, e As System.Windows.Forms.MouseEventArgs) Handles SuruklePic.MouseUp GripDrag = False End Sub Private Sub DurumBarPic_MouseDown(sender As System.Object, e As System.Windows.Forms.MouseEventArgs) DurumBarPic.Capture = False Dim msg As Message = Message.Create(Me.Handle, i, New IntPtr(j), IntPtr.Zero) Me.DefWndProc(msg) End Sub #End Region #Region " POPUP MENÜ İŞLEMLERİ..." Private Sub ToolStripButton1_Click(sender As System.Object, e As System.EventArgs) Handles ToolStripButton1.Click Dim seçilenRenk As Integer Dim rastgeleSec As New Random() seçilenRenk = rastgeleSec.Next(1, 6) Select Case seçilenRenk Case 1 : Call sarırenk() Case 2 : Call mavirenk() Case 3 : Call pemberenk() Case 4 : Call yeşilrenk() Case 5 : Call Beyazrenk() End Select End Sub Private Sub MNMavi_Click(sender As System.Object, e As System.EventArgs) Handles MNMavi.Click renk = mavi AFRengiPic.BackColor = Color.Lavender 'RTBox.BackColor AFRengi_Click(sender, e) Me.RTBox.BackColor = Color.Lavender End Sub Public Sub mavirenk() Dim f2 As Form1 f2 = New Form1 f2.StartPosition = FormStartPosition.WindowsDefaultLocation f2.RTBox.BackColor = Color.Lavender f2.RTBox.Text = Nothing : MetinDegisti = False f2.Show() f2.Focus() End Sub Private Sub MnSarı_Click(sender As System.Object, e As System.EventArgs) Handles MnSarı.Click renk = sarı Call sarırenk() End Sub Public Sub sarırenk() Dim f2 As Form1 f2 = New Form1 f2.RTBox.BackColor = Color.LemonChiffon f2.StartPosition = FormStartPosition.WindowsDefaultLocation f2.RTBox.Text = Nothing : MetinDegisti = False f2.Show() f2.Focus() End Sub Private Sub MnBeyaz_Click(sender As System.Object, e As System.EventArgs) Handles MnBeyaz.Click renk = beyaz Call Beyazrenk() End Sub Public Sub beyazrenk() Dim f2 As Form1 f2 = New Form1 f2.RTBox.BackColor = Color.White f2.StartPosition = FormStartPosition.WindowsDefaultLocation f2.RTBox.Text = Nothing : MetinDegisti = False f2.Show() f2.Focus() End Sub Private Sub MnPemba_Click(sender As System.Object, e As System.EventArgs) Handles MnPemba.Click renk = pembe Call pemberenk() End Sub Public Sub pemberenk() Dim f2 As Form1 f2 = New Form1 f2.RTBox.BackColor = Color.LavenderBlush f2.StartPosition = FormStartPosition.WindowsDefaultLocation f2.RTBox.Text = Nothing : MetinDegisti = False f2.Show() f2.Focus() End Sub Private Sub MnYeşil_Click(sender As System.Object, e As System.EventArgs) Handles MnYeşil.Click renk = yeşil Call yeşilrenk() End Sub Public Sub yeşilrenk() Dim f2 As Form1 f2 = New Form1 f2.RTBox.BackColor = System.Drawing.Color.MintCream 'Azure 'Color.LightGreen f2.StartPosition = FormStartPosition.WindowsDefaultLocation f2.RTBox.Text = Nothing : MetinDegisti = False f2.Show() f2.Focus() End Sub #End Region #Region " YENİ , DOSYA AÇ - FARKLI, DOSYA SAKLA (Menü ve ToolBardan)" Private Sub YeniMn_Click(sender As System.Object, e As System.EventArgs) Handles YeniMn.Click If MetinDegisti Then Dim Cevap As Integer Cevap = MessageBox.Show("( " & DsyAdi & " )" & " Dosyası Değişti," & vbCrLf & "Saklamak İstiyormusunuz?", "Değişti", MessageBoxButtons.YesNo, MessageBoxIcon.Question) If Cevap = Windows.Forms.DialogResult.Yes Then ' 'cevap Evet ise Sakla Call FarkliSAKLA() End If End If Me.RTBox.Clear() 'cevap hayır ise eski yolu ve texti sil DsyAdi = "İsimsiz" Me.Label1.Text = "İsimsiz" ileriAlMn.Enabled = False GeriAlMn.Enabled = False Me.RTBox.Modified = False KopyalaMn.Enabled = False DsySaklaMn.Enabled = False FarkliSaklaMn.Enabled = False 'YeniMn.Enabled = False MetinDegisti = False End Sub Private Sub DsyAcMn_Click(sender As System.Object, e As System.EventArgs) Handles DsyAcMn.Click Dim openDLG As New OpenFileDialog openDLG.DefaultExt = "rtf" openDLG.Filter = "Özel Dosyalar|*.txt;*.rtf|Text Dosyası|*.txt|RTBox Text Dosyası|*.rtf|Tüm Dosyalar|*.*" 'Uygulamayı kendi dizininde aç openDLG.InitialDirectory = Application.StartupPath MetinDegisti = False If openDLG.ShowDialog = Windows.Forms.DialogResult.OK Then DsyYolu = openDLG.FileName Me.Label1.ForeColor = Red Me.Label1.BackColor = Me.DurumBarPic.BackColor Me.Label1.Text = DsyYolu Dim uzanti As String uzanti = System.IO.Path.GetExtension(DsyYolu) uzanti = uzanti.ToUpper() Select Case uzanti Case ".RTF" Me.RTBox.LoadFile(DsyYolu, RichTextBoxStreamType.RichText) Case ".TXT" Me.RTBox.Clear() TxtOku = New IO.StreamReader(DsyYolu, System.Text.Encoding.Default) Me.RTBox.Text = TxtOku.ReadToEnd TxtOku.Close() TxtOku = Nothing Me.RTBox.Focus() Me.RTBox.SelectionStart = 0 Me.RTBox.SelectionLength = 0 Case Else Try System.Diagnostics.Process.Start(DsyYolu) Catch ex As Exception MessageBox.Show(uzanti & " 'Uzantılı uygulama Bulunamadı.", "RTE - Hata", MessageBoxButtons.OK, MessageBoxIcon.Error) End Try Exit Sub End Select Dim slash As Integer = DsyYolu.LastIndexOf("\") DsyAdi = DsyYolu.Substring(slash + 1) Me.Text = " NotPalet- " & DsyAdi MetinDegisti = False End If End Sub Private Sub DsySaklaMn_Click(sender As System.Object, e As System.EventArgs) Handles DsySaklaMn.Click Call DosyaSAKLA() End Sub Public Sub DosyaSAKLA() On Error GoTo hata If DsyAdi = "isimsiz" Or DsyYolu = "" Then 'isimsiz ise farklısakla' ya yönlendir Call FarkliSAKLA() End If Call DosyaCinsiniBul_KAYDET() Exit Sub hata: Dim uzanti As String DsyYolu = Me.Label1.Text uzanti = System.IO.Path.GetExtension(DsyYolu) uzanti = uzanti.ToUpper() ' Büyük harf yap Resume Next End Sub Public Sub FarkliSAKLA() Dim saveDLG As New SaveFileDialog saveDLG.Title = "RTE - Farklı Sakla" saveDLG.DefaultExt = ".rtf" saveDLG.Filter = "Özel Dosyalar|*.txt;*.rtf;*.htm|Text Dosyası|*.txt|Rich Text Dosyası|*.rtf|HTML Dosyası|*.htm|Tüm Dosyalar|*.*" saveDLG.FilterIndex = 1 saveDLG.InitialDirectory = Application.StartupPath 'uygulamayı kendi dizinine sakla saveDLG.FileName = DsyAdi If saveDLG.ShowDialog() = DialogResult.OK Then Call DosyaCinsiniBul_KAYDET() End If End Sub Public Sub DosyaCinsiniBul_KAYDET() Dim uzanti As String uzanti = System.IO.Path.GetExtension(DsyYolu) uzanti = uzanti.ToUpper() ' Büyük harf yap Me.Label1.Text = System.IO.Path.GetFileName(DsyYolu) Try Select Case uzanti Case ".RTF" Me.RTBox.SaveFile(DsyYolu, RichTextBoxStreamType.RichText) Case Else Dim TextYaz As New StreamWriter(DsyYolu, False, Encoding.Default) TextYaz.Write(Me.RTBox.Text) TextYaz.Close() TextYaz = Nothing Me.RTBox.SelectionStart = 0 Me.RTBox.SelectionLength = 0 End Select DsySaklaMn.Enabled = False FarkliSaklaMn.Enabled = False Me.Label1.Text = System.IO.Path.GetFileName(DsyYolu) Catch ex As Exception Debug.WriteLine(ex.Message) MessageBox.Show(ex.Message) Debug.WriteLine(ex.StackTrace) End Try MetinDegisti = False End Sub #End Region #Region " BASILAN RENK TUŞLARI - SEÇİLEN RENK" Public Sub PanelSec() Dim sb As String = "Button1.BackColor" Select Case secilenPanel Case "FontRengiSec" secilenPanel = "FontRengiSec" 'Me.RTBox.SelectionColor = FontRengiPic.BackColor Case "FontDolguRengi" Me.RTBox.SelectionBackColor = AFRengiPic.BackColor secilenPanel = "FontDolguRengi" Case "FontSaydamlaştır" 'seçili yer varmı öğren secilenPanel = "FontSaydamlaştır" Panel1.Hide() End Select End Sub Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button1.BackColor : Button43.BackColor = Button1.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button1.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button1.BackColor End Select Call PanelSec() End Sub Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles c.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = c.BackColor : Button43.BackColor = c.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = c.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = c.BackColor End Select Call PanelSec() End Sub Private Sub Button5_Click(sender As System.Object, e As System.EventArgs) Handles Button5.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button5.BackColor : Button43.BackColor = Button5.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button5.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button5.BackColor End Select Call PanelSec() End Sub Private Sub Button6_Click(sender As System.Object, e As System.EventArgs) Handles Button6.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button6.BackColor : Button43.BackColor = Button6.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button6.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button6.BackColor End Select Call PanelSec() End Sub Private Sub Button7_Click(sender As System.Object, e As System.EventArgs) Handles Button7.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button7.BackColor : Button43.BackColor = Button7.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button7.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button7.BackColor End Select Call PanelSec() End Sub Private Sub Button8_Click(sender As System.Object, e As System.EventArgs) Handles Button8.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button8.BackColor : Button43.BackColor = Button8.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button8.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button8.BackColor End Select Call PanelSec() End Sub Private Sub Button9_Click(sender As System.Object, e As System.EventArgs) Handles Button9.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button9.BackColor : Button43.BackColor = Button9.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button9.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button9.BackColor End Select Call PanelSec() End Sub Private Sub Button10_Click(sender As System.Object, e As System.EventArgs) Handles Button10.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button10.BackColor : Button43.BackColor = Button10.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button10.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button10.BackColor End Select Call PanelSec() End Sub Private Sub Button11_Click(sender As System.Object, e As System.EventArgs) Handles Button11.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button11.BackColor : Button43.BackColor = Button11.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button11.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button11.BackColor End Select Call PanelSec() End Sub Private Sub Button12_Click(sender As System.Object, e As System.EventArgs) Handles Button12.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button12.BackColor : Button43.BackColor = Button12.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button12.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button12.BackColor End Select Call PanelSec() End Sub Private Sub Button13_Click(sender As System.Object, e As System.EventArgs) Handles Button13.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button13.BackColor : Button43.BackColor = Button13.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button13.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button13.BackColor End Select Call PanelSec() End Sub Private Sub Button14_Click(sender As System.Object, e As System.EventArgs) Handles Button14.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button14.BackColor : Button43.BackColor = Button14.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button14.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button14.BackColor End Select Call PanelSec() End Sub Private Sub Button15_Click(sender As System.Object, e As System.EventArgs) Handles Button15.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button15.BackColor : Button43.BackColor = Button15.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button15.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button15.BackColor End Select Call PanelSec() End Sub Private Sub Button16_Click(sender As System.Object, e As System.EventArgs) Handles Button16.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button16.BackColor : Button43.BackColor = Button16.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button16.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button16.BackColor End Select Call PanelSec() End Sub Private Sub Button17_Click(sender As System.Object, e As System.EventArgs) Handles Button17.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button17.BackColor : Button43.BackColor = Button17.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button17.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button17.BackColor End Select Call PanelSec() End Sub Private Sub Button18_Click(sender As System.Object, e As System.EventArgs) Handles Button18.Click Select Case secilenPanel Case "FontRengiSec" FontRengiPic.BackColor = Button18.BackColor : Button43.BackColor = Button18.BackColor Case "FontDolguRengi" AFRengiPic.BackColor = Button18.BackColor Case "FontSaydamlaştır" RKSRengiPic.BackColor = Button18.BackColor End Select Call PanelSec() End Sub Private Sub Button19_Click(sender As System.Object, e As System.EventArgs) Handles Button19.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button19.BackColor : Button43.BackColor = Button19.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button19.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button19.BackColor End Select Call PanelSec() End Sub Private Sub Button20_Click(sender As System.Object, e As System.EventArgs) Handles Button20.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button20.BackColor : Button43.BackColor = Button20.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button20.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button20.BackColor Call PanelSec() End Select Call PanelSec() End Sub Private Sub Button21_Click(sender As System.Object, e As System.EventArgs) Handles Button21.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button21.BackColor : Button43.BackColor = Button21.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button21.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button21.BackColor End Select Call PanelSec() End Sub Private Sub Button22_Click(sender As System.Object, e As System.EventArgs) Handles Button22.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button22.BackColor : Button43.BackColor = Button22.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button22.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button22.BackColor FontRengiSecMn.PerformClick() End Select Call PanelSec() End Sub Private Sub Button23_Click(sender As System.Object, e As System.EventArgs) Handles Button23.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button23.BackColor : Button43.BackColor = Button23.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button23.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button23.BackColor End Select Call PanelSec() End Sub Private Sub Button24_Click(sender As System.Object, e As System.EventArgs) Handles Button24.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button24.BackColor : Button43.BackColor = Button24.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button24.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button24.BackColor End Select Call PanelSec() End Sub Private Sub Button25_Click(sender As System.Object, e As System.EventArgs) Handles Button25.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button25.BackColor : Button43.BackColor = Button25.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button25.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button25.BackColor End Select Call PanelSec() End Sub Private Sub Button26_Click(sender As System.Object, e As System.EventArgs) Handles Button26.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button26.BackColor : Button43.BackColor = Button26.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button26.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button26.BackColor End Select Call PanelSec() End Sub Private Sub Button27_Click(sender As System.Object, e As System.EventArgs) Handles Button27.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button27.BackColor : Button43.BackColor = Button27.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button27.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button27.BackColor End Select Call PanelSec() End Sub Private Sub Button28_Click(sender As System.Object, e As System.EventArgs) Handles Button28.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button28.BackColor : Button43.BackColor = Button28.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button28.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button28.BackColor End Select Call PanelSec() End Sub Private Sub Button29_Click(sender As System.Object, e As System.EventArgs) Handles Button29.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button29.BackColor : Button43.BackColor = Button29.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button29.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button29.BackColor End Select Call PanelSec() End Sub Private Sub Button30_Click(sender As System.Object, e As System.EventArgs) Handles Button30.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button30.BackColor : Button43.BackColor = Button30.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button30.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button30.BackColor End Select Call PanelSec() End Sub Private Sub Button31_Click(sender As System.Object, e As System.EventArgs) Handles Button31.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button31.BackColor : Button43.BackColor = Button31.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button31.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button31.BackColor End Select Call PanelSec() End Sub Private Sub Button32_Click(sender As System.Object, e As System.EventArgs) Handles Button32.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button32.BackColor ' : Button43.BackColor = Button32.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button32.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button32.BackColor End Select Call PanelSec() End Sub Private Sub Button33_Click(sender As System.Object, e As System.EventArgs) Handles Button33.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button33.BackColor : Button43.BackColor = Button33.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button33.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button33.BackColor End Select Call PanelSec() End Sub Private Sub Button34_Click(sender As System.Object, e As System.EventArgs) Handles Button34.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button34.BackColor : Button43.BackColor = Button34.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button34.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button34.BackColor End Select Call PanelSec() End Sub Private Sub Button35_Click(sender As System.Object, e As System.EventArgs) Handles Button35.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button35.BackColor : Button43.BackColor = Button35.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button35.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button35.BackColor End Select Call PanelSec() End Sub Private Sub Button36_Click(sender As System.Object, e As System.EventArgs) Handles Button36.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button36.BackColor ' : Button43.BackColor = Button36.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button36.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button36.BackColor End Select Call PanelSec() End Sub Private Sub Button37_Click(sender As System.Object, e As System.EventArgs) Handles Button37.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button37.BackColor : Button43.BackColor = Button37.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button37.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button37.BackColor End Select Call PanelSec() 'RenkKutusuMn_ButtonClick(sender, e) 'paneli kapatır ve otomatik uygular Panel1.Hide() End Sub Private Sub Button38_Click(sender As System.Object, e As System.EventArgs) Handles Button38.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button38.BackColor : Button43.BackColor = Button38.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button38.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button38.BackColor End Select Call PanelSec() End Sub Private Sub Button39_Click(sender As System.Object, e As System.EventArgs) Handles Button39.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button39.BackColor : Button43.BackColor = Button39.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button39.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button39.BackColor End Select Call PanelSec() End Sub Private Sub Button40_Click(sender As System.Object, e As System.EventArgs) Handles Button40.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button40.BackColor : Button43.BackColor = Button40.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button40.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button40.BackColor End Select Call PanelSec() End Sub Private Sub Button41_Click(sender As System.Object, e As System.EventArgs) Handles Button41.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button41.BackColor : Button43.BackColor = Button41.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button41.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button41.BackColor End Select Call PanelSec() End Sub Private Sub Button42_Click(sender As System.Object, e As System.EventArgs) Handles Button42.Click Select Case secilenPanel Case "FontRengiSec" : FontRengiPic.BackColor = Button42.BackColor : Button43.BackColor = Button42.BackColor Case "FontDolguRengi" : AFRengiPic.BackColor = Button42.BackColor Case "FontSaydamlaştır" : RKSRengiPic.BackColor = Button42.BackColor End Select Call PanelSec() End Sub #End Region Private Sub ToolStripButton3_Click(sender As System.Object, e As System.EventArgs) Handles FarkliSaklaMn.Click Call FarkliSAKLA() End Sub Private Sub BeyazToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) RKSRengiPic.BackColor = Button35.BackColor Me.RTBox.BackColor = RKSRengiPic.BackColor End Sub Private Sub ZeminPembeMn_Click(sender As System.Object, e As System.EventArgs) Handles ZeminPembeMn.Click Me.RTBox.BackColor = Color.LavenderBlush Me.RTBox.SelectAll() Me.RTBox.SelectionBackColor = Me.RTBox.BackColor Me.RTBox.DeselectAll() End Sub Private Sub ZeminMaviMn_Click(sender As System.Object, e As System.EventArgs) Handles ZeminMaviMn.Click Me.RTBox.BackColor = Color.Lavender Me.RTBox.SelectAll() Me.RTBox.SelectionBackColor = Me.RTBox.BackColor Me.RTBox.DeselectAll() End Sub Private Sub ZeminSariMn_Click(sender As System.Object, e As System.EventArgs) Handles ZeminSariMn.Click Me.RTBox.BackColor = Color.LemonChiffon Me.RTBox.SelectAll() Me.RTBox.BackColor = Color.LemonChiffon Me.RTBox.DeselectAll() End Sub Private Sub ZeminYesilMn_Click(sender As System.Object, e As System.EventArgs) Handles ZeminYesilMn.Click Me.RTBox.BackColor = System.Drawing.Color.MintCream Me.RTBox.SelectAll() RTBox.SelectionBackColor = Me.RTBox.BackColor Me.RTBox.DeselectAll() End Sub Private Sub ZeminBeyazMn_Click(sender As System.Object, e As System.EventArgs) Handles ZeminBeyazMn.Click Me.RTBox.BackColor = Color.White Me.RTBox.SelectAll() Me.RTBox.SelectionBackColor = Me.RTBox.BackColor Me.RTBox.DeselectAll() End Sub Private Sub KenarCizgisiMn_ButtonClick(sender As System.Object, e As System.EventArgs) Handles KenarCizgisiMn.ButtonClick If Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None Then Me.FormBorderStyle = Windows.Forms.FormBorderStyle.Sizable Else Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None End If SaveSetting(Application.ProductName, Application.ProductName, "Kenar Çizgisi", Me.FormBorderStyle) End Sub Private Sub RKSRengiPic_BackColorChanged(sender As System.Object, e As System.EventArgs) Handles RKSRengiPic.BackColorChanged If AFRengiPic.BackColor = White Then Me.RTBox.SelectionBackColor = White 'Arka fonu metni seçiliyi iptal Me.RTBox.ForeColor = DefaultForeColor 'Arka fonu seçili olan Font Rengi Varsayılan Else Me.RTBox.SelectionBackColor = RKSRengiPic.BackColor 'Arka fonu kutuda seçilen Me.RTBox.ForeColor = FontRengiPic.BackColor 'DefaultForeColor End If End Sub Private Sub TsDamlalık_MouseDown(sender As System.Object, e As System.Windows.Forms.MouseEventArgs) Handles TsDamlalık.MouseDown If e.Button = Windows.Forms.MouseButtons.Left Then Button43.BackColor = Me.RTBox.SelectionColor FontRengiPic.BackColor = Button43.BackColor Me.RTBox.SelectionColor = FontRengiPic.BackColor Me.FontRengiSecMn.PerformClick() End If If e.Button = Windows.Forms.MouseButtons.Right Then AFRengiPic.BackColor = Me.RTBox.SelectionColor End If If e.Button = Windows.Forms.MouseButtons.Middle Then FontRengiPic.BackColor = Black Button43.BackColor = Black AFRengiPic.BackColor = White RKSRengiPic.BackColor = White End If End Sub Private Sub Label1_MouseLeave(sender As System.Object, e As System.EventArgs) Handles Label1.MouseLeave Dim tooltip As New ToolTip() tooltip.SetToolTip(Label1, DsyYolu) End Sub Private Sub AFonRengiMn_Click(sender As System.Object, e As System.EventArgs) Handles AFonRengiMn.Click secilenPanel = "FontDolguRengi" End Sub Private Sub RenkKutusuMn_Click(sender As System.Object, e As System.EventArgs) Handles RenkKutusuMn.Click secilenPanel = "FontSaydamlaştır" End Sub End Class
Sonraki Kayıt
Önceki Kayıt
Ana Sayfa