Creating an analog clock on C# - c#

I intend in creating a few analog clocks on Visual Studio 2008 (C#) for a school project, but I'm am still a bit unsure on how show I do it..
Should I import an image of a pointer and then add the codes to it to make it spin?
Or should I use some sort of code to actually draw the pointers and move them?
EDIT:
Been looking around the internet but I am not sure on how should I begin... never used any properties on how to actually draw something on C#, can someone tell me how should I proceed to make an analog clock?

It will be easier to draw the hands than to rotate images of the hands, especially since you will need one image for each hand and the images will conflict with each other.

However you choose to do the hands (images or xaml shapes) you'd then animate them with the RotateTransform Msdn has a sample too
You could also use databinding and a timer to change the rotation every second

Related

How can i make an overlay which can see whats on the screen?

I want to make an overlay which can analyse the screen and search for specific pictures on it. E.g in a game to see how much your invetory is worth or to count something in a picture.
Use OpenCV (with python, I would almost always prefer to do such tasks with python).
But if you have to do it using C#, then you need the C# OpenCV wrapper "Emgu CV".

How to rotate a panel in Windows Form using C#

This feels like it should be much easier to do than it is, but I've researched every link I could find and nothing works.
I'm trying to make an application for digital drawing. It floats above photoshop and appears with the middle click and gives me easy access to shortcuts, so it needs to be able to rotate 90 degrees for when I using my tablet landscape vs portrait.
The closest I got used bitmaps but of course then I can't press the buttons. Nothing using OnPaint and e.Graphics.Rotate and Matrixs have worked but I"m not sure if they were even supposed to work in this instance.
Apparently this is easy to do in WPF but I'm not going to rebuild it again for what would be the 4th time. If there is no way to cleanly rotate it (for some silly reason) then I'll probably just have to make an algorithm for switching the button functions and images and rotating them, or just duplicating the form and making rotated icons. Either way it's a big pain for what feels like what should be a base functionality.

Adding collision to .tmx

i recently downloaded "Tiled Map Editor" - because i heard it was a great tool for making maps. I also got a .tmx "compiler", well, something that made the .tmx usable in XNA.
I've created a map and imported it and it worked fine, but now the tricky part comes...
If i add a collision layer in "Tiled" and adds a tile that indicates block part, how would i get data and values, and how would i be able to use it in XNA? And how would i make so that the player spawns in a certain location, and also, how do i add things as events, and movable objects?
You don't have to tell me everything that, but it would be cool if you could give me an idea on how to get data and values from the .tmx and convert it into rectangles or such things^^
Thanks in advance!
I know nothing about tmx file but a little about collision.
I'm going to take a punt that your ".tmx "compiler"" is something that allows files of this type to be included in the content pipeline. Somewhere in this build process will be the vertex data that you can use to construct the collision primitives (shapes) for collision detection later.
ASIDE: it took me ages to get my head around the content pipeline - not for the faint hearted but the way to go. They are samples on the XNA website to get you going

Coordinate System in C#

I'm trying to make a coordinate system with some features in C#.
I never worked with C# but think it should be similar to other languages.
I'm not sure which element is suitable for that (Panel,PictureBox,....).
The requirements are:
I want zoom in and out
move the left/right/down/up there
I get values from a microcontroller and want paint them in real time
I'm using Visual Studio 2012.
I dont want use other dll/libraries or programms from other people.
Thx
PS:Maybe a simple tutorial would be also great.
I did the same thing using a simple Canvas in WPF. So I suggest you change your platform to WPF. Zoom in/out behavior can be done using a ScaleTransform and move left/right/... can be done using a TranslateTransform. No need to any library, you can use geometric types int wpf such as Path. And set the RenderTransform property of every path to these transform functions.

Animation effect in .NET?

Can someone point me to a C# open source implementaion with a simple image animations.
e.g. I feed the input image to animator, and the animation code produces a few dozen of images which if displayed sequentially looks like animation.
I am not something extremely fancy - a simple DirectX filter like animations would do.
You would be look for a sprite then? Microsoft has tutorials on this including:
http://msevents.microsoft.com/cui/WebCastEventDetails.aspx?culture=en-US&EventID=1032273446&CountryCode=US
and general graphics in C# here:
http://www.microsoft.com/events/series/msdnvisualcsharp.aspx?tab=webcasts
Hmmm... I'm not sure if this is what you want, but I've have created a library called Transitions that lets you animate most properties of UI controls easily. You could use it to move the position of pictures, transition between pictures or grow and shrink pictures. But I'm not sure that this is exactly the effects you're after? Anyway, if it's any help, my library is here:
http://code.google.com/p/dot-net-transitions/

Categories