473,404 Members | 2,178 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

problem in mouse event if control width is more than 32767

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 .actually i 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 ..


--
amit bharadwaj
VC++(ATL,MFC) developer
Nov 16 '05 #1
2 1792
Amit,

This is just a guess, but maybe casting the result to an unsigned Int16
(ushort) might give you the correct number.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"amit bharadwaj" <am***********@discussions.microsoft.com> wrote in message
news:7E**********************************@microsof t.com...
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 .actually i 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 ..


--
amit bharadwaj
VC++(ATL,MFC) developer

Nov 16 '05 #2
Hi amit,

I'm really curious, how do you make a control with size 40,000? The size is
limited to 32767 and this limitation comes, as far as I know, from the
Windows OS itself.

Can you post some sample that creates such a huge control?. Then we might
workout something.
--

Stoitcho Goutsev (100) [C# MVP]
"amit bharadwaj" <am***********@discussions.microsoft.com> wrote in message
news:7E**********************************@microsof t.com...
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 .actually i 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 ..


--
amit bharadwaj
VC++(ATL,MFC) developer

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Ganesh | last post by:
hi pals, I like to know ,how to generate a mouse event through the java program .. the user should not need to trigger the mouse event.the program should control the mouse to generate a mouse...
3
by: amit bharadwaj | last post by:
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...
0
by: Bsiang Tan | last post by:
Hi all, I have a few PictureBox in my windows form... The PictureBox mouse event likle MouseLeave work fine.. But the problem occured when I minimize my form into System Tray, and then...
3
by: MrNobody | last post by:
Say I want to do a specific action if the user holds down the CTRL key while clicking something in my UI- how can I determine if this key is currently pressed within the mouse event?
2
by: scott_gui | last post by:
I am creating a Windows application: The mouse event <Double-Button-1> has a conflict when the <Button-1> event also has a binding. Double clicks will first perform the single click action. This...
2
by: Ryan Liu | last post by:
Hi, I need the MouseDown event be trigged everytime when you press mouse in a datagrid (System.Windows.Forms). But seems mouse event will only fire once, and it seems changed to edit mode...
0
by: lechatthierry | last post by:
Is it possible to block a mouse event on an Hyperlink with a general script event? This is quite troublesome for me. I am trying to find a way to block the windows shortcut SHIFT + MOUSE LEFT...
1
by: Neko | last post by:
Is it possible to block a mouse event on an Hyperlink with a general script event? This is quite troublesome for me. I am trying to find a way to block the windows shortcut SHIFT + MOUSE LEFT...
3
by: wanwan | last post by:
I made a game with a window form that needs to record the mouse position to an array at 100 samples per second, so I use the mouse move event to do the job. The problem is the mouse move event...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.