Click here to Skip to main content
16,004,991 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionCode Problem Pin
| Muhammad Waqas Butt |1-Oct-05 23:41
professional| Muhammad Waqas Butt |1-Oct-05 23:41 
Questionvideo conferencing HELP!! Pin
lobsterlord1-Oct-05 20:41
lobsterlord1-Oct-05 20:41 
Question[Message Deleted] Pin
vbcodetoday1-Oct-05 20:35
vbcodetoday1-Oct-05 20:35 
AnswerRe: trackbar2 Pin
Dave Kreskowiak2-Oct-05 2:14
mveDave Kreskowiak2-Oct-05 2:14 
Question[Message Deleted] Pin
vbcodetoday1-Oct-05 20:26
vbcodetoday1-Oct-05 20:26 
AnswerRe: trackbar Pin
Dave Kreskowiak2-Oct-05 2:13
mveDave Kreskowiak2-Oct-05 2:13 
GeneralRe: trackbar Pin
vbcodetoday2-Oct-05 7:26
vbcodetoday2-Oct-05 7:26 
GeneralRe: trackbar Pin
Dave Kreskowiak2-Oct-05 8:41
mveDave Kreskowiak2-Oct-05 8:41 
You still haven't supplied much information.

I take it you have to control both the position and the size of the circle.

You're drawing a cicle from the top/left corner of the picture box ALL THE TIME. You're not tracking the position of the circle at at all.

You have to track the center of the circle with the two trackbars. Easy enough, you already have them in place. Eliminate all the drawing code from the trackbars, you don't need any of it. The trackbar code will just alter the position and size of the circle. Then call the Invalidate method of the PictureBox control your painting on.

You only need a single Draw statement, inside the Paint event handler for the PictureBox control. Here is where you'll calculate the top/left and bottom/right corners of the box that will be used to draw your circle. It's simple math.

The top/left will be the position of the circle minus hald the diameter. The bottom/right will be the position plus half the diameter.

Don't even thnik of asking for the code. You're in a class to learn to write it yourself.


RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

GeneralRe: trackbar Pin
vbcodetoday2-Oct-05 17:10
vbcodetoday2-Oct-05 17:10 
GeneralRe: trackbar Pin
watagal3-Oct-05 4:10
watagal3-Oct-05 4:10 
GeneralRe: trackbar Pin
Anonymous3-Oct-05 6:22
Anonymous3-Oct-05 6:22 
GeneralRe: trackbar Pin
Dave Kreskowiak3-Oct-05 12:11
mveDave Kreskowiak3-Oct-05 12:11 
Questionvb plot data Pin
alex_kenobe1-Oct-05 16:31
alex_kenobe1-Oct-05 16:31 
QuestionExcel Spreadsheet Control Pin
medicenpringles1-Oct-05 13:45
medicenpringles1-Oct-05 13:45 
AnswerRe: Excel Spreadsheet Control Pin
Anonymous2-Oct-05 23:59
Anonymous2-Oct-05 23:59 
AnswerRe: Excel Spreadsheet Control Pin
Suelinda_W7-Oct-05 9:29
Suelinda_W7-Oct-05 9:29 
QuestionHow do you get the index of the currently selected item in a listview? Pin
watagal1-Oct-05 13:26
watagal1-Oct-05 13:26 
AnswerRe: How do you get the index of the currently selected item in a listview? Pin
Anonymous1-Oct-05 13:45
Anonymous1-Oct-05 13:45 
AnswerRe: How do you get the index of the currently selected item in a listview? Pin
watagal3-Oct-05 4:41
watagal3-Oct-05 4:41 
QuestionNeed help connecting and suggestions Pin
erikkl20001-Oct-05 10:48
erikkl20001-Oct-05 10:48 
AnswerRe: Need help connecting and suggestions Pin
rwestgraham1-Oct-05 14:08
rwestgraham1-Oct-05 14:08 
GeneralRe: Need help connecting and suggestions Pin
erikkl20001-Oct-05 14:12
erikkl20001-Oct-05 14:12 
GeneralRe: Need help connecting and suggestions Pin
rwestgraham1-Oct-05 15:53
rwestgraham1-Oct-05 15:53 
QuestionMore event troubles: SelectedIndexChanged Pin
watagal1-Oct-05 9:16
watagal1-Oct-05 9:16 
QuestionEvent: Treeview-AfterSelect Pin
watagal1-Oct-05 8:00
watagal1-Oct-05 8:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.