problem in mouse event if control width is more than 32767

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi all i am having a problem mouse move event .
i created a control with width 40,0000 .now in mouse move event handler e.x
returns value upto 32767 units ,beyond it returns negative values , what to
do ..please help

thanks in advance
 
Must be using a signed short and you want it to be an unsigned short. At any
rate, if 32768 is showing up as -1 try doing something like this:
if(value<0) value = 32767 + Math.Abs(value);

Hope that helps.
 
Must be using a signed short and you want it to be an unsigned short. At any
rate, if 32768 is showing up as -1 try doing something like this:
if(value<0) value = 32767 + Math.Abs(value);

Hope that helps.
 
hi thnks for ur reply am using panel control , as i have to do a lot of
drawing on it . say i have to draw rectangles . then i want to move these
rectangles , now when i try to move these rectangle in mousemove event by
changing the coordinates of rectangles as given by e.X all works fine upto
32767 but afetr tht e.X returns neagtive values , n moving of rectangles
halts ,how to handle tht ..
pls help

amit
 
Back
Top