Posts

How to paste image into picturebox from clipboard with VB.Net

Image
How to paste image into picturebox from clipboard with VB.Net If you wish to paste an image into a picturebox from clipboard for your VB.Net project, this is what to do: 1. Add a picturebox to your form. 2. Add a button and copy paste the code below.         Private Sub btnPastePic_Click(sender As Object, e As EventArgs) Handles btnPastePic.Click               'If My.Computer.Clipboard.ContainsImage Then         '    PictureBox1.Image = My.Computer.Clipboard.GetImage         'End If         Dim idata As IDataObject = Clipboard.GetDataObject()         If idata.GetDataPresent("System.Drawing.Bitmap") Then             Dim imgObject As Object = idata.GetData("System.Drawing.Bitmap")             If imgObject IsNot Nothing Then                 Dim img As Image = TryCast(imgObject, Image)                 If img IsNot Nothing Then                     PictureBox1.Image = img                 End If             End If         End If    

How to load MS Word Document files into a Richtextbox.

Image
1. Start by saving the MS Word document as a richtext file. 2. Add the code below to a button.  3. Add a richtextbox to your project. You are good to go.  Private Sub btnBrowseRTF_Click(sender As Object, e As EventArgs) Handles btnBrowseRTF.Click Dim saveDirectory As String = Application.StartupPath & "\ProcessedRTFS" Using openFileDialog1 As OpenFileDialog = New OpenFileDialog()  openFileDialog1.Filter = "Richtext Files (*.rtf ) |*.rtf|All Files(*.*) |*.*"       If openFileDialog1.ShowDialog() = DialogResult.OK Then           If Not Directory.Exists(saveDirectory) Then  Directory.CreateDirectory(saveDirectory) End If  Dim fileName As String = Path.GetFileName(openFileDialog1.FileName)  Dim fileSavePath As String = Path.Combine(saveDirectory, fileName) File.Copy(openFileDialog1.FileName, fileSavePath, True)  'txtImgName.Text = fileName  txtPathRTF.Text = fileSavePath  End If  End Using  RichTextBox1.LoadFile(tx

KUCCPS - DIPLOMA PROGRAMMES 2019/2020

KUCCPS - CRAFTS PROGRAMES 2019/2020

KUCCPS Artisan Courses

BUSINESS STUDIES MARKING SCHEME PP2 2017

Image
565/2 MS BUSINESS STUDIES Paper 2 Nov. 2017 MARKING SCHEME THE KENYA NATIONAL EXAMINATIONS COUNCIL KENYA CERTIFICATE OF SECONDARY EDUCATION BUSINESS STUDIES Paper 2 MARKING SCHEME (CONFIDENTIAL) THIS MARKING SCHEME IS THE PROPERTY OF THE KENYA NATIONAL EXAMINATIONS COUNCIL AND IT MUST BE RETURNED TO THE KENYA NATIONAL EXAMINATIONS COUNCIL AT THE END OF MARKING. This Marking Scheme Consists Of 9 Printed Pages © 2017 The Kenya National Examinations Council 1.        a). Ways in which the internal environment may contribute to the success of a business enterprise include: (Any 5 × 2 = 10 Marks) i.              A functional / proper / good business structure: Formal arrangement of functions / the relationship of people that is directed towards achievement of organizational goals ii.              Employment of qualified / skilled