The combobox is populated with text, such as "1 Pixel, 2 Pixels. .. .", not just numbers.
Using the SelectedItem property of the combobox I would need to use a SELECT CASE to set the PenWidth. I chose the direct assignment of SelectedIndex + 1 to PenWidth just to make the code a little...
I am creating a very simple drawing application as an assignment for a VB.NET class. The app draws a freehand line with the mouse inside a PictureBox and allows change of color and linewidth. It works fine except when I change the line width using a combo box, then it throws an out of memory...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.