Click here to Skip to main content
15,893,161 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Little problem with database Pin
Henry Minute26-May-09 15:01
Henry Minute26-May-09 15:01 
GeneralRe: Little problem with database Pin
breikascool27-May-09 9:07
breikascool27-May-09 9:07 
QuestionDrag and drop makes a ping sound Pin
Jarno Burger26-May-09 9:14
Jarno Burger26-May-09 9:14 
QuestionGetting Image coordinates when image is zoomed Pin
Alan Streisel26-May-09 8:16
Alan Streisel26-May-09 8:16 
AnswerRe: Getting Image coordinates when image is zoomed Pin
Jarno Burger26-May-09 9:11
Jarno Burger26-May-09 9:11 
GeneralRe: Getting Image coordinates when image is zoomed Pin
Alan Streisel27-May-09 2:43
Alan Streisel27-May-09 2:43 
GeneralRe: Getting Image coordinates when image is zoomed Pin
Jarno Burger27-May-09 6:53
Jarno Burger27-May-09 6:53 
GeneralRe: Getting Image coordinates when image is zoomed Pin
Alan Streisel29-May-09 2:58
Alan Streisel29-May-09 2:58 
Well I dumped the scroll bars and have a panning aspect to scroll - I can pan the graphic and get the proper image coordinates. I have the scale of the horizontal and vertical. I can zoom in and out in many levels at increments of about 10%. As soon as I zoom in the coordinates of course change as they should. But I need the to be able to click the graphic at the exact same spot when zoomed in and receive the same coordinate of the exact same spot when not zoomed in. Here's what I have:

scaleX = CSng(Me.GetScreenRect.Width()) / Me.Width()
scaleY = CSng(Me.GetScreenRect.Height()) / Me.Height()

x = CInt(Math.Round(mouseXY.X * scaleX))
y = CInt(Math.Round(mouseXY.Y * scaleY))

Works fine when not zoomed in. I need the math that would allow for obtaining the same clicked spot while zoomed.
GeneralRe: Getting Image coordinates when image is zoomed Pin
DidiKunz29-May-09 4:17
DidiKunz29-May-09 4:17 
GeneralRe: Getting Image coordinates when image is zoomed Pin
Alan Streisel29-May-09 5:01
Alan Streisel29-May-09 5:01 
GeneralRe: Getting Image coordinates when image is zoomed Pin
DidiKunz29-May-09 6:49
DidiKunz29-May-09 6:49 
QuestionPlease help a newbie that is totally confused.... Pin
ymilan26-May-09 6:27
ymilan26-May-09 6:27 
GeneralRe: Please help a newbie that is totally confused.... Pin
Kschuler26-May-09 7:30
Kschuler26-May-09 7:30 
AnswerRe: Please help a newbie that is totally confused.... Pin
Guffa26-May-09 11:20
Guffa26-May-09 11:20 
GeneralRe: Please help a newbie that is totally confused.... Pin
ymilan27-May-09 12:59
ymilan27-May-09 12:59 
AnswerRe: Please help a newbie that is totally confused.... Pin
Jarno Burger28-May-09 1:16
Jarno Burger28-May-09 1:16 
GeneralRe: Please help a newbie that is totally confused.... Pin
ymilan28-May-09 2:29
ymilan28-May-09 2:29 
GeneralRe: Please help a newbie that is totally confused.... Pin
ymilan28-May-09 2:58
ymilan28-May-09 2:58 
GeneralRe: Please help a newbie that is totally confused.... Pin
Jarno Burger28-May-09 3:55
Jarno Burger28-May-09 3:55 
GeneralRe: Please help a newbie that is totally confused.... Pin
ymilan28-May-09 11:57
ymilan28-May-09 11:57 
GeneralRe: Please help a newbie that is totally confused.... Pin
Jarno Burger28-May-09 23:23
Jarno Burger28-May-09 23:23 
QuestionGet the last line from a constantly updating textbox Pin
The Mighty Atom26-May-09 5:21
The Mighty Atom26-May-09 5:21 
AnswerRe: Get the last line from a constantly updating textbox Pin
Luc Pattyn26-May-09 5:45
sitebuilderLuc Pattyn26-May-09 5:45 
GeneralRe: Get the last line from a constantly updating textbox Pin
The Mighty Atom26-May-09 6:59
The Mighty Atom26-May-09 6:59 
GeneralRe: Get the last line from a constantly updating textbox Pin
Luc Pattyn26-May-09 7:14
sitebuilderLuc Pattyn26-May-09 7:14 

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.