Hi
it's me again
with the silly problems in my vb .net codes :(
I have a serious problem with combo box
i need to use the selected item in combo box
when user selects for example GREEN from be drop down list after than i need to put that green into the rest of my code, i need to draw a line in green
but i dont know how to tell the program to use Green
i tried setting up a variable for that, like : Dim rang as string = cmbcolor.selecteditem
but it doesn't work
can you please help me?
thank you
ana_eht
0
Newbie Poster
Recommended Answers
Jump to Postwhat do you want it's not clear and i can't understand pleas write clear what u want after selecting of green color.
so i can help You.
Jump to Posthere one example i am written here i think this will help you.
Imports System.Drawing Imports System.Drawing.Drawing2D Private sub form1_paint(byval sender as object, byval e as System.Windows.Forms.PaintEventArgs) dim g as graphics g=form1.CreateGraphics() dim mybrush as solidBrush mybrush=Brushes.Red g.Fill.Rectangle(mybrush,10,10,200,100) mybrush.dispose() end sub
and another code for you
All 8 Replies
pritesh2010
30
Posting Whiz in Training
ana_eht
0
Newbie Poster
asaukani
0
Light Poster
pritesh2010
30
Posting Whiz in Training
ana_eht
0
Newbie Poster
y2_sub
0
Newbie Poster
ana_eht
0
Newbie Poster
xyudha
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.