C# Forms Animation - c#

I'm wanting to create an animation in C# such as what you would see in a slot machine where the pictures spin round. I know I could manually move the location of a PictureBox or something like that but that seems like not a good idea to me.
How would you guys do it? It doesn't actually matter whether its in standard forms or WPF or anything else similar. Possibly using XNA?

I suggest you use WPF.
With Expression Blend you can easily do the animation you need.
I think I've already seen a slot machine WPF sample somewhere on the web.
I'll search for it and post it if I find it again
Edit
Nope it was a silverlight application, but code is almost the same. Here is the link:
http://www.dolittle.com/Silverlight/SlotMachine/SlotMachine.html
Anyway, if you find that approach to difficult I suggest you read a bit about simple WPF programatically driven animations. They're very easy to do, and with a few lines of code you can accomplish your needs.
Best regards

Related

Easiest way to add short animated images/videos to WPF

I am working on a Kinect project that requires me to prompt the user to perform gestures. I have the gesture recognition completed, but was wanting to do something a bit more fun then having the screen just say "JUMP!".
Is there a fairly painless way to add a short video, gif or something? I would obviously have to create these animations as well, but I am more concerned with adding them to the application once I have the animations.
The animations being played would have to change throughout the program, as I will be prompting the user to perform various gestures.
I am completely open to any ideas or suggestions you guys might have.
Thanks!
Decided to try mediaElement. Seems to be working. If anyone stumbles across this, it can easily be changed in C# by setting the source attribute.

schematic drawing sdk c#

Was wondering if anyone knew and or used a good sdk for drawing schematics for things such as a circuit boards. So something that will connect and draw lines between logical blocks. Main blocks I would need are a switch box an OR box and an AND box. I prefer it to work in C# because its mostly a windows gui based project, however I am willing to do it in C/C++ if there is a good reason too.
Just wondering if anyone has ran across something like this in the past, before I start trying to reinvent the wheel with my own code.
Thanks in advance!!

How to use XNA in WPF?

So... I want to make a game, and I want to write it in C#. In the past, I've made a mario clone using C++ and OpenGL. I quite like OpenGL, but I don't know how well it's supported inside C#/WPF. Also, it might be beneficial to use an actual game library? I guess XNA is the game library for C#, so maybe I'll invest a bit of time learning that.
However, I want to use WPF form controls for my level editor... is there any way that I can embed an XNA (DirectX?) window inside a WPF app?
Specifically, I don't need any buttons or things inside the XNA/DirectX widget, just around it, so no mixing required...just need to get a graphics widget in my WPF form.
Nick Gravelyn explains how to do it on his blog.
Although, if it's just for an editor, you may find using WinForms is easier and better supported.
First of all, you should ask this on gamedev.stackexchange.com. But I've seen a tutorial embedding XNA.
You should check this question and this page. They are on Windows Forms, but they'll help.
Also check this and this articles.
Keep in mind one thing. XNA is meant to be used for the whole game, integration would be useful on making level editors like you say, but not for a full game.
WPF uses DirectX, and you can do direct "interop" here is a codeProject article on the subject. Here is an article i dug up where the author is using win-forms and WPF controls in an XNA project. Might be worth a look for you.

How can I make a product showcase in Silverlight?

I can place a couple of buttons in Silverlight, but I'm not that experienced with the Silverlight tools and capabilities.
What do you think I should use to create something like this?
The control would have to pull and ID from the database and according to that place an image asociated with the record.
I need it to be animated with some crispy movement.
How can I achieve this?
It's all possible, but you need to break the task down into smaller steps.
Once you've done that you should find that you can solve some of these with your current knowledge, others will resolve themselves with a little more research, but there will be some you need to ask questions about here.
I'd suggest you start that break down and try to solve the little problems. Then if you get stuck come back and ask more specific questions.
Well, with Silverlight and c# you can make the animations needed and such, and you can set a Silverlight Image control with a data bound source, so it loads the images dynamically, but Silverlight can't talk with databases directly, you'll need to use a webservice to interact between Silverlight and the database. Don't know how much you know but to not leave anything out, with Expression Blend you can make the graphical part of you're app fast and easy, and with Visual Studio you'll add the code-behind and functionality.
In this link you can find a example of how to make an image slide show with Silverlight, it may not be exactly what you're looking for, but it should give you a heads start.

How to program this game with basic C# and ASP .NET knowledge?

I would love to brainstorm with you guys on how to program this game (originally a flash game) in C#. I'm studying C# right now and my knowledge is pretty limited: I know the pretty much the basics of C# but I need your help with the concept.
Here's the game:
http://www.composica.com/product/samples/AstroHops/content/scaler.html
alt text http://img12.imageshack.us/img12/5735/frogim3.jpg
I thought about using imagebutton for each lilypad that would trigger a modal window with question.
I also thought about placing a picture of a frog on each lilypad, set to visible = false. When the a certain lilypad is selected the frog's visibility will be set to true.
Any thoughts, ideas, suggestion on how to this better?
Maybe links to a similar game coded with c#?
Thanks!
ASP.NET (and HTML generally) isn't directly suited to compete with flash - they simply work differently. Perhaps look at Silverlight; that is the MS offering that is closest to flash, and you can use C#.
Marc solution seems like best one, but if you really need it in C# (in ASP.NET Right?)
then you might consider AJAX but yea it is sort of bad approach.
If it is winforms you are talking about, then i would consider using some 2d graphics engine for that. otherwise your idea CAN work with the default .net forms, it just wont look very nice....
you might take a look at this, seems like a nice start point for working with directX and c#
http://www.csharp-home.com/index/tiki-print_article.php?articleId=146
Good luck with your project!

Categories

Resources