Click here to Skip to main content
15,911,360 members
Home / Discussions / C#
   

C#

 
Question,activeform Pin
tonato84811-Dec-05 17:35
tonato84811-Dec-05 17:35 
QuestionSql Connection... Pin
ayuba asia11-Dec-05 17:26
ayuba asia11-Dec-05 17:26 
AnswerRe: Sql Connection... Pin
Christian Graus11-Dec-05 17:41
protectorChristian Graus11-Dec-05 17:41 
GeneralRe: Sql Connection... Pin
flicktom12-Dec-05 9:25
flicktom12-Dec-05 9:25 
GeneralRe: Sql Connection... Pin
ayuba asia12-Dec-05 21:08
ayuba asia12-Dec-05 21:08 
QuestionDrawing on a form Pin
monrobot1311-Dec-05 14:26
monrobot1311-Dec-05 14:26 
AnswerRe: Drawing on a form Pin
Christian Graus11-Dec-05 14:28
protectorChristian Graus11-Dec-05 14:28 
GeneralRe: Drawing on a form Pin
monrobot1311-Dec-05 15:02
monrobot1311-Dec-05 15:02 
[EDIT]I'm just come up on a much bigger problem, that I'm not sure how I missed and maybe you could help me with it. It appears that the UserControl isn't being added to the TabControl. Here's my code for that, which I assume will fix my other problem since I'll now be able to actually see the control. PdsContainer is the TabControl and PdsPage is my UserControl
PdsPage testPage = new PdsPage (DateTime.Now);
PdsContainer.TabPages.Add ("Page1", testPage.Title);
PdsContainer.TabPages[0].Controls.Add (testPage);


Alright. I threw my bad idea out the window, took your good advice and implemented my drawing in the OnPaint handler, but I'm still not getting anything to draw on the window. Here's the code so maybe you could point out what I'm doing wrong.
Pen greenPen = new Pen (Color.GreenYellow, 5);
Point point1 = new Point (16, 129);
Point point2 = new Point (333, 129);
e.Graphics.DrawLine (greenPen, point1, point2);
Refresh ();
I tried it with and without that Refresh cause I wasn't sure if I needed it. This code is in the OnPaint handler of a UserControl that is added to a TabControl at runtime in case that helps.

Thanks for the help.

- Aaron

-- modified at 21:04 Sunday 11th December, 2005
GeneralRe: Drawing on a form Pin
Christian Graus11-Dec-05 15:04
protectorChristian Graus11-Dec-05 15:04 
GeneralRe: Drawing on a form Pin
monrobot1311-Dec-05 15:10
monrobot1311-Dec-05 15:10 
GeneralRe: Drawing on a form Pin
Christian Graus11-Dec-05 15:13
protectorChristian Graus11-Dec-05 15:13 
GeneralRe: Drawing on a form Pin
monrobot1311-Dec-05 15:20
monrobot1311-Dec-05 15:20 
GeneralRe: Drawing on a form Pin
Christian Graus11-Dec-05 15:24
protectorChristian Graus11-Dec-05 15:24 
GeneralRe: Drawing on a form Pin
monrobot1311-Dec-05 15:32
monrobot1311-Dec-05 15:32 
GeneralRe: Drawing on a form Pin
Christian Graus11-Dec-05 15:37
protectorChristian Graus11-Dec-05 15:37 
GeneralRe: Drawing on a form Pin
monrobot1311-Dec-05 15:45
monrobot1311-Dec-05 15:45 
GeneralRe: Drawing on a form Pin
Christian Graus11-Dec-05 15:48
protectorChristian Graus11-Dec-05 15:48 
GeneralRe: Drawing on a form Pin
monrobot1311-Dec-05 15:54
monrobot1311-Dec-05 15:54 
GeneralRe: Drawing on a form Pin
Christian Graus11-Dec-05 15:58
protectorChristian Graus11-Dec-05 15:58 
QuestionWindows CE.Net 4.2 Pin
ayuba asia11-Dec-05 12:56
ayuba asia11-Dec-05 12:56 
QuestionPlay mp3 on Pocket PC using C# Pin
parispo911-Dec-05 12:08
parispo911-Dec-05 12:08 
QuestionModify a form's control properties from a class Pin
carlossan11-Dec-05 11:03
carlossan11-Dec-05 11:03 
AnswerRe: Modify a form's control properties from a class Pin
Curtis Schlak.11-Dec-05 11:50
Curtis Schlak.11-Dec-05 11:50 
QuestionHow to merge two datasets? Pin
Lexa198311-Dec-05 8:28
Lexa198311-Dec-05 8:28 
AnswerRe: How to merge two datasets? Pin
Guffa11-Dec-05 9:58
Guffa11-Dec-05 9:58 

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.