Click here to Skip to main content
15,896,359 members
Home / Discussions / C#
   

C#

 
Questionhow about erasing trace of Rectangle? [modified] Pin
sonic74731-May-10 17:59
sonic74731-May-10 17:59 
AnswerRe: how about erasing trace of Rectangle? Pin
Stanciu Vlad31-May-10 21:53
Stanciu Vlad31-May-10 21:53 
GeneralRe: how about erasing trace of Rectangle? Pin
sonic74731-May-10 23:51
sonic74731-May-10 23:51 
GeneralRe: how about erasing trace of Rectangle? Pin
Stanciu Vlad1-Jun-10 0:37
Stanciu Vlad1-Jun-10 0:37 
AnswerRe: how about erasing trace of Rectangle? Pin
Pete O'Hanlon1-Jun-10 1:02
mvePete O'Hanlon1-Jun-10 1:02 
GeneralRe: how about erasing trace of Rectangle? Pin
sonic7471-Jun-10 2:12
sonic7471-Jun-10 2:12 
GeneralRe: how about erasing trace of Rectangle? Pin
Pete O'Hanlon1-Jun-10 2:37
mvePete O'Hanlon1-Jun-10 2:37 
QuestionUnhandled exception in the designer (OnPaint) Pin
AussieLew31-May-10 13:18
AussieLew31-May-10 13:18 
I have custom control that I drag from the ToolBox onto a form.

Some of the custom control properties are set in the control's Properties Window after the control
has been dropped onto the form.

These control properties eg BindingSource and DataGridView depend on a BindingSource and DataGridView attached to the form. (Either before or after this custom control)

As these properties are referenced (but not available) in the custom control's OnPaint method, a Null Reference Exception is raised in design mode as soon as the control is placed on the form and tries to paint itself.

What would be a friendlier way to remind the developer (me) that these properties are required to be set?

Should I just do a Try/Catch and not paint the complete control or maybe paint a blank control with text
saying what other properties are required.

I am the only one probably using this control so it is no real big deal, just a nuisance and doesn't seem to be the thing to do!

Interested in how it would/should normally be handled?
AnswerRe: Unhandled exception in the designer (OnPaint) Pin
Luc Pattyn31-May-10 13:30
sitebuilderLuc Pattyn31-May-10 13:30 
AnswerRe: Unhandled exception in the designer (OnPaint) Pin
Stanciu Vlad31-May-10 21:57
Stanciu Vlad31-May-10 21:57 
QuestionSerial interface RS-232 C# app data recive issue Pin
sebogawa31-May-10 9:32
sebogawa31-May-10 9:32 
AnswerRe: Serial interface RS-232 C# app data recive issue Pin
Luc Pattyn31-May-10 9:53
sitebuilderLuc Pattyn31-May-10 9:53 
AnswerRe: Serial interface RS-232 C# app data recive issue Pin
Richard Andrew x6431-May-10 11:14
professionalRichard Andrew x6431-May-10 11:14 
QuestionTime event? Real time data send Pin
sodevrom31-May-10 6:46
sodevrom31-May-10 6:46 
AnswerRe: Time event? Real time data send Pin
Luc Pattyn31-May-10 7:03
sitebuilderLuc Pattyn31-May-10 7:03 
GeneralRe: Time event? Real time data send Pin
sodevrom31-May-10 7:12
sodevrom31-May-10 7:12 
GeneralRe: Time event? Real time data send Pin
Luc Pattyn31-May-10 7:14
sitebuilderLuc Pattyn31-May-10 7:14 
GeneralRe: Time event? Real time data send Pin
sodevrom31-May-10 7:18
sodevrom31-May-10 7:18 
AnswerRe: Time event? Real time data send Pin
OriginalGriff31-May-10 9:59
mveOriginalGriff31-May-10 9:59 
AnswerRe: Time event? Real time data send Pin
Anthony Mushrow31-May-10 14:47
professionalAnthony Mushrow31-May-10 14:47 
AnswerRe: Time event? Real time data send Pin
Anthony Mushrow1-Jun-10 4:49
professionalAnthony Mushrow1-Jun-10 4:49 
Questionstyle button Pin
toba tavasoli31-May-10 5:09
toba tavasoli31-May-10 5:09 
AnswerRe: style button Pin
OriginalGriff31-May-10 5:12
mveOriginalGriff31-May-10 5:12 
AnswerRe: style button Pin
Abhinav S31-May-10 6:00
Abhinav S31-May-10 6:00 
AnswerRe: style button Pin
Smithers-Jones31-May-10 8:07
Smithers-Jones31-May-10 8:07 

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.