Click here to Skip to main content
16,011,868 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Why a sub is not loaded in form load but in a button it is? Pin
Luc Pattyn24-Sep-11 4:04
sitebuilderLuc Pattyn24-Sep-11 4:04 
GeneralRe: Why a sub is not loaded in form load but in a button it is? Pin
DaveAuld24-Sep-11 5:37
professionalDaveAuld24-Sep-11 5:37 
QuestionDrawEllipse center on current cursor position? Pin
ChrisDScott9323-Sep-11 16:08
ChrisDScott9323-Sep-11 16:08 
AnswerRe: DrawEllipse center on current cursor position? Pin
Richard MacCutchan24-Sep-11 0:12
mveRichard MacCutchan24-Sep-11 0:12 
GeneralRe: DrawEllipse center on current cursor position? Pin
ChrisDScott9324-Sep-11 6:36
ChrisDScott9324-Sep-11 6:36 
GeneralRe: DrawEllipse center on current cursor position? Pin
Richard MacCutchan24-Sep-11 6:47
mveRichard MacCutchan24-Sep-11 6:47 
GeneralRe: DrawEllipse center on current cursor position? Pin
ChrisDScott9324-Sep-11 9:20
ChrisDScott9324-Sep-11 9:20 
GeneralRe: DrawEllipse center on current cursor position? Pin
Richard MacCutchan24-Sep-11 21:34
mveRichard MacCutchan24-Sep-11 21:34 
ChrisDScott93 wrote:
This is caused by it drawing the circle from the top left to the bottom right, instead of from the center. It draws it like a rectangle.

Yeah, computers are such contrary so-and-sos. Your problem is merely one of mathematics, given the centre and radius of your circle you need to calculate the offset and size of its containing rectangle. If you write a function that does just that then you should be able to draw any size circle at any point in your window. Given that the circle's radius is equal to half the width and height of the rectangle the starting point should be:
Origin = centre.x - Radius, centre.y - Radius

You may also need to adjust for the X:Y ratio unless you are able to set one of the mapping modes which does it automatically (my VB skills are very basic).
Unrequited desire is character building. OriginalGriff


AnswerRe: DrawEllipse center on current cursor position? Pin
Luc Pattyn24-Sep-11 4:26
sitebuilderLuc Pattyn24-Sep-11 4:26 
GeneralRe: DrawEllipse center on current cursor position? Pin
ChrisDScott9324-Sep-11 6:38
ChrisDScott9324-Sep-11 6:38 
GeneralRe: DrawEllipse center on current cursor position? Pin
Richard MacCutchan24-Sep-11 6:45
mveRichard MacCutchan24-Sep-11 6:45 
QuestionRe: DrawEllipse center on current cursor position? Pin
Luc Pattyn24-Sep-11 7:04
sitebuilderLuc Pattyn24-Sep-11 7:04 
AnswerRe: DrawEllipse center on current cursor position? Pin
ChrisDScott9324-Sep-11 9:09
ChrisDScott9324-Sep-11 9:09 
AnswerRe: DrawEllipse center on current cursor position? Pin
Richard MacCutchan24-Sep-11 21:36
mveRichard MacCutchan24-Sep-11 21:36 
AnswerRe: DrawEllipse center on current cursor position? Pin
Luc Pattyn24-Sep-11 7:02
sitebuilderLuc Pattyn24-Sep-11 7:02 
GeneralRe: DrawEllipse center on current cursor position? Pin
ChrisDScott9324-Sep-11 9:21
ChrisDScott9324-Sep-11 9:21 
AnswerRe: DrawEllipse center on current cursor position? Pin
Luc Pattyn24-Sep-11 9:26
sitebuilderLuc Pattyn24-Sep-11 9:26 
GeneralRe: DrawEllipse center on current cursor position? Pin
ChrisDScott9324-Sep-11 23:13
ChrisDScott9324-Sep-11 23:13 
QuestionListview problem Pin
erickoronoh10kip23-Sep-11 7:30
erickoronoh10kip23-Sep-11 7:30 
AnswerRe: Listview problem Pin
Bert Mitton23-Sep-11 7:38
professionalBert Mitton23-Sep-11 7:38 
QuestionWhere and Why my row is not collored Pin
DeDelva23-Sep-11 3:19
DeDelva23-Sep-11 3:19 
AnswerRe: Where and Why my row is not collored Pin
Luc Pattyn23-Sep-11 3:32
sitebuilderLuc Pattyn23-Sep-11 3:32 
GeneralRe: Where and Why my row is not collored Pin
Scubapro23-Sep-11 3:49
Scubapro23-Sep-11 3:49 
AnswerRe: Where and Why my row is not collored Pin
DeDelva23-Sep-11 5:41
DeDelva23-Sep-11 5:41 
AnswerRe: Where and Why my row is not collored Pin
Scubapro23-Sep-11 3:48
Scubapro23-Sep-11 3:48 

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.