rotate an activeX control 90 degrees 
Author Message
 rotate an activeX control 90 degrees

hi there,

I am programming a x-y chart in Visual Basic that can show a plot made
up of points that are stored in an array. the chart itself is an
activeX object and uses a picturebox to draw the points. the x and y
axses are also drawn in a seperate pictureboxes.

for purpouse of zoom capability i use 2 textboxes on each axsis where
the user can type in the minimum and maximum reach for the specified
axsis. the problem is that the entire control (pictureboxes and
textboxes) must be turned 90 to face sidewards.

does anyone know if there's an api that can be used to do this? or
does anyone has some tip's on how to achieve this?

because i'm doing this project for my thesis, i am not allow to work
with third party controls or software.



Mon, 05 Sep 2005 17:17:14 GMT  
 rotate an activeX control 90 degrees
I don't know opf any API that could do what you want, but there undoubtedly
is a "kludge" that you could come up with to do it (or, at least, give the
user the appearance of it having been done, which is much the same thing)
with a little bit of coding. I'm a little curious as to exactly why you
would want to do it, though. Do you really want the Text Boxes rotated by 90
degrees, so that the user has to enter stuff into them with his head tilted
by the same amount? Or is it perhaps for a display device that can be
rotated by 90 degrees? Or have I misunderstood your question?

Mike


Quote:
> hi there,

> I am programming a x-y chart in visual basic that can show a plot made
> up of points that are stored in an array. the chart itself is an
> activeX object and uses a picturebox to draw the points. the x and y
> axses are also drawn in a seperate pictureboxes.

> for purpouse of zoom capability i use 2 textboxes on each axsis where
> the user can type in the minimum and maximum reach for the specified
> axsis. the problem is that the entire control (pictureboxes and
> textboxes) must be turned 90 to face sidewards.

> does anyone know if there's an api that can be used to do this? or
> does anyone has some tip's on how to achieve this?

> because i'm doing this project for my thesis, i am not allow to work
> with third party controls or software.



Mon, 05 Sep 2005 23:25:07 GMT  
 rotate an activeX control 90 degrees
the idea is to first write the application in VB6 and then port it to
a pocket pc 2002 with windows ce on it.

because the pocket pc has a greater height than width, the graph would
otherwise be to narrow so it should be turned on it's side.

Quote:

> I don't know opf any API that could do what you want, but there undoubtedly
> is a "kludge" that you could come up with to do it (or, at least, give the
> user the appearance of it having been done, which is much the same thing)
> with a little bit of coding. I'm a little curious as to exactly why you
> would want to do it, though. Do you really want the Text Boxes rotated by 90
> degrees, so that the user has to enter stuff into them with his head tilted
> by the same amount? Or is it perhaps for a display device that can be
> rotated by 90 degrees? Or have I misunderstood your question?

> Mike



Tue, 06 Sep 2005 16:23:53 GMT  
 rotate an activeX control 90 degrees

Quote:
> the idea is to first write the application in VB6 and then port it to
> a pocket pc 2002 with windows ce on it.
> because the pocket pc has a greater height than width, the graph would
> otherwise be to narrow so it should be turned on it's side.

Then all you need to do is write some "resizing" code that positions all of
the displayed controls at specific logical positions on the display, taking
into account the height and width of the display currently in use. Have a
look through past postings on this group for "resize".

Mike



Tue, 06 Sep 2005 17:45:37 GMT  
 rotate an activeX control 90 degrees


Quote:
>the idea is to first write the application in VB6 and then port it to
>a pocket pc 2002 with windows ce on it.

>because the pocket pc has a greater height than width, the graph would
>otherwise be to narrow so it should be turned on it's side.

The chances are that the Pocket PC already has a screen rotate feature

Watch out with Win CE

MS supplies eVB which is a horrible variation of their VB Scripting
stuff, it would be a complete nightmare to port

There is something form AppForge (www.AppForge.com) that takes over
VB6's IDE and allows you to develop for CE

If (as I did) you write a substantial App in VB proper, with the
intention of porting it to CE, then (as I did) you will find that the
'porting' is not such a simple task

It might be an idea looking at the new Embedded XP stuff, that strikes
me as MS's successor to CE

As for 'rotating' the screen in standard VB, the task makes me
shudder.

Mike Williams is the guy to show you how to rotate printing, but the
concept of rotated Textboxes ... is fairly mind blowing



Tue, 06 Sep 2005 18:13:22 GMT  
 rotate an activeX control 90 degrees
Oops! Misunderstood your answer! So you really do need to rotate all your
stuff by 90 degrees! That's quite easy for "static" things, such as Command
Buttons etc where you can simply draw the button with a height that is
greater than its width and then get a handle to it and use the API to draw
some rotated text onto it (or, alternatively, use little picture boxes that
"pretend" to be command buttons) but it's gonna take a lot of code to
simulate a "rotated" active text box or List Box! I wish I could help, but
it would take far too much time to come up with anything useful. Hang out
for a little while to see if anyone comes up with some API "rotate this
control" stuff that will still leave the control "usable" in its rotated
state, but I seriously doubt that such a routine exists. Otherwise, I think
you're gonna have to use little picture boxes to simulate all your controls
and write a lot of code to get the "usable in its rotated state" stuff. Hard
work :-(

By the way, have you looked into the possibility that the pocket pc might
have some built in hardware that simply rotates the orientation of the
display, such as you get with some specialised monitors? I don't know
anything about those pocket pc things, but I'm sure that the designers of
those things must have considered the possibility that users would wish to
use them in different orientations. Such a facility would have been very
simple (and cheap) to include, although with things being "built down to a
price" these days perhaps they chose to save a few dollars on the
productions costs! However, if they have included such a facility, and if
you're lucky, then it might be a simple case of setting a flag of some sort
or calling a simple "switch to landscape display" routine.

Mike


Quote:


> > the idea is to first write the application in VB6 and then port it to
> > a pocket pc 2002 with windows ce on it.
> > because the pocket pc has a greater height than width, the graph would
> > otherwise be to narrow so it should be turned on it's side.

> Then all you need to do is write some "resizing" code that positions all
of
> the displayed controls at specific logical positions on the display,
taking
> into account the height and width of the display currently in use. Have a
> look through past postings on this group for "resize".

> Mike



Tue, 06 Sep 2005 18:57:45 GMT  
 rotate an activeX control 90 degrees
On Fri, 21 Mar 2003 10:57:45 -0000, "Mike Williams"

Quote:

>Oops! Misunderstood your answer! So you really do need to rotate all your
>stuff by 90 degrees!
Amazing - isn't it
>That's quite easy for "static" things, such as Command
>Buttons etc where you can simply draw the button with a height that is
>greater than its width and then get a handle to it and use the API to draw
>some rotated text onto it (or, alternatively, use little picture boxes that
>"pretend" to be command buttons)

That or UserControls - or just fake the whole thing
Quote:
>but it's gonna take a lot of code to
>simulate a "rotated" active text box or List Box!

What really spooks me is the Caret in a Textbox
Quote:
>I wish I could help, but
>it would take far too much time to come up with anything useful. Hang out
>for a little while to see if anyone comes up with some API "rotate this
>control" stuff that will still leave the control "usable" in its rotated
>state, but I seriously doubt that such a routine exists. Otherwise, I think
>you're gonna have to use little picture boxes to simulate all your controls
>and write a lot of code to get the "usable in its rotated state" stuff. Hard
>work :-(

>By the way, have you looked into the possibility that the pocket pc might
>have some built in hardware that simply rotates the orientation of the
>display, such as you get with some specialised monitors?

Absolutely - it is a dead cert that sort of stuff is built in
- in which case it is simply a matter of using the Manufacturer's APIs
to switch mode.

However, IMO the OP's big problem is going to be porting the thing to
WinCE - when I looked into it I backed off in total fear

Writing it for CE in the first place is probably not so horrible ...



Tue, 06 Sep 2005 21:17:41 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Looking for a control that will rotate text 90 degrees

2. To rotate a image 90 degrees...!

3. printing text rotated 90 degrees

4. put text in picture and rotating it 90 degrees

5. How to rotate Text 90 degrees, like for a graph legend

6. how do you rotate a Picture Box 90 degrees in VB4.0

7. Using BitBlt to Rotate a bitmap 90 degrees?

8. Rotate text display 90 degrees?

9. To rotate a image 90 degrees...!

10. Looking for a Visual Basic 5 tool (same as label tool, but rotated 90 degrees - vertical)

11. rotate 90 degree barcode font

12. To rotate a image 90 degrees...!

 

 
Powered by phpBB® Forum Software