Click here to Skip to main content
15,905,877 members
Home / Discussions / C#
   

C#

 
GeneralMessagebox in C# windows Application Pin
Vimalsoft(Pty) Ltd19-Mar-08 20:51
professionalVimalsoft(Pty) Ltd19-Mar-08 20:51 
GeneralRe: Messagebox in C# windows Application Pin
N a v a n e e t h19-Mar-08 21:17
N a v a n e e t h19-Mar-08 21:17 
AnswerRe: Messagebox in C# windows Application Pin
Vimalsoft(Pty) Ltd19-Mar-08 21:52
professionalVimalsoft(Pty) Ltd19-Mar-08 21:52 
GeneralRe: Messagebox in C# windows Application Pin
Pete O'Hanlon19-Mar-08 22:56
mvePete O'Hanlon19-Mar-08 22:56 
GeneralSend "Hello Notepad" to Notepad Pin
M Riaz Bashir19-Mar-08 20:09
M Riaz Bashir19-Mar-08 20:09 
GeneralRe: Send "Hello Notepad" to Notepad Pin
N a v a n e e t h19-Mar-08 20:19
N a v a n e e t h19-Mar-08 20:19 
GeneralPrint Dialog Problem Pin
D i x y19-Mar-08 18:45
D i x y19-Mar-08 18:45 
QuestionTrouble Retrieving Coordinates Pin
123shailesh19-Mar-08 18:40
123shailesh19-Mar-08 18:40 
I am using an Image Control that i found here:
http://www.codeproject.com/KB/vb/PanZoomExample.aspx

It is really good and very useful. I am building a map based system and need to retrieve the mouse coordinates on the map. The 'onclick', 'onmousedown','onemouseup' etc events are not working on this 'imagecontrol'. It doesnt trigger when i click anywhere on the map except for the border near the scrollbar. I tried with the normal picturebox control and it worked perfectly. But I obviously need to use this control because of the great features.

What should I do? why doesnt the event trigger on the image. I tried what someone (splater) had suggested on the messageboard of that page but to be honest i couldnt exactly understand what he meant........ mebbe coz im using VC# and some stuff might be diff from VB. I didnt understand what the drawingboard etc was.....I even tried getting the email id of the creator of that control but wasnt able to find it anywhere.

his is what i have been doing....... but it seems the events themselves are not firing..... nd i have no clue why

//imagecontrol name: img_Map
//clickPos is a global variable

<br />
private void img_Map_MouseDown(object sender, MouseEventArgs e)<br />
{<br />
clickPos.X = e.X;<br />
clickPos.Y = e.Y;<br />
MessageBox.Show("Down"); //Just for verifying its firing<br />
}<br />
<br />
private void img_Map_MouseUp(object sender, MouseEventArgs e)<br />
{<br />
MessageBox.Show("Up1"); //Just for verifying its firing<br />
if ((e.X == clickPos.X) && (e.Y == clickPos.Y))<br />
{<br />
MessageBox.Show("Up2");<br />
}<br />
}


I am doing this as the control also has panning feature when we click the mouse and move it. So i want it to give the coordinates only when the mousedown and mouseup occur at the same position (else it is panning).

But BOTH these events do not fire when i click on the image in the control. but it does work when i click on the border near the scrollbars.

I might be asking for a little too much, but if anyone could download that control and check it out, it would really be a huge favor.

http://www.codeproject.com/KB/vb/PanZoomExample.aspx

I am pretty much a newbie to C# and hence REALLY need HELP! Thanks to all those helping in advance.
GeneralRe: Trouble Retrieving Coordinates Pin
Christian Graus19-Mar-08 23:18
protectorChristian Graus19-Mar-08 23:18 
GeneralCreat ascii font Pin
kamalesh574319-Mar-08 17:23
kamalesh574319-Mar-08 17:23 
GeneralRe: Creat ascii font Pin
Guffa19-Mar-08 23:05
Guffa19-Mar-08 23:05 
GeneralGeneric data fetch with IDataReader [modified] Pin
RubensFarias19-Mar-08 16:37
RubensFarias19-Mar-08 16:37 
GeneralRe: Generic data fetch with IDataReader Pin
mmikey719-Mar-08 22:16
mmikey719-Mar-08 22:16 
GeneralRe: Generic data fetch with IDataReader Pin
RubensFarias20-Mar-08 0:47
RubensFarias20-Mar-08 0:47 
GeneralRe: Generic data fetch with IDataReader Pin
mmikey720-Mar-08 5:34
mmikey720-Mar-08 5:34 
GeneralRe: Generic data fetch with IDataReader Pin
RubensFarias23-Mar-08 12:50
RubensFarias23-Mar-08 12:50 
GeneralRe: Generic data fetch with IDataReader Pin
mmikey723-Mar-08 13:07
mmikey723-Mar-08 13:07 
GeneralSome issues with Socket class behavior. Pin
Jack04519-Mar-08 14:30
Jack04519-Mar-08 14:30 
GeneralRe: Some issues with Socket class behavior. Pin
XeoN-Kc19-Mar-08 21:35
XeoN-Kc19-Mar-08 21:35 
GeneralRe: Some issues with Socket class behavior. Pin
Jack04520-Mar-08 5:13
Jack04520-Mar-08 5:13 
GeneralLabel.Text property Pin
MarkB77719-Mar-08 12:23
MarkB77719-Mar-08 12:23 
GeneralRe: Label.Text property Pin
J$19-Mar-08 13:56
J$19-Mar-08 13:56 
GeneralRe: Label.Text property Pin
Luc Pattyn19-Mar-08 16:21
sitebuilderLuc Pattyn19-Mar-08 16:21 
GeneralRe: Label.Text property Pin
SeeSharp19-Mar-08 20:20
SeeSharp19-Mar-08 20:20 
GeneralRe: Label.Text property Pin
MarkB77719-Mar-08 20:36
MarkB77719-Mar-08 20:36 

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.