SlideShare a Scribd company logo
1 of 14
Select the “ContextMenuStrip” control and start adding the name of menus, for example I added menus like Background,
foreground and then add form, button submenu to Background menu .
After adding the name of the menu on you application, right-click on the Windows Forms application and go to the
properties.
Select "ContextMenuStrip" and change it to ContextMenuStrip1 from (none).
To add code to menus double click in the menu and add the code
run the project and right-click on the form, the Context Menu will appear on the form as shown in the
following image.
Inserting items (tools) to the tools strips
• Inserting (button, label, dropdownbutton……)
• Inserting slandered items (new, open, save …….)
Insert tool strip then click the arrow above the strip and embed it to toolstripcontainer
After embedding tool strip to toolstripcontainer we will have arrows in the four borders of the container
And we will have the abilities to add more than one toolstrips to the projects
In this project
• Drag down a textbox and make it multi
line
• Drag down a menu strips
• Drag down two tool strips
• Slandered items
• 4 buttons
• Drag down (savefiledialog, openfiledialog)
private void copyToolStripButton_Click(object sender, EventArgs e)
{
textBox1.Copy();
}
private void pasteToolStripButton_Click(object sender, EventArgs e)
{
textBox1.Paste();
}
private void cutToolStripButton_Click(object sender, EventArgs e)
{
textBox1.Cut();
}
private void undoToolStripMenuItem_Click(object sender, EventArgs e)
{
textBox1.Undo();
}
private void newToolStripButton_Click(object sender, EventArgs e)
{
textBox1.Clear();
}
private void saveToolStripButton_Click(object sender, EventArgs e)
{
saveFileDialog1.ShowDialog();
string name = saveFileDialog1.FileName;
File.WriteAllText(name, textBox1.Text);
}
private void openToolStripButton_Click(object sender, EventArgs e)
{
openFileDialog1.ShowDialog();
textBox1.Text= File.ReadAllText(openFileDialog1.FileName);
}
private void selectAllToolStripMenuItem_Click(object sender, EventArgs e)
{
textBox1.SelectAll();
}
private void toolStripButton1_Click(object sender, EventArgs e)
{
fontDialog1.ShowDialog();
textBox1.Font = fontDialog1.Font;
}
private void toolStripButton1_Click_1(object sender, EventArgs e)
{
textBox1.TextAlign = HorizontalAlignment.Right;
}
private void toolStripButton2_Click(object sender, EventArgs e)
{
textBox1.TextAlign = HorizontalAlignment.Center;
}
private void toolStripButton3_Click(object sender, EventArgs e)
{
textBox1.TextAlign = HorizontalAlignment.Left;
}
Adding ContextMenus, ToolStrips and Code to Text Editor

More Related Content

What's hot (19)

Windows Forms For Beginners Part - 3
Windows Forms For Beginners Part - 3Windows Forms For Beginners Part - 3
Windows Forms For Beginners Part - 3
 
Vs c# lecture4
Vs c# lecture4Vs c# lecture4
Vs c# lecture4
 
Spf chapter 03 WinForm
Spf chapter 03 WinFormSpf chapter 03 WinForm
Spf chapter 03 WinForm
 
Spf chapter10 events
Spf chapter10 eventsSpf chapter10 events
Spf chapter10 events
 
100 keyboard shortcuts for windows 8
100 keyboard shortcuts for windows 8100 keyboard shortcuts for windows 8
100 keyboard shortcuts for windows 8
 
Vs c# lecture8
Vs c# lecture8Vs c# lecture8
Vs c# lecture8
 
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAMPROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
 
Image contro, and format functions in vb
Image contro, and format functions in vbImage contro, and format functions in vb
Image contro, and format functions in vb
 
4.7.14&17.7.14&23.6.15&10.9.15
4.7.14&17.7.14&23.6.15&10.9.154.7.14&17.7.14&23.6.15&10.9.15
4.7.14&17.7.14&23.6.15&10.9.15
 
Module iii part i
Module iii part iModule iii part i
Module iii part i
 
Intake 38 8
Intake 38 8Intake 38 8
Intake 38 8
 
5 tips to improve ebs navigation
5 tips to improve ebs navigation5 tips to improve ebs navigation
5 tips to improve ebs navigation
 
Java awt
Java awtJava awt
Java awt
 
Keyboard shortcuts for Windows
Keyboard shortcuts for WindowsKeyboard shortcuts for Windows
Keyboard shortcuts for Windows
 
Ma3696 Lecture 2
Ma3696 Lecture 2Ma3696 Lecture 2
Ma3696 Lecture 2
 
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
 
Introduction to Visual Basic
Introduction to Visual Basic Introduction to Visual Basic
Introduction to Visual Basic
 
25 awt
25 awt25 awt
25 awt
 
Mat. pemvis pertemuan iv
Mat. pemvis pertemuan ivMat. pemvis pertemuan iv
Mat. pemvis pertemuan iv
 

Similar to Adding ContextMenus, ToolStrips and Code to Text Editor

Similar to Adding ContextMenus, ToolStrips and Code to Text Editor (20)

Vp lecture 11 ararat
Vp lecture 11 araratVp lecture 11 ararat
Vp lecture 11 ararat
 
Power Point Project 5
Power Point Project 5Power Point Project 5
Power Point Project 5
 
How to present ppt presentation
How to present ppt presentationHow to present ppt presentation
How to present ppt presentation
 
Intake 37 8
Intake 37 8Intake 37 8
Intake 37 8
 
Guide to Fix Dropdown Button Not Switching Selected Item | Flutter
Guide to Fix Dropdown Button Not Switching Selected Item | FlutterGuide to Fix Dropdown Button Not Switching Selected Item | Flutter
Guide to Fix Dropdown Button Not Switching Selected Item | Flutter
 
Microsoft Word Basics - part 1
Microsoft Word Basics - part 1Microsoft Word Basics - part 1
Microsoft Word Basics - part 1
 
VB PPT by ADI PART4.pdf
VB PPT by ADI PART4.pdfVB PPT by ADI PART4.pdf
VB PPT by ADI PART4.pdf
 
VB PPT by ADI PART4.pdf
VB PPT by ADI PART4.pdfVB PPT by ADI PART4.pdf
VB PPT by ADI PART4.pdf
 
Introduction to MS WORD
Introduction to MS WORDIntroduction to MS WORD
Introduction to MS WORD
 
Point&Click
Point&ClickPoint&Click
Point&Click
 
Windows xp unit a
Windows xp unit aWindows xp unit a
Windows xp unit a
 
Scientific Poster Making Using Adobe Illustrator -hmftj
Scientific Poster Making Using Adobe Illustrator -hmftjScientific Poster Making Using Adobe Illustrator -hmftj
Scientific Poster Making Using Adobe Illustrator -hmftj
 
Power Point Lesson 08 P2
Power Point Lesson 08 P2Power Point Lesson 08 P2
Power Point Lesson 08 P2
 
Ms word
Ms wordMs word
Ms word
 
Ms word
Ms wordMs word
Ms word
 
Ms word
Ms wordMs word
Ms word
 
Office 2007 introduction
Office 2007 introductionOffice 2007 introduction
Office 2007 introduction
 
Microsoft office powerpoint
Microsoft office powerpointMicrosoft office powerpoint
Microsoft office powerpoint
 
Toolbar, statusbar, coolbar in vb
Toolbar, statusbar, coolbar in vbToolbar, statusbar, coolbar in vb
Toolbar, statusbar, coolbar in vb
 
Ms access
Ms accessMs access
Ms access
 

More from Saman M. Almufti (20)

Lecture 7- domain name
Lecture  7- domain nameLecture  7- domain name
Lecture 7- domain name
 
Vp lecture 10 ararat
Vp lecture 10 araratVp lecture 10 ararat
Vp lecture 10 ararat
 
Vp lecture 12 ararat
Vp lecture 12 araratVp lecture 12 ararat
Vp lecture 12 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 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
 
Vs c# lecture9
Vs c# lecture9Vs c# lecture9
Vs c# lecture9
 

Recently uploaded

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 

Recently uploaded (20)

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

Adding ContextMenus, ToolStrips and Code to Text Editor

  • 1.
  • 2.
  • 3. Select the “ContextMenuStrip” control and start adding the name of menus, for example I added menus like Background, foreground and then add form, button submenu to Background menu .
  • 4. After adding the name of the menu on you application, right-click on the Windows Forms application and go to the properties. Select "ContextMenuStrip" and change it to ContextMenuStrip1 from (none). To add code to menus double click in the menu and add the code
  • 5. run the project and right-click on the form, the Context Menu will appear on the form as shown in the following image.
  • 6.
  • 7. Inserting items (tools) to the tools strips • Inserting (button, label, dropdownbutton……) • Inserting slandered items (new, open, save …….)
  • 8. Insert tool strip then click the arrow above the strip and embed it to toolstripcontainer After embedding tool strip to toolstripcontainer we will have arrows in the four borders of the container And we will have the abilities to add more than one toolstrips to the projects
  • 9. In this project • Drag down a textbox and make it multi line • Drag down a menu strips • Drag down two tool strips • Slandered items • 4 buttons • Drag down (savefiledialog, openfiledialog)
  • 10. private void copyToolStripButton_Click(object sender, EventArgs e) { textBox1.Copy(); } private void pasteToolStripButton_Click(object sender, EventArgs e) { textBox1.Paste(); } private void cutToolStripButton_Click(object sender, EventArgs e) { textBox1.Cut(); }
  • 11. private void undoToolStripMenuItem_Click(object sender, EventArgs e) { textBox1.Undo(); } private void newToolStripButton_Click(object sender, EventArgs e) { textBox1.Clear(); } private void saveToolStripButton_Click(object sender, EventArgs e) { saveFileDialog1.ShowDialog(); string name = saveFileDialog1.FileName; File.WriteAllText(name, textBox1.Text); }
  • 12. private void openToolStripButton_Click(object sender, EventArgs e) { openFileDialog1.ShowDialog(); textBox1.Text= File.ReadAllText(openFileDialog1.FileName); } private void selectAllToolStripMenuItem_Click(object sender, EventArgs e) { textBox1.SelectAll(); } private void toolStripButton1_Click(object sender, EventArgs e) { fontDialog1.ShowDialog(); textBox1.Font = fontDialog1.Font; }
  • 13. private void toolStripButton1_Click_1(object sender, EventArgs e) { textBox1.TextAlign = HorizontalAlignment.Right; } private void toolStripButton2_Click(object sender, EventArgs e) { textBox1.TextAlign = HorizontalAlignment.Center; } private void toolStripButton3_Click(object sender, EventArgs e) { textBox1.TextAlign = HorizontalAlignment.Left; }