Click here to Skip to main content
15,919,121 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionCalling WPF pages in VC++ Pin
kDevloper27-Oct-09 18:37
kDevloper27-Oct-09 18:37 
Questionvb.net handles clause requires a withevents variable Pin
User 540919027-Oct-09 11:12
User 540919027-Oct-09 11:12 
QuestionCLR Profiler - too many objects??? Pin
Member 332970027-Oct-09 8:12
Member 332970027-Oct-09 8:12 
AnswerRe: CLR Profiler - too many objects??? Pin
Member 332970027-Oct-09 22:54
Member 332970027-Oct-09 22:54 
QuestionGDI+ drawing - invalidate big rectangle in one user control then invalidate another user control (problem with big rectangle) [modified] Pin
rudozkv_new27-Oct-09 8:11
rudozkv_new27-Oct-09 8:11 
GeneralRe: GDI+ drawing - invalidate big rectangle in one user control then invalidate another user control (problem with big rectangle) Pin
Henry Minute27-Oct-09 10:51
Henry Minute27-Oct-09 10:51 
GeneralRe: GDI+ drawing - invalidate big rectangle in one user control then invalidate another user control (problem with big rectangle) Pin
rudozkv_new27-Oct-09 22:36
rudozkv_new27-Oct-09 22:36 
AnswerRe: GDI+ drawing - invalidate big rectangle in one user control then invalidate another user control (problem with big rectangle) Pin
freakyit27-Oct-09 21:35
freakyit27-Oct-09 21:35 
cheers,

first of all i'm wondering why you create your own graphics object at each run of OnPaint, beware because you need to destroy your created object with graph.Dispose().. and the PaintEventArgs already gives you the Graphic object!! graph = e.Graphics!!

second the OnPaint Method will run if your Form or Control you are overriding the OnPaint will repaint.
To draw an image of the Grid do not use the OnPaint method on the Form! here you would paint something for the grid and not for subcontrols.. Create a Function GetGridImage() or some like.. that you will call if you want to get an net image of the grid..

third in the Scroll.OnPaint you can call Invalidate for the Owner Control to force the re-draw, please take a look at some usercontrols created from other users here to understand how to use the OnPaint methods.. in your Case the OnPaint will nothing paint on the grid so this is nesty! the function will be called every time you move your mouse or the owner control will be repainted.


hope i could help!

bless
GeneralRe: GDI+ drawing - invalidate big rectangle in one user control then invalidate another user control (problem with big rectangle) Pin
rudozkv_new27-Oct-09 22:35
rudozkv_new27-Oct-09 22:35 
GeneralRe: GDI+ drawing - invalidate big rectangle in one user control then invalidate another user control (problem with big rectangle) Pin
freakyit27-Oct-09 23:01
freakyit27-Oct-09 23:01 
GeneralRe: GDI+ drawing - invalidate big rectangle in one user control then invalidate another user control (problem with big rectangle) Pin
rudozkv_new27-Oct-09 23:18
rudozkv_new27-Oct-09 23:18 
GeneralRe: GDI+ drawing - invalidate big rectangle in one user control then invalidate another user control (problem with big rectangle) Pin
freakyit27-Oct-09 23:34
freakyit27-Oct-09 23:34 
GeneralRe: GDI+ drawing - invalidate big rectangle in one user control then invalidate another user control (problem with big rectangle) Pin
rudozkv_new28-Oct-09 3:16
rudozkv_new28-Oct-09 3:16 
GeneralRe: GDI+ drawing - invalidate big rectangle in one user control then invalidate another user control (problem with big rectangle) Pin
freakyit29-Oct-09 1:13
freakyit29-Oct-09 1:13 
AnswerRe: GDI+ drawing - invalidate big rectangle in one user control then invalidate another user control (problem with big rectangle) Pin
rudozkv_new28-Oct-09 23:09
rudozkv_new28-Oct-09 23:09 
Questionc#.net Pin
Amit Spadez26-Oct-09 23:38
professionalAmit Spadez26-Oct-09 23:38 
AnswerRe: c#.net Pin
Shameel26-Oct-09 23:59
professionalShameel26-Oct-09 23:59 
GeneralRe: c#.net Pin
Amit Spadez27-Oct-09 0:03
professionalAmit Spadez27-Oct-09 0:03 
GeneralRe: c#.net Pin
Covean27-Oct-09 0:16
Covean27-Oct-09 0:16 
GeneralRe: c#.net Pin
Amit Spadez27-Oct-09 0:17
professionalAmit Spadez27-Oct-09 0:17 
GeneralRe: c#.net Pin
Covean27-Oct-09 0:20
Covean27-Oct-09 0:20 
GeneralRe: c#.net Pin
Amit Spadez27-Oct-09 0:24
professionalAmit Spadez27-Oct-09 0:24 
GeneralRe: c#.net Pin
Covean27-Oct-09 0:34
Covean27-Oct-09 0:34 
QuestionTabbed ListBox in a Web Page Pin
MarkyMark196126-Oct-09 8:21
MarkyMark196126-Oct-09 8:21 
AnswerRe: Tabbed ListBox in a Web Page Pin
Not Active26-Oct-09 8:31
mentorNot Active26-Oct-09 8:31 

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.