I want to rotate the line according to the angle that i input.
how can i create a rotating line using c#?
Collapse
X
-
-
-
You can also use GDI+ or XNA. It really depends on your application.
GDI+ is the WinForms graphics package.
XNA is more of a Game/Graphical programming package.
WPF could be though of as something like Flash for Windows Applications.
What you need depends on what you've got now, and what you want to accomplish. Do you have any information about what you're wanting to do?Comment
-
You can also use GDI+ or XNA. It really depends on your application.
GDI+ is the WinForms graphics package.
XNA is more of a Game/Graphical programming package.
WPF could be though of as something like Flash for Windows Applications.
What you need depends on what you've got now, and what you want to accomplish. Do you have any information about what you're wanting to do?
As the first step, digital voltage is displayed in a textbox. I need to rotate the pointer according to textbox value.Comment
-
You can also use GDI+ or XNA. It really depends on your application.
GDI+ is the WinForms graphics package.
XNA is more of a Game/Graphical programming package.
WPF could be though of as something like Flash for Windows Applications.
What you need depends on what you've got now, and what you want to accomplish. Do you have any information about what you're wanting to do?
As the first step, digital voltage is displayed in a textbox. I need to rotate the pointer according to textbox value.Comment
-
So either Ensa and Nimalika are the same person using two different accounts or they are two students working on the same homework assignment. Either way, I have merged their threads since they are asking the exact same question.
Either way, GaryTexmo has pointed you at some good information.
Drawing a line is very straightforward and explained in the MSDN
You will have to use some 8th grade math skills to calculate the angle based on the size of your meter. If your meter is from 0 to 100 volts over 45 degrees of arc, the angle for 50volts will be different than if you meter is from 0 to 240 volts over 70 degrees of arc. So nobody here is going to be able to tell you how to do it.
Bytes has a policy regarding assisting students with their homework.
The short version is that the volunteers here can't help you with schoolwork.
A) We don't know what material you have and have not learned in class.
B) We don't know the guidelines you must follow.
C) In the long run giving you the answers actually short changes your education.
Hint 1: Try hitting Google with terms of your programming language and primary terms of what you want to do. For example "C# custom events" or "VB datagrid Excel". I've found this to be a very effective tool.
Hint 2: Your text book
Hint 3: Your instructor
Hint 4: Posting guidelines regarding homework assignments.Comment
-
Haha busted!
Well, you might as well learn something new while you're at it. This smells like a great opportunity for a user control. Try a google search on "C# User Control" to find some great resources.
The end result here is you'll be able to make something you can drop down on the designer (like a button or a text box), set some designer properties, and away you go.
Just because it's an assignment doesn't mean you can't do something cool with it :)Comment
Comment