private void handlePictureMessage(string message)
 {
     messageSpecs.PictureMessage pictureMessage = new messageSpecs.PictureMessage(message);
     String text = pictureMessage.sender + ":";
     PictureMessageHolder PMH = new PictureMessageHolder(text, pictureMessage.PictureMsg);
     chatMessageArea.RowCount += 1;
     chatMessageArea.Controls.Add(PMH, 0, chatMessageArea.RowCount - 2);
     chatMessageArea.AutoScrollPosition = new Point(0, chatMessageArea.VerticalScroll.Maximum);
 }
        private void button2_Click(object sender, EventArgs e)
        {
            OpenFileDialog of = new OpenFileDialog();
            of.Filter = "Image Files (*.bmp;*.jpg;*.jpeg,*.png)|*.BMP;*.JPG;*.JPEG;*.PNG";
            if (of.ShowDialog() == DialogResult.OK)
            {

                Image loadedImage = Image.FromFile(of.FileName);
                pb.Image = loadedImage;

                messageSpecs.PictureMessage pictureMessage = new messageSpecs.PictureMessage();
                pictureMessage.sender = myUID.ToString();
                pictureMessage.receiver = friendUID.ToString();
                pictureMessage.PictureMsg = pb.Image;
                myClient.Send(pictureMessage.getMessageString());

                PictureMessageHolder PMH = new PictureMessageHolder("You : ", pictureMessage.PictureMsg);
                chatMessageArea.RowCount += 1;
                chatMessageArea.Controls.Add(PMH, 1, chatMessageArea.RowCount - 2);
                chatMessageArea.AutoScrollPosition = new Point(0, chatMessageArea.VerticalScroll.Maximum);
            }
        }