473,508 Members | 2,274 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

location property of control not accepting values more than 32767

Hi,
In my application i need to create the controls at runtime and also need to
position them.
I am doing it by this like,

control.Location = new Point(x,y);

Now when i am getting lets say y greater than 32767 (lets say y = 33421)
after setting this location property it again becomes 32767. so i am not able
to position my controls.

can any one help me in this?

Jul 21 '05 #1
3 1786

"Nilesh" <Ni****@discussions.microsoft.com> wrote in message
news:04**********************************@microsof t.com...
Hi,
In my application i need to create the controls at runtime and also need to position them.
I am doing it by this like,

control.Location = new Point(x,y);

Now when i am getting lets say y greater than 32767 (lets say y = 33421)
after setting this location property it again becomes 32767. so i am not able to position my controls.

can any one help me in this?


This is a limitation of Windows OS, not .NET.
IMHO, it sounds like maybe you have a design issue, as personally I can not
think of a "practical" reason for truely needing values like that.
Jul 21 '05 #2
hi , Gerald
Thanks for the quick response.
let me tell you the case.

I have a requirement like this.
I need to display multiple pictureboxes in my application in different modes
(line dual window, 4 window, 8 window etc..) . means in dual window mode i
have to display only 2 "full" pictureboxes in entire client rectangle area
and when user scrolls next 2 should come up, but at a time only 2 will be
visible. same case for 4 window mode , at this time 4 pictureboxes will be
fully visible and other comes up on scroll.
now in this 1 more option is "show all images". in this i need to create all
the pictureboxes but need to display 2 or 4 at a time. i need to create all
the pictureboxes bcoz i need to provide navigation also through pictureboxes.
means when user clicks on "Next" , next picturebox should gets highlighted.
Now in this option i am facing problem which i stated.

Can you please suggest me what should i do?
Thanks,
Nilesh

"Gerald Hernandez" wrote:

"Nilesh" <Ni****@discussions.microsoft.com> wrote in message
news:04**********************************@microsof t.com...
Hi,
In my application i need to create the controls at runtime and also need

to
position them.
I am doing it by this like,

control.Location = new Point(x,y);

Now when i am getting lets say y greater than 32767 (lets say y = 33421)
after setting this location property it again becomes 32767. so i am not

able
to position my controls.

can any one help me in this?


This is a limitation of Windows OS, not .NET.
IMHO, it sounds like maybe you have a design issue, as personally I can not
think of a "practical" reason for truely needing values like that.

Jul 21 '05 #3

"Nilesh" <Ni****@discussions.microsoft.com> wrote in message
news:4D**********************************@microsof t.com...
hi , Gerald
Thanks for the quick response.
let me tell you the case.

I have a requirement like this.
I need to display multiple pictureboxes in my application in different modes (line dual window, 4 window, 8 window etc..) . means in dual window mode i
have to display only 2 "full" pictureboxes in entire client rectangle area
and when user scrolls next 2 should come up, but at a time only 2 will be
visible. same case for 4 window mode , at this time 4 pictureboxes will be
fully visible and other comes up on scroll.
now in this 1 more option is "show all images". in this i need to create all the pictureboxes but need to display 2 or 4 at a time. i need to create all the pictureboxes bcoz i need to provide navigation also through pictureboxes. means when user clicks on "Next" , next picturebox should gets highlighted. Now in this option i am facing problem which i stated.

Can you please suggest me what should i do?
Thanks,
Nilesh


What you want is pretty common, and usually when the question about the
limits come up.
Basically, you need to handle the scrolling yourself. In the "show all
images" mode, you would pretty much do exactly what you are doing in the
other mode. Only you would need to keep track of what images need to
currently be displayed and load those as necessary. Like you said, even
though they chose "show all", you are really only showing 2 or 4 at a time.
So you only need 2 or 4 picture boxes on screen. When they choose "Next",
all you do is load up the next block of images into the same picture boxes.

If you wanted to perform smooth scrolling, where you see just portions of
the neighboring pictures, then at most you only need one additional row or
column of picture boxes in the scroll direction. As the user scrolls in the
desired direction, once they hit the point where only entire pictures are
displayed, you kind of snap back.
For example: Let's say you want to scroll smoothly horizontally, but only
display 1 whole picture.
You would want 2 picture boxes. 1 to fill the current screen, and another to
scroll into view.
So at 50% scroll, you would see half of each picture.
Once you scroll the second picture fully into view, you no longer need the
first picture. So discard the first picture, load the second picture into
the first box, and reset your view to show the first box. Now load up the
third picture into the second box so it is ready to scroll into view.

I know it is much more complicated than just creating the whole array of
controls and letting the system handle the scrolling for you. But this is
really the way to do it. And yes, this is how many of the other apps that
handle this do it as well. And it is not just limited to pictures. List
boxes, tree views, and other things that need to perform lots of scrolling
follow the same general concept.

Gerald
Jul 22 '05 #4

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

Similar topics

13
2055
by: Will Pittenger | last post by:
I have a Control derived class. When the parent of the control changes the control's Location property, the stack overflows. I have not found a way to find out what was on the stack when it does...
2
1795
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 ,...
3
257
by: Nilesh | last post by:
Hi, In my application i need to create the controls at runtime and also need to position them. I am doing it by this like, control.Location = new Point(x,y); Now when i am getting lets say y...
17
2010
by: binjobster | last post by:
Hello everyone, I'm updating some documents that describes so many C/C++ functions/method(about 2500). But I'm not familiar with these codes. So I want to find such a utility can generate...
12
2310
by: Chris | last post by:
Are there any other controls which could replace List & Tree controls, because they have limitation of accepting only 32767 items. thanks a lot in advance.
7
3596
by: junky_fellow | last post by:
Guys, Does the standard allow to an implementation to chose any maximum and minimum value for an object of type int ? For eg. Can an implementation with sizeof(int)=4, chose to have value of...
0
7129
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7398
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...
1
7061
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
7502
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5057
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...
0
3208
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3194
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1566
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
769
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.