Click here to Skip to main content
15,887,931 members
Home / Discussions / C#
   

C#

 
QuestionCopying data from Oracle to Access Pin
oliver@GVA1-Sep-05 1:35
oliver@GVA1-Sep-05 1:35 
QuestionCombobox Tag Pin
PHDENG811-Sep-05 1:30
PHDENG811-Sep-05 1:30 
AnswerRe: Combobox Tag Pin
Mohamad Al Husseiny1-Sep-05 2:43
Mohamad Al Husseiny1-Sep-05 2:43 
GeneralRe: Combobox Tag Pin
PHDENG811-Sep-05 4:22
PHDENG811-Sep-05 4:22 
GeneralRe: Combobox Tag Pin
mav.northwind1-Sep-05 6:35
mav.northwind1-Sep-05 6:35 
GeneralRe: Combobox Tag Pin
Mohamad Al Husseiny1-Sep-05 8:16
Mohamad Al Husseiny1-Sep-05 8:16 
QuestionCurves and Angles Pin
suresh sahu1-Sep-05 1:22
suresh sahu1-Sep-05 1:22 
AnswerRe: Curves and Angles Pin
Andrew Kirillov1-Sep-05 3:09
Andrew Kirillov1-Sep-05 3:09 
Hello

After some methematics recall here is the code:

int	length = int.Parse(lengthBox.Text);
float	angleDeg = Math.Max(0.0f, Math.Min(90.0f, float.Parse(angleBox.Text)));
float	angleRad = angleDeg * (float)(Math.PI / 180);

Graphics	g = this.CreateGraphics();
Pen	pen = new Pen(Color.Red, 1);

int	x = 10;
int	y = 150;

// draw line
g.DrawLine(pen, x, y, x + length, y);
// get circle radius
int r = (int) (((double) length / 2) / Math.Sin(angleRad));
//
int h = (int) (Math.Cos(angleRad) * r);
// draw arc
g.DrawArc(pen, x - (r - length / 2), y - (r - h), r * 2, r * 2, -90 + angleDeg, -2 * angleDeg);
//
pen.Dispose();
g.Dispose();


With best regards,
Andrew
GeneralRe: Curves and Angles Pin
Nageshwar Rao1-Sep-05 5:56
Nageshwar Rao1-Sep-05 5:56 
GeneralRe: Curves and Angles Pin
Anonymous1-Sep-05 5:56
Anonymous1-Sep-05 5:56 
QuestionInterbase databse Pin
Virendrak1-Sep-05 1:02
Virendrak1-Sep-05 1:02 
QuestionProblem in Viewing data from DataGrid Pin
Dhruvesh Brahmbhatt1-Sep-05 0:44
Dhruvesh Brahmbhatt1-Sep-05 0:44 
QuestionSorting a DataView by an int[] list Pin
thomasa31-Aug-05 21:52
thomasa31-Aug-05 21:52 
AnswerRe: Sorting a DataView by an int[] list Pin
thomasa31-Aug-05 22:51
thomasa31-Aug-05 22:51 
QuestionMS Word add-in install problem Pin
parviz_rashidi31-Aug-05 21:17
parviz_rashidi31-Aug-05 21:17 
QuestionHow can I link a listbox to a picturebox in C#.net?please help... Pin
azizkhani31-Aug-05 20:41
azizkhani31-Aug-05 20:41 
QuestionPlease help.. Pin
KORCARI31-Aug-05 19:30
KORCARI31-Aug-05 19:30 
AnswerRe: Please help.. Pin
Stefan Troschuetz31-Aug-05 21:11
Stefan Troschuetz31-Aug-05 21:11 
QuestionAudio streaming Pin
Cheezo31-Aug-05 17:33
Cheezo31-Aug-05 17:33 
QuestionRead URL Link from Managed Code? Pin
ehollar31-Aug-05 15:24
ehollar31-Aug-05 15:24 
QuestionVisual Studio Designer Pin
Eric Lacroix31-Aug-05 13:55
Eric Lacroix31-Aug-05 13:55 
QuestionInputBox Pin
kenexcelon31-Aug-05 13:42
kenexcelon31-Aug-05 13:42 
AnswerRe: InputBox Pin
Werdna31-Aug-05 13:46
Werdna31-Aug-05 13:46 
AnswerRe: InputBox Pin
kenexcelon31-Aug-05 14:21
kenexcelon31-Aug-05 14:21 
QuestionHow can I call static method using late binding Pin
Johny Ng31-Aug-05 12:50
Johny Ng31-Aug-05 12:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.