January 2018 : Instructor-led Online Course in ASP.NET Core 2.0. Conducted by Bipin Joshi. Read more...
Registration for January 2018 batch of ASP.NET Core 2.0 instructor-led online course has already started. Conducted by Bipin Joshi. Register today ! Click here for more details.

Using Windows Clipboard Programatically

Introduction

Windows uses clipboard to store data that be transferred from one application to another. Most of the times you use the famous Ctrl+X, Ctrl+C, Ctrl+V keystrokes to cut, copy and paste data. However, sometimes you may want to place some data on the clipboard through code. In such cases you can use Clipboard class to achieve the task. In this code sample you will see how to do just that.

Code Sample

Download the ZIP file and extract it at your end. The file contains a Windows Forms project with one form. The form consists of two textboxes and two buttons. The first textbox and button allows you to enter text and set it to the clipboard. The other textbox and button gets the data from the clipboard and displayes in the second textbox.

Bipin Joshi is a software consultant, an author and a yoga mentor having 22+ years of experience in software development. He also conducts online courses in ASP.NET MVC / Core and Design Patterns. He is a published author and has authored or co-authored books for Apress and Wrox press. Having embraced the Yoga way of life he also teaches Ajapa Yoga to interested individuals. To know more about him click here.

Get connected : Twitter  Facebook  Google+  LinkedIn

Posted On : 11 July 2004


Tags : .NET Framework Windows Forms