SlideShare a Scribd company logo
1 of 18
TrackBar provides a slider control. It allows the user to select a value from the
slider by dragging on it.
Important properties
Minimum
Maximum
Value
TickFriquency
TickStyle
Orientation
Example 1: use trackbar to chose a RGB color
private void trackBar2_Scroll(object sender, EventArgs e)
{
panel1.BackColor = Color.FromArgb(trackBar2.Value, trackBar3.Value, trackBar4.Value);
label4.Text = trackBar2.Value.ToString();
}
private void trackBar3_Scroll(object sender, EventArgs e)
{
panel1.BackColor = Color.FromArgb(trackBar2.Value, trackBar3.Value, trackBar4.Value);
label5.Text = trackBar3.Value.ToString();
}
private void trackBar4_Scroll(object sender, EventArgs e)
{
panel1.BackColor = Color.FromArgb(trackBar2.Value, trackBar3.Value, trackBar4.Value);
label6.Text = trackBar4.Value.ToString();
}
Example 2: use trackbar to increase and decrease the font size of textbox
private void trackBar1_Scroll(object sender, EventArgs e)
{
textBox1.Font =new
Font(textBox1.Font.FontFamily,trackBar1.Value);
}
SaveFileDialog allows users to save a file.
Important properties
filename
Default Extension
Filter
private void button1_Click(object sender, EventArgs e)
{
saveFileDialog1.ShowDialog();
File.WriteAllText(saveFileDialog1.FileName, textBox1.Text);
}
private void button2_Click(object sender, EventArgs e)
{
saveFileDialog1.ShowDialog();
richTextBox1.SaveFile(saveFileDialog1.FileName,
RichTextBoxStreamType.RichText);
}
Example 3: use savefiledialog to save text from (textbox and richtextbox) as a file in computer
private void cutToolStripButton_Click(object sender, EventArgs e)
{
richTextBox1.Cut();
}
private void copyToolStripButton_Click(object sender, EventArgs e)
{
richTextBox1.Copy();
}
private void pasteToolStripButton_Click(object sender, EventArgs e)
{
richTextBox1.Paste();
}
Note: add (using System.Speech.Synthesis;) to
the project libraries
private void openToolStripButton_Click(object sender, EventArgs e)
{
openFileDialog1.ShowDialog();
richTextBox1.LoadFile(openFileDialog1.FileName);
}
private void newToolStripButton_Click(object sender, EventArgs e)
{
richTextBox1.Clear();
}
private void saveToolStripButton_Click(object sender, EventArgs e)
{
saveFileDialog1.FileName = "myText";
saveFileDialog1.Filter = "rich text (*.rtf)|*.rtf|Text files
(*.txt)|*.txt|word (*.doc)|*.doc|All files (*.*)|*.*";
saveFileDialog1.DefaultExt = "rtf";
saveFileDialog1.ShowDialog();
richTextBox1.SaveFile(saveFileDialog1.FileName,
RichTextBoxStreamType.RichText);
}
private void toolStripButton2_Click(object sender, EventArgs e)
{
richTextBox1.SelectionAlignment = HorizontalAlignment.Left;
}
private void toolStripButton1_Click(object sender, EventArgs e)
{
richTextBox1.SelectionAlignment= HorizontalAlignment.Center;
}
private void toolStripButton3_Click(object sender, EventArgs e)
{
richTextBox1.SelectionAlignment = HorizontalAlignment.Right;
}
private void newToolStripMenuItem_Click(object sender, EventArgs e)
{
richTextBox1.Clear();
}
private void openToolStripMenuItem_Click(object sender, EventArgs e)
{
openFileDialog1.ShowDialog();
richTextBox1.Text = File.ReadAllText(openFileDialog1.FileName);
}
private void saveToolStripMenuItem_Click(object sender, EventArgs e)
{
saveFileDialog1.ShowDialog();
File.WriteAllText(saveFileDialog1.FileName, richTextBox1.Text);
}
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void copyToolStripMenuItem_Click(object sender, EventArgs e)
{
richTextBox1.Copy();
}
private void cutToolStripMenuItem_Click(object sender, EventArgs e)
{
richTextBox1.Cut();
}
private void pasteToolStripMenuItem_Click(object sender, EventArgs e)
{
richTextBox1.Paste();
}
private void copyToolStripMenuItem1_Click(object sender, EventArgs e)
{
richTextBox1.Copy();
}
private void cutToolStripMenuItem1_Click(object sender, EventArgs
e)
{
richTextBox1.Cut();
}
private void pasteToolStripMenuItem1_Click(object sender,
EventArgs e)
{
richTextBox1.Paste();
}
private void toolStripButton4_Click(object sender, EventArgs e)
{
SpeechSynthesizer sp = new SpeechSynthesizer();
if (comboBox1.Text == "Male")
{
sp.SelectVoiceByHints(VoiceGender.Male);
}
else
{
sp.SelectVoiceByHints(VoiceGender.Female);
}
sp.Volume = trackBar1.Value;
sp.Rate = trackBar2.Value;
sp.Speak(richTextBox1.Text);
}
private void helpToolStripButton_Click(object sender, EventArgs e)
{
MessageBox.Show("NotePad Program By Saman M. Almufti");
}
private void selectAllToolStripMenuItem_Click(object sender, EventArgs e)
{
richTextBox1.SelectAll();
}
private void selectAllToolStripMenuItem_Click_1(object sender, EventArgs e)
{
richTextBox1.SelectAll();
}
private void toolStripButton5_Click(object sender, EventArgs e)
{
colorDialog1.ShowDialog();
richTextBox1.SelectionColor = colorDialog1.Color;
}
private void toolStripButton6_Click(object sender, EventArgs e)
{
colorDialog1.ShowDialog();
richTextBox1.SelectionBackColor = colorDialog1.Color;
}
private void toolStripButton7_Click(object sender, EventArgs e)
{
fontDialog1.ShowDialog();
richTextBox1.SelectionFont = fontDialog1.Font;
}
private void fontToolStripMenuItem_Click(object sender, EventArgs e)
{
fontDialog1.ShowDialog();
richTextBox1.SelectionFont = fontDialog1.Font;
}
Vp lecture 12 ararat

More Related Content

What's hot

Ts archiving
Ts   archivingTs   archiving
Ts archiving
Confiz
 

What's hot (15)

Golang iran - tutorial go programming language - Preliminary
Golang iran - tutorial  go programming language - PreliminaryGolang iran - tutorial  go programming language - Preliminary
Golang iran - tutorial go programming language - Preliminary
 
ITT 2015 - Saul Mora - Object Oriented Function Programming
ITT 2015 - Saul Mora - Object Oriented Function ProgrammingITT 2015 - Saul Mora - Object Oriented Function Programming
ITT 2015 - Saul Mora - Object Oriented Function Programming
 
05. haskell streaming io
05. haskell streaming io05. haskell streaming io
05. haskell streaming io
 
Taming Rich GML with Stetl - FOSS4G 2013 Nottingham
Taming Rich GML with Stetl - FOSS4G 2013 NottinghamTaming Rich GML with Stetl - FOSS4G 2013 Nottingham
Taming Rich GML with Stetl - FOSS4G 2013 Nottingham
 
Python Memory Management 101(Europython)
Python Memory Management 101(Europython)Python Memory Management 101(Europython)
Python Memory Management 101(Europython)
 
Ts archiving
Ts   archivingTs   archiving
Ts archiving
 
Swift Sequences & Collections
Swift Sequences & CollectionsSwift Sequences & Collections
Swift Sequences & Collections
 
Memory management
Memory managementMemory management
Memory management
 
Hw09 Hadoop + Clojure
Hw09   Hadoop + ClojureHw09   Hadoop + Clojure
Hw09 Hadoop + Clojure
 
Onyx
OnyxOnyx
Onyx
 
Hadoop + Clojure
Hadoop + ClojureHadoop + Clojure
Hadoop + Clojure
 
Stress test data pipeline
Stress test data pipelineStress test data pipeline
Stress test data pipeline
 
Jaffle: managing processes and log messages of multiple applications in devel...
Jaffle: managing processes and log messages of multiple applicationsin devel...Jaffle: managing processes and log messages of multiple applicationsin devel...
Jaffle: managing processes and log messages of multiple applications in devel...
 
{"JSON, Swift and Type Safety" : "It's a wrap"}
{"JSON, Swift and Type Safety" : "It's a wrap"}{"JSON, Swift and Type Safety" : "It's a wrap"}
{"JSON, Swift and Type Safety" : "It's a wrap"}
 
Meetup slides
Meetup slidesMeetup slides
Meetup slides
 

Similar to Vp lecture 12 ararat

Working With JQuery Part1
Working With JQuery Part1Working With JQuery Part1
Working With JQuery Part1
saydin_soft
 
This is a java lab assignment. I have added the first part java re.pdf
This is a java lab assignment. I have added the first part java re.pdfThis is a java lab assignment. I have added the first part java re.pdf
This is a java lab assignment. I have added the first part java re.pdf
feetshoemart
 
C# Application program UNIT III
C# Application program UNIT IIIC# Application program UNIT III
C# Application program UNIT III
Minu Rajasekaran
 
JAVAAdd to the code at the bottom to do the following two things.pdf
JAVAAdd to the code at the bottom to do the following two things.pdfJAVAAdd to the code at the bottom to do the following two things.pdf
JAVAAdd to the code at the bottom to do the following two things.pdf
fasttracksunglass
 
c++Write a program to test the selection sort algorithm for array-.pdf
c++Write a program to test the selection sort algorithm for array-.pdfc++Write a program to test the selection sort algorithm for array-.pdf
c++Write a program to test the selection sort algorithm for array-.pdf
akpatra2000
 

Similar to Vp lecture 12 ararat (20)

Kotlin delegates in practice - Kotlin Everywhere Stockholm
Kotlin delegates in practice - Kotlin Everywhere StockholmKotlin delegates in practice - Kotlin Everywhere Stockholm
Kotlin delegates in practice - Kotlin Everywhere Stockholm
 
Working With JQuery Part1
Working With JQuery Part1Working With JQuery Part1
Working With JQuery Part1
 
Becoming an Advanced Groovy Developer
Becoming an Advanced Groovy DeveloperBecoming an Advanced Groovy Developer
Becoming an Advanced Groovy Developer
 
This is a java lab assignment. I have added the first part java re.pdf
This is a java lab assignment. I have added the first part java re.pdfThis is a java lab assignment. I have added the first part java re.pdf
This is a java lab assignment. I have added the first part java re.pdf
 
#살아있다 #자프링외길12년차 #코프링2개월생존기
#살아있다 #자프링외길12년차 #코프링2개월생존기#살아있다 #자프링외길12년차 #코프링2개월생존기
#살아있다 #자프링외길12년차 #코프링2개월생존기
 
C# Application program UNIT III
C# Application program UNIT IIIC# Application program UNIT III
C# Application program UNIT III
 
Using Array Approach, Linked List approach, and Delete Byte Approach.pdf
Using Array Approach, Linked List approach, and Delete Byte Approach.pdfUsing Array Approach, Linked List approach, and Delete Byte Approach.pdf
Using Array Approach, Linked List approach, and Delete Byte Approach.pdf
 
Realm to Json & Royal
Realm to Json & RoyalRealm to Json & Royal
Realm to Json & Royal
 
Game unleashedjavascript
Game unleashedjavascriptGame unleashedjavascript
Game unleashedjavascript
 
lists8.pptx of chapter 12 IP Basic Python
lists8.pptx of chapter 12 IP Basic Pythonlists8.pptx of chapter 12 IP Basic Python
lists8.pptx of chapter 12 IP Basic Python
 
VB 6
VB 6VB 6
VB 6
 
JAVAAdd to the code at the bottom to do the following two things.pdf
JAVAAdd to the code at the bottom to do the following two things.pdfJAVAAdd to the code at the bottom to do the following two things.pdf
JAVAAdd to the code at the bottom to do the following two things.pdf
 
6. Generics. Collections. Streams
6. Generics. Collections. Streams6. Generics. Collections. Streams
6. Generics. Collections. Streams
 
c++Write a program to test the selection sort algorithm for array-.pdf
c++Write a program to test the selection sort algorithm for array-.pdfc++Write a program to test the selection sort algorithm for array-.pdf
c++Write a program to test the selection sort algorithm for array-.pdf
 
justbasics.pdf
justbasics.pdfjustbasics.pdf
justbasics.pdf
 
The Ring programming language version 1.7 book - Part 83 of 196
The Ring programming language version 1.7 book - Part 83 of 196The Ring programming language version 1.7 book - Part 83 of 196
The Ring programming language version 1.7 book - Part 83 of 196
 
Kotlin Delegates in practice - Kotlin community conf
Kotlin Delegates in practice - Kotlin community confKotlin Delegates in practice - Kotlin community conf
Kotlin Delegates in practice - Kotlin community conf
 
yazılı
yazılıyazılı
yazılı
 
The Ring programming language version 1.6 book - Part 84 of 189
The Ring programming language version 1.6 book - Part 84 of 189The Ring programming language version 1.6 book - Part 84 of 189
The Ring programming language version 1.6 book - Part 84 of 189
 
The Ring programming language version 1.4.1 book - Part 22 of 31
The Ring programming language version 1.4.1 book - Part 22 of 31The Ring programming language version 1.4.1 book - Part 22 of 31
The Ring programming language version 1.4.1 book - Part 22 of 31
 

More from Saman M. Almufti

More from Saman M. Almufti (20)

Lecture 7- domain name
Lecture  7- domain nameLecture  7- domain name
Lecture 7- domain name
 
Vp lecture 11 ararat
Vp lecture 11 araratVp lecture 11 ararat
Vp lecture 11 ararat
 
Vp lecture 10 ararat
Vp lecture 10 araratVp lecture 10 ararat
Vp lecture 10 ararat
 
Vp lecture 9 ararat
Vp lecture 9 araratVp lecture 9 ararat
Vp lecture 9 ararat
 
Lecture 6- http
Lecture  6- httpLecture  6- http
Lecture 6- http
 
Lecture 5- url-dns
Lecture  5- url-dnsLecture  5- url-dns
Lecture 5- url-dns
 
Vp lecture 7 ararat
Vp lecture 7 araratVp lecture 7 ararat
Vp lecture 7 ararat
 
Lecture 4- ip
Lecture  4- ipLecture  4- ip
Lecture 4- ip
 
Vp lecture 6 ararat
Vp lecture 6 araratVp lecture 6 ararat
Vp lecture 6 ararat
 
Vp lecture 5 ararat
Vp lecture 5 araratVp lecture 5 ararat
Vp lecture 5 ararat
 
Lecture 3- tcp-ip
Lecture  3- tcp-ipLecture  3- tcp-ip
Lecture 3- tcp-ip
 
Vp lecture 4 ararat
Vp lecture 4 araratVp lecture 4 ararat
Vp lecture 4 ararat
 
Vp lecture 3 ararat
Vp lecture 3 araratVp lecture 3 ararat
Vp lecture 3 ararat
 
Lecture 2- terminology
Lecture  2- terminologyLecture  2- terminology
Lecture 2- terminology
 
Vp lecture 2 ararat
Vp lecture 2 araratVp lecture 2 ararat
Vp lecture 2 ararat
 
Vp lecture1 ararat
Vp lecture1 araratVp lecture1 ararat
Vp lecture1 ararat
 
Lecture 1- introduction
Lecture  1- introductionLecture  1- introduction
Lecture 1- introduction
 
Vs c# lecture12
Vs c# lecture12Vs c# lecture12
Vs c# lecture12
 
Vs c# lecture11
Vs c# lecture11Vs c# lecture11
Vs c# lecture11
 
Vs c# lecture10
Vs c# lecture10Vs c# lecture10
Vs c# lecture10
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Vp lecture 12 ararat

  • 1.
  • 2.
  • 3. TrackBar provides a slider control. It allows the user to select a value from the slider by dragging on it. Important properties Minimum Maximum Value TickFriquency TickStyle Orientation
  • 4. Example 1: use trackbar to chose a RGB color private void trackBar2_Scroll(object sender, EventArgs e) { panel1.BackColor = Color.FromArgb(trackBar2.Value, trackBar3.Value, trackBar4.Value); label4.Text = trackBar2.Value.ToString(); } private void trackBar3_Scroll(object sender, EventArgs e) { panel1.BackColor = Color.FromArgb(trackBar2.Value, trackBar3.Value, trackBar4.Value); label5.Text = trackBar3.Value.ToString(); } private void trackBar4_Scroll(object sender, EventArgs e) { panel1.BackColor = Color.FromArgb(trackBar2.Value, trackBar3.Value, trackBar4.Value); label6.Text = trackBar4.Value.ToString(); }
  • 5. Example 2: use trackbar to increase and decrease the font size of textbox private void trackBar1_Scroll(object sender, EventArgs e) { textBox1.Font =new Font(textBox1.Font.FontFamily,trackBar1.Value); }
  • 6. SaveFileDialog allows users to save a file. Important properties filename Default Extension Filter
  • 7. private void button1_Click(object sender, EventArgs e) { saveFileDialog1.ShowDialog(); File.WriteAllText(saveFileDialog1.FileName, textBox1.Text); } private void button2_Click(object sender, EventArgs e) { saveFileDialog1.ShowDialog(); richTextBox1.SaveFile(saveFileDialog1.FileName, RichTextBoxStreamType.RichText); } Example 3: use savefiledialog to save text from (textbox and richtextbox) as a file in computer
  • 8.
  • 9. private void cutToolStripButton_Click(object sender, EventArgs e) { richTextBox1.Cut(); } private void copyToolStripButton_Click(object sender, EventArgs e) { richTextBox1.Copy(); } private void pasteToolStripButton_Click(object sender, EventArgs e) { richTextBox1.Paste(); } Note: add (using System.Speech.Synthesis;) to the project libraries
  • 10. private void openToolStripButton_Click(object sender, EventArgs e) { openFileDialog1.ShowDialog(); richTextBox1.LoadFile(openFileDialog1.FileName); } private void newToolStripButton_Click(object sender, EventArgs e) { richTextBox1.Clear(); } private void saveToolStripButton_Click(object sender, EventArgs e) { saveFileDialog1.FileName = "myText"; saveFileDialog1.Filter = "rich text (*.rtf)|*.rtf|Text files (*.txt)|*.txt|word (*.doc)|*.doc|All files (*.*)|*.*"; saveFileDialog1.DefaultExt = "rtf"; saveFileDialog1.ShowDialog(); richTextBox1.SaveFile(saveFileDialog1.FileName, RichTextBoxStreamType.RichText); }
  • 11. private void toolStripButton2_Click(object sender, EventArgs e) { richTextBox1.SelectionAlignment = HorizontalAlignment.Left; } private void toolStripButton1_Click(object sender, EventArgs e) { richTextBox1.SelectionAlignment= HorizontalAlignment.Center; } private void toolStripButton3_Click(object sender, EventArgs e) { richTextBox1.SelectionAlignment = HorizontalAlignment.Right; } private void newToolStripMenuItem_Click(object sender, EventArgs e) { richTextBox1.Clear(); }
  • 12. private void openToolStripMenuItem_Click(object sender, EventArgs e) { openFileDialog1.ShowDialog(); richTextBox1.Text = File.ReadAllText(openFileDialog1.FileName); } private void saveToolStripMenuItem_Click(object sender, EventArgs e) { saveFileDialog1.ShowDialog(); File.WriteAllText(saveFileDialog1.FileName, richTextBox1.Text); } private void exitToolStripMenuItem_Click(object sender, EventArgs e) { Application.Exit(); }
  • 13. private void copyToolStripMenuItem_Click(object sender, EventArgs e) { richTextBox1.Copy(); } private void cutToolStripMenuItem_Click(object sender, EventArgs e) { richTextBox1.Cut(); } private void pasteToolStripMenuItem_Click(object sender, EventArgs e) { richTextBox1.Paste(); } private void copyToolStripMenuItem1_Click(object sender, EventArgs e) { richTextBox1.Copy(); }
  • 14. private void cutToolStripMenuItem1_Click(object sender, EventArgs e) { richTextBox1.Cut(); } private void pasteToolStripMenuItem1_Click(object sender, EventArgs e) { richTextBox1.Paste(); }
  • 15. private void toolStripButton4_Click(object sender, EventArgs e) { SpeechSynthesizer sp = new SpeechSynthesizer(); if (comboBox1.Text == "Male") { sp.SelectVoiceByHints(VoiceGender.Male); } else { sp.SelectVoiceByHints(VoiceGender.Female); } sp.Volume = trackBar1.Value; sp.Rate = trackBar2.Value; sp.Speak(richTextBox1.Text); }
  • 16. private void helpToolStripButton_Click(object sender, EventArgs e) { MessageBox.Show("NotePad Program By Saman M. Almufti"); } private void selectAllToolStripMenuItem_Click(object sender, EventArgs e) { richTextBox1.SelectAll(); } private void selectAllToolStripMenuItem_Click_1(object sender, EventArgs e) { richTextBox1.SelectAll(); }
  • 17. private void toolStripButton5_Click(object sender, EventArgs e) { colorDialog1.ShowDialog(); richTextBox1.SelectionColor = colorDialog1.Color; } private void toolStripButton6_Click(object sender, EventArgs e) { colorDialog1.ShowDialog(); richTextBox1.SelectionBackColor = colorDialog1.Color; } private void toolStripButton7_Click(object sender, EventArgs e) { fontDialog1.ShowDialog(); richTextBox1.SelectionFont = fontDialog1.Font; } private void fontToolStripMenuItem_Click(object sender, EventArgs e) { fontDialog1.ShowDialog(); richTextBox1.SelectionFont = fontDialog1.Font; }