---
title: "picture box with 3 partitions and partitions should be controlled with numeric updown"  
description: "picture box with 3 partitions and partitions should be controlled with numeric updown"  
author: "Madhu Mitha"  
published: 2015-03-19  
updated: 2015-03-20  
canonical: https://www.mindstick.com/forum/23034/picture-box-with-3-partitions-and-partitions-should-be-controlled-with-numeric-updown  
category: ".net"  
tags: ["vb.net"]  
reading_time: 3 minutes  

---

# picture box with 3 partitions and partitions should be controlled with numeric updown

hi,\
i want to make a single [picture](https://answers.mindstick.com/qa/38554/name-the-oscar-winning-sound-designer-who-became-the-first-asian-to-win-the-award-for-best-sound-for-documentary-india-s-daughter-at-the-coveted-motion-picture-sound-editors-63rd-annual-golden-reel-awards) box with three [partitions](https://answers.mindstick.com/qa/96923/what-are-hard-disk-partitions) where in [left](https://www.mindstick.com/articles/12768/don-t-be-left-behind-with-the-new-it-revolution) corner number should be displayed at top plain [text](https://www.mindstick.com/blog/301635/did-people-reinvent-texting-to-express-the-full-range-of-emotions) and at bottom an scrolling text should be moving.\
How to write [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii) for it..\
thanks,[sample](https://www.mindstick.com/news/2174/mars-mission-by-nasa-prepares-for-tests) [output](https://www.mindstick.com/interview/34427/explain-the-output-in-angular):![picture box with 3 partitions and partitions should be controlled with numeric updown](https://www.mindstick.com/mindstickforums/8f7efb6f-0a79-4603-84cc-54003cf85b08/images/12ec378c-7f63-40ff-90a2-83af5a359106.png)\

## Replies

### Reply by Madhu Mitha

hai john..\
I wrote code for a single picturebox.. and i copied the same for other two pictureboxes.. and my code is

```
Private Sub fmload()        ' Create a obejct of InstalledFontCollection        Dim InstalledFonts As New InstalledFontCollection        ' Gets the array of FontFamily objects associated with this FontCollection.        Dim fontfamilies() As FontFamily = InstalledFonts.Families()        For Each fontFamily As FontFamily In fontfamilies            ComboBox1.Items.Add(fontFamily.Name)        Next    End Sub    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)        'PictureBox1.Image = DrawText("Fun day")        'PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage        'PictureBox1.Image = DrawText("Fun day")        Dim scale_factor As Single = Single.Parse(cmbdest.Text)        ' Get the source bitmap.        Dim bm_source As New Bitmap(Size.Width, Size.Height, Drawing.Imaging.PixelFormat.Format24bppRgb)        ' Make a bitmap for the result.        Dim bm_dest As New Bitmap( _         CInt(bm_source.Width * scale_factor), _         CInt(bm_source.Height * scale_factor))        'Make a Graphics object for the result Bitmap.        Dim gr_dest As Graphics = Graphics.FromImage(bm_source)    End Sub    Private Function DrawText(ByVal Text As String) As Bitmap        Dim TextBitmap As New Bitmap(Text)        Dim Brush As New SolidBrush(Color.Black)        Dim SelectedFont = New Font(FontFamily.GenericSansSerif, 50)        Using Graphic = Graphics.FromImage(TextBitmap)            Graphic.DrawString(Text, SelectedFont, Brushes.Black, 0, 0)        End Using        Return TextBitmap    End FunctionPrivate Sub img(ByVal route As String, ByVal font As String, ByVal fnsize As Integer, ByVal x As Integer, ByVal y As Integer)        PictureBox1.Image = Nothing        Dim g2 As System.Drawing.Graphics        Dim img As New Bitmap(Size.Width, Size.Height, Drawing.Imaging.PixelFormat.Format24bppRgb)        g2 = Graphics.FromImage(img)        g2.SmoothingMode = Drawing2D.SmoothingMode.HighQuality        g2.TextRenderingHint = Drawing.Text.TextRenderingHint.ClearTypeGridFit        g2.CompositingQuality = Drawing2D.CompositingQuality.HighQuality        Try            g2.DrawString(route, New Font(font, fnsize), Brushes.White, x, y)        Catch ex As Exception            MessageBox.Show("this font not supported try another font")        End Try        PictureBox1.SizeMode = PictureBoxSizeMode.Normal        PictureBox1.Image = img    End Sub
```

### Reply by John Smith

can we check your code? \
\


---

Original Source: https://www.mindstick.com/forum/23034/picture-box-with-3-partitions-and-partitions-should-be-controlled-with-numeric-updown

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
