473,385 Members | 1,908 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,385 software developers and data experts.

Rotating Buttons

Ali Rizwan
925 512MB
Can some tell me how can i make rotatry motion to control.
Thanx
Aug 30 '07 #1
9 3003
Can some tell me how can i make rotatry motion to control.
Thanx
Do you have an example (say, a web page)? I'm not sure what is meant by rotary buttons.
Aug 30 '07 #2
Killer42
8,435 Expert 8TB
Can some tell me how can i make rotatry motion to control.
Yes, I think we need more detail about what you mean. For instance, the first few questions that come to mind are...
  • What version of VB?
  • Do you mean that you just want to put a button on a form rotated to a different orientation to normal, or do you want something to be animated at runtime, or what?
  • Web page or Windows form?
Aug 31 '07 #3
Ali Rizwan
925 512MB
Yes, I think we need more detail about what you mean. For instance, the first few questions that come to mind are...
  • What version of VB?
  • Do you mean that you just want to put a button on a form rotated to a different orientation to normal, or do you want something to be animated at runtime, or what?
  • Web page or Windows form?
Hi
I m using Vb6
And want to make button rotating animation at runtime and its for windows form.
i try to use sin cos etc but i cant i have never use them before so plz help me.
Aug 31 '07 #4
Killer42
8,435 Expert 8TB
Hi
I m using Vb6
And want to make button rotating animation at runtime and its for windows form.
i try to use sin cos etc but i cant i have never use them before so plz help me.
Using Sin() and Cos() functions to generate coordinates for a circle is fairly simple. But I don't see how you can rotate a button. Perhaps you could create a little video/animation of a rotating button, and play it in an animation control.

I'll attach a sample program I've just created, which demonstrates drawing a circle on the form using Sin and Cos. To use the sample, just run it and click in two different places on the form. It will draw a blue cross at the first place, then draw a circle around it, reaching to where you click the second time.
Attached Files
File Type: zip Circle-drawing with Sin&Cos.zip (4.2 KB, 257 views)
Aug 31 '07 #5
Ali Rizwan
925 512MB
Using Sin() and Cos() functions to generate coordinates for a circle is fairly simple. But I don't see how you can rotate a button. Perhaps you could create a little video/animation of a rotating button, and play it in an animation control.

I'll attach a sample program I've just created, which demonstrates drawing a circle on the form using Sin and Cos. To use the sample, just run it and click in two different places on the form. It will draw a blue cross at the first place, then draw a circle around it, reaching to where you click the second time.
Thanx a lot for this
If i succeed to rotate a button then i will tell you and one thing more
i want to know about animation control i know this but dont know how to use it
Can you tell me
Aug 31 '07 #6
Killer42
8,435 Expert 8TB
Thanx a lot for this
If i succeed to rotate a button then i will tell you and one thing more
i want to know about animation control i know this but dont know how to use it
Can you tell me
You'd have to find a video or create it using appropriate software. The animation control just lets you play a little AVI files. It's often used to do things like the "flying files" animation when copying files, the moving magnifying glass while searching, and so on.

I don't remember how to use it, but I think it's pretty simple. You just give it the name of the AVI file to play.
Aug 31 '07 #7
Ali Rizwan
925 512MB
You'd have to find a video or create it using appropriate software. The animation control just lets you play a little AVI files. It's often used to do things like the "flying files" animation when copying files, the moving magnifying glass while searching, and so on.

I don't remember how to use it, but I think it's pretty simple. You just give it the name of the AVI file to play.
Thanx for the reply
I ll try
Aug 31 '07 #8
Robbie
180 100+
I'll attach a sample program I've just created, which demonstrates drawing a circle on the form using Sin and Cos. To use the sample, just run it and click in two different places on the form. It will draw a blue cross at the first place, then draw a circle around it, reaching to where you click the second time.
I know from programming in another language that you can draw 2 pictures - one of a button as it would normally be, and one of it when it is pressed down - then change the Picture of the PictureBox between them as the mouse is pressed and released, using those events and LoadPicture().

Your Sin/Cos can be adapted to get the colour of a pixel at one point and rotate it around by a certain number of degrees, then draw it again. This would be a very long-winded way, and probably introduce quite a lot of lag every time the picture is changed (because it would need to be rotated every time it's changed). It would also involve using a method similar to double-buffering, whereby you have 2 PictureBoxes but only 1 is visible; the first one would contain the original image which is having the colours of its pixels loooked at, and the second one (visible) is what the rotated pixels will be drawn onto.

I can't help with the sin/cos part, but I can help with getting the colour of a pixel, drawing a pixel, loading a new image file as the Picture for a PictureBox, and the double-buffering concept.

Now I'm not responsible if that all made no sense or typed weird typos, because it's 5:45 AM and I haven't been to sleep yet. ~_~"
Hopefully something useful can be made out of it ><
Sep 1 '07 #9
Killer42
8,435 Expert 8TB
Another thing to keep in mind. If your program has to generate the rotated images, you could do it once at startup and stash them in a bunch of picturebox controls or something. Then you won't have to worry about lag when displaying them.
Sep 2 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Ian Hubling | last post by:
I'm trying to complete a rotating banner ad within a page I have. The rotating add has four images that rotate in three-second increments. I've got the images to rotate ok - but now I want to go...
1
by: Sandy Bremmer | last post by:
I have seen many Javascripts that rotate images with each load or refresh of the page but so far all I've found require hard coding the image filename into the script. Does anyone know of a script...
1
by: Grunt | last post by:
Hi, I have been trying to put together a rotating banner. the code works but I am having a problem with the caching of the banner images. no matter what I try the page is constantly reloading the...
4
by: Roozbeh GHolizadeh | last post by:
Hi there... i think it is a very common problem but i dont know why i didnt find anything good for me on internet... i want to simply rotate an array with 90,180,270 degrees.... here is how...
2
by: mistral | last post by:
I want place custom text rotating around analogue clock. Here is javascript that is clise to my task: http://javascript.internet.com/time-date/mousetrailclock.html But it have a few...
4
by: Chris Shenton | last post by:
I set this up 3 days ago and have not seen any of the logs I've created this way being rotated. I expected them to rotate every midnight. I'm calling the code that uses this logger many times,...
3
by: Beamer | last post by:
Hi I am trying to build a roating slide effect in javascript. Basically, I have a list like below <ul id="slideShowCnt"> <li id="slide0"><img .../></li> <li id="slide0"><img .../></li> <li...
9
by: Kraken | last post by:
Hi, i have an assignment to open PPM images and prompt the user for either brightening, flipping or rotating the image. Ive done the brightening and flipping, but i cant get the rotating to work....
3
by: avalence | last post by:
Hello, I am trying to create a nice rotating earth globe (on mouse) on my web site, in order to display my professional relationships all over the world. The best way seems to be a javascript. In...
1
by: AR123 | last post by:
Hi I want to set up a rotating banner. Not sure how to incorporate my rotating banner code into the code below. I want the rotating banner to be the main feature image? This is set up in...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.