SlideShare a Scribd company logo
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

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
go-lang
 
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
Istanbul Tech Talks
 
05. haskell streaming io
05. haskell streaming io05. haskell streaming io
05. haskell streaming io
Sebastian Rettig
 
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
Just van den Broecke
 
Python Memory Management 101(Europython)
Python Memory Management 101(Europython)Python Memory Management 101(Europython)
Python Memory Management 101(Europython)
Jose Manuel Ortega Candel
 
Ts archiving
Ts   archivingTs   archiving
Ts archiving
Confiz
 
Swift Sequences & Collections
Swift Sequences & CollectionsSwift Sequences & Collections
Swift Sequences & Collections
CocoaHeads France
 
Memory management
Memory managementMemory management
Memory management
Kuban Dzhakipov
 
Hw09 Hadoop + Clojure
Hw09   Hadoop + ClojureHw09   Hadoop + Clojure
Hw09 Hadoop + Clojure
Cloudera, Inc.
 
Onyx
OnyxOnyx
Hadoop + Clojure
Hadoop + ClojureHadoop + Clojure
Hadoop + Clojure
elliando dias
 
Stress test data pipeline
Stress test data pipelineStress test data pipeline
Stress test data pipeline
Marina Grechuhin
 
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...
Masaki Yatsu
 
{"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"}
Anthony Levings
 
Meetup slides
Meetup slidesMeetup slides
Meetup slides
suraj_atreya
 

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

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
Fabio Collini
 
Working With JQuery Part1
Working With JQuery Part1Working With JQuery Part1
Working With JQuery Part1
saydin_soft
 
Becoming an Advanced Groovy Developer
Becoming an Advanced Groovy DeveloperBecoming an Advanced Groovy Developer
Becoming an Advanced Groovy Developer
Tom Henricksen
 
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
 
#살아있다 #자프링외길12년차 #코프링2개월생존기
#살아있다 #자프링외길12년차 #코프링2개월생존기#살아있다 #자프링외길12년차 #코프링2개월생존기
#살아있다 #자프링외길12년차 #코프링2개월생존기
Arawn Park
 
Object Oriented Programming Using C++: C++ STL Programming.pptx
Object Oriented Programming Using C++: C++ STL Programming.pptxObject Oriented Programming Using C++: C++ STL Programming.pptx
Object Oriented Programming Using C++: C++ STL Programming.pptx
RashidFaridChishti
 
C# Application program UNIT III
C# Application program UNIT IIIC# Application program UNIT III
C# Application program UNIT III
Minu Rajasekaran
 
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
fms12345
 
Realm to Json & Royal
Realm to Json & RoyalRealm to Json & Royal
Realm to Json & Royal
Leonardo Taehwan Kim
 
Game unleashedjavascript
Game unleashedjavascriptGame unleashedjavascript
Game unleashedjavascript
Reece Carlson
 
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
kvpv2023
 
VB 6
VB 6VB 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
fasttracksunglass
 
6. Generics. Collections. Streams
6. Generics. Collections. Streams6. Generics. Collections. Streams
6. Generics. Collections. Streams
DEVTYPE
 
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
 
justbasics.pdf
justbasics.pdfjustbasics.pdf
justbasics.pdf
DrRajkumarKhatri
 
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
Mahmoud Samir Fayed
 
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
Fabio Collini
 
yazılı
yazılıyazılı
yazılı
guest1a815d9
 
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
Mahmoud Samir Fayed
 

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개월생존기
 
Object Oriented Programming Using C++: C++ STL Programming.pptx
Object Oriented Programming Using C++: C++ STL Programming.pptxObject Oriented Programming Using C++: C++ STL Programming.pptx
Object Oriented Programming Using C++: C++ STL Programming.pptx
 
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
 

More from Saman M. Almufti

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

WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
Intelisync
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Precisely
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
Hiike
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
Shinana2
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Tatiana Kojar
 

Recently uploaded (20)

WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
 

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; }