---
title: "numeric updown control to access with graphics properties"  
description: "numeric updown control to access with graphics properties"  
author: "Madhu Mitha"  
published: 2015-03-08  
updated: 2015-03-09  
canonical: https://www.mindstick.com/forum/13006/numeric-updown-control-to-access-with-graphics-properties  
category: ".net"  
tags: ["vb.net"]  
reading_time: 2 minutes  

---

# numeric updown control to access with graphics properties

Hi,\
I am developing an [application](https://www.mindstick.com/articles/12824/calculator-application-in-android) on LCD font makers. I just completed an work on drawing boxes where i have to place my fonts. [now](https://yourviews.mindstick.com/view/81402/it-s-liberals-vs-progressives-in-us-politics-now) I need to [add](https://www.mindstick.com/forum/12983/add-address-in-textbox-when-page-is-load-and-if-i-search-address-in-textbox-show-in-map-by-javascript) numeric updown [control](https://www.mindstick.com/blog/197/asp-dot-net-repeater-control) which should help me in increasing and decreasing the [rows and columns](https://www.mindstick.com/forum/161180/how-to-compare-rows-and-columns-in-sql-server-database) in the [grid](https://www.mindstick.com/forum/369/how-can-i-add-a-column-name-to-my-grid).. can [anyone help me](https://www.mindstick.com/forum/331/can-anyone-help-me-out-how-to-use-session-concept) resolving my problem.\
**my [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii) is**\
\

```
Public Class Form1    Dim x As Integer = 16    Dim y As Integer = 144    Dim box(x, y) As PictureBox#Region "Run time Load"    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load        buildmap()    End Sub#End Region#Region "build grid"    Public Sub buildmap()        For row = 0 To x            For column = 0 To y                drawbox(row, column)            Next        Next    End Sub#End Region#Region "Draw"    Public Sub drawbox(ByVal row As Integer, ByVal column As Integer)        box(row, column) = New PictureBox        box(row, column).Size = New Point(8, 8)        box(row, column).BorderStyle = BorderStyle.FixedSingle        box(row, column).BackColor = Color.White        box(row, column).Location = New Point((box(row, column).Width * column), (box(row, column).Height * row))        Me.Controls.Add(box(row, column))    End Sub#End Region
```

\
**[Output](https://www.mindstick.com/interview/34427/explain-the-output-in-angular):**\
![numeric updown control to access with graphics properties](https://www.mindstick.com/mindstickforums/d6bf54db-a2b8-46f3-afa9-467dd13e43ee/images/712ee60a-adc3-4fe8-81bf-166c371696b6.png)\
This will be my output screen where the numeric controls are used to increase and decrease the rows and column in the current form.\
Thanks in advance\

## Replies

### Reply by Anonymous User

Try this code\

```
Imports SystemImports System.Collections.GenericImports System.ComponentModelImports System.DataImports System.DrawingImports System.LinqImports System.TextImports System.Threading.TasksImports System.Windows.Forms Namespace Updown    Public partial Class Form1     Inherits Form        Public  Sub New()            InitializeComponent()        End Sub         Private   Sub New_Load(ByVal sender As Object, ByVal e As EventArgs)            Me.studentTableAdapter.Fill(Me.myDBDataSet.Student)        End Sub         Private  Sub numericUpDown1_ValueChanged(ByVal sender As Object, ByVal e As EventArgs)            Dim item As DataGridViewColumn            For Each item In dataGridView1.Columns                item.Width = Integer.Parse(numericUpDown1.Value.ToString())             Next            Dim item As DataGridViewRow            For Each item In dataGridView1.Rows                item.Height = Integer.Parse(numericUpDown1.Value.ToString())             Next        End Sub    End ClassEnd Namespace
```

\


---

Original Source: https://www.mindstick.com/forum/13006/numeric-updown-control-to-access-with-graphics-properties

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
