Click here to Skip to main content
16,005,339 members
Home / Discussions / C#
   

C#

 
AnswerRe: find date in a string Pin
Guffa11-Nov-06 22:38
Guffa11-Nov-06 22:38 
GeneralRe: find date in a string Pin
mohanrajh18-Nov-06 0:28
mohanrajh18-Nov-06 0:28 
QuestionI'm going mad - How to exit the proggy Pin
Glen Harvy11-Nov-06 13:18
Glen Harvy11-Nov-06 13:18 
AnswerRe: I'm going mad - How to exit the proggy Pin
Judah Gabriel Himango11-Nov-06 16:40
sponsorJudah Gabriel Himango11-Nov-06 16:40 
AnswerRe: I'm going mad - How to exit the proggy Pin
stano11-Nov-06 16:59
stano11-Nov-06 16:59 
AnswerRe: I'm going mad - How to exit the proggy Pin
Glen Harvy11-Nov-06 22:18
Glen Harvy11-Nov-06 22:18 
QuestionHow to pass parameter to CrystalReports ? Pin
hdv21211-Nov-06 10:44
hdv21211-Nov-06 10:44 
QuestionRepainting a control when the background image changes... [modified] Pin
new_phoenix11-Nov-06 10:01
new_phoenix11-Nov-06 10:01 
I was looking for an approach to repaint a rectangle included on top of a control in the paint event handler. The paint event handler normally paints the whole control. If there is a rectangle on top of the custom control in the paint event handler that changes based upon which background image is provided for the control, how could I repaint that rectangle?

With Amar's assistance I was able to create and retrieve an extended property for the customized user control. Thus, the background image can be changed. However, now I need the rectangle in the paint event handler to be forcibly repainted.

I tried the ctrl.Invalidate() and ctrl.Refresh() and ctrl.Update methods in the _ctrl_BackgroundImageChanged(object sender, EventArgs e) event handler, but these approaches did not work. Any suggestions on how to repaint the clientRectangle that was created in the _ctrl_Paint event handler from the _ctrl_BackgroundImageChanged event handler?

I even tried to do the following:

public static Rectangle clientRectangle

private static void _ctrl_BackgroundImageChanged(object sender, EventArgs e)
{
   Control ctrl = ((Control)sender);
   ctrl.Invalidate(clientRectangle, true);
   ctrl.Update();
   ctrl.Refresh();  // supposedly calls both previous two statements
}


How do I repaint the entire control and any rectangle objects attached to the control?

Confused | :confused: Confused | :confused: Confused | :confused:




-- modified at 17:09 Saturday 11th November, 2006
Questionplz help Pin
suma1238211-Nov-06 9:55
suma1238211-Nov-06 9:55 
AnswerRe: plz help Pin
Guffa11-Nov-06 10:09
Guffa11-Nov-06 10:09 
GeneralRe: plz help Pin
suma1238211-Nov-06 10:24
suma1238211-Nov-06 10:24 
GeneralRe: plz help Pin
Guffa11-Nov-06 12:28
Guffa11-Nov-06 12:28 
GeneralRe: plz help Pin
suma1238211-Nov-06 23:13
suma1238211-Nov-06 23:13 
GeneralRe: plz help Pin
Guffa11-Nov-06 23:25
Guffa11-Nov-06 23:25 
GeneralRe: plz help Pin
suma1238212-Nov-06 1:28
suma1238212-Nov-06 1:28 
QuestionXML (again) - namespaces and adding/modifying elements Pin
peterchen11-Nov-06 9:10
peterchen11-Nov-06 9:10 
QuestionSimple paint app - problem saving Pin
SoftcodeSoftware11-Nov-06 8:34
SoftcodeSoftware11-Nov-06 8:34 
AnswerRe: Simple paint app - problem saving Pin
aamironline11-Nov-06 18:13
aamironline11-Nov-06 18:13 
AnswerRe: Simple paint app - problem saving Pin
mav.northwind11-Nov-06 20:36
mav.northwind11-Nov-06 20:36 
AnswerRe: Simple paint app - problem saving Pin
SoftcodeSoftware11-Nov-06 22:02
SoftcodeSoftware11-Nov-06 22:02 
QuestionProblem with Connect to SqlServer 2000 From Client Pin
hdv21211-Nov-06 8:13
hdv21211-Nov-06 8:13 
AnswerRe: Problem with Connect to SqlServer 2000 From Client Pin
coolestCoder11-Nov-06 21:41
coolestCoder11-Nov-06 21:41 
AnswerRe: Problem with Connect to SqlServer 2000 From Client Pin
beatles169211-Nov-06 22:49
beatles169211-Nov-06 22:49 
QuestionPlz compile Pin
Friend4u11-Nov-06 6:24
Friend4u11-Nov-06 6:24 
AnswerRe: Plz compile Pin
User 665811-Nov-06 6:36
User 665811-Nov-06 6:36 

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.