Click here to Skip to main content
15,893,588 members
Home / Discussions / C#
   

C#

 
AnswerRe: why they don't show up Pin
Luc Pattyn20-Sep-10 15:02
sitebuilderLuc Pattyn20-Sep-10 15:02 
GeneralRe: why they don't show up Pin
neverpleat20-Sep-10 15:20
neverpleat20-Sep-10 15:20 
GeneralRe: why they don't show up Pin
Luc Pattyn20-Sep-10 15:36
sitebuilderLuc Pattyn20-Sep-10 15:36 
GeneralRe: why they don't show up [modified] Pin
neverpleat20-Sep-10 17:17
neverpleat20-Sep-10 17:17 
AnswerRe: why they don't show up Pin
Abhinav S20-Sep-10 18:17
Abhinav S20-Sep-10 18:17 
AnswerRe: why they don't show up Pin
phil.o21-Sep-10 0:08
professionalphil.o21-Sep-10 0:08 
Questionwhere to manage my picture box control Pin
Member 745530620-Sep-10 10:53
Member 745530620-Sep-10 10:53 
AnswerRe: where to manage my picture box control [modified] Pin
Luc Pattyn20-Sep-10 11:38
sitebuilderLuc Pattyn20-Sep-10 11:38 
Hi Steve,

I have several comments:

1.
PictureBox is a pretty stupid Control capable of showing an existing image. As soon as something more complex is required (such as scaling the picture AND painting a capture rectangle on top of it), it becomes a real pain.
As you are not taking advantage of the few actual PictureBox capabilities, you'd better not use one at all. A simple Panel also can be drawn upon.

2.
Whatever Control you choose, in WinForms all drawing should occur in the Paint handler, and CreateGraphics is to be avoided. You may want and read this little article[^].

3.
You may also be interested in this thread[^], where something similar is going on. I will add messages in that thread later on.

[ADDED]
And I forgot to answer some questions:

you do not pass the PictureBox (or any other GUI thing) to the ECG class; the ECG class represents an ECG, and is not interested in your current way of viewing an ECG. You may choose a different view later on, which would cause the ECG class to need changes.

The correct way would be to provide the new data (an ECG object) to your viewer, which is either your current app's Form, or some specialized Control, maybe an instance of some EcgViewer class, which could derive from UserControl. If your viewer isn't a specialized viewer, then it would not understand ECG objects, and what you pass from one to the other has to be dumbed down, maybe just a Bitmap could do. Or you could create an Interface, that is a contract between producers (such as ECG) and consumers (such as your viewer).

If your data is dynamic (i.e. rather than passing a full ECG or a full image, you pass a life something), then your app fits the requirements mentioned in the link I provided.
[/ADDED]

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.


modified on Monday, September 20, 2010 6:02 PM

QuestionWPF Database Wrapping Pin
eddieangel20-Sep-10 6:25
eddieangel20-Sep-10 6:25 
AnswerRe: WPF Database Wrapping Pin
Chris Trelawny-Ross20-Sep-10 9:19
Chris Trelawny-Ross20-Sep-10 9:19 
GeneralRe: WPF Database Wrapping Pin
eddieangel20-Sep-10 10:49
eddieangel20-Sep-10 10:49 
AnswerRe: WPF Database Wrapping Pin
Patrick Fox20-Sep-10 9:24
Patrick Fox20-Sep-10 9:24 
QuestionA question on SOAP and web services Pin
Dewald20-Sep-10 4:04
Dewald20-Sep-10 4:04 
AnswerRe: A question on SOAP and web services Pin
Pete O'Hanlon20-Sep-10 4:54
mvePete O'Hanlon20-Sep-10 4:54 
AnswerRe: A question on SOAP and web services Pin
T M Gray20-Sep-10 11:47
T M Gray20-Sep-10 11:47 
QuestionHow to find all the rectangle in point collection ? Pin
Yanshof20-Sep-10 2:50
Yanshof20-Sep-10 2:50 
AnswerRe: How to find all the rectangle in point collection ? Pin
DaveyM6920-Sep-10 4:07
professionalDaveyM6920-Sep-10 4:07 
Questionprocess.start and sc delete servicename Pin
tomorrow_ft20-Sep-10 0:53
tomorrow_ft20-Sep-10 0:53 
AnswerRe: process.start and sc delete servicename Pin
tomorrow_ft20-Sep-10 1:06
tomorrow_ft20-Sep-10 1:06 
AnswerRe: process.start and sc delete servicename Pin
Pete O'Hanlon20-Sep-10 1:09
mvePete O'Hanlon20-Sep-10 1:09 
QuestionC# Seeing Through Objects Pin
C.CoderCreator19-Sep-10 20:49
C.CoderCreator19-Sep-10 20:49 
AnswerRe: C# Seeing Through Objects Pin
#realJSOP19-Sep-10 23:44
mve#realJSOP19-Sep-10 23:44 
GeneralRe: C# Seeing Through Objects Pin
C.CoderCreator19-Sep-10 23:58
C.CoderCreator19-Sep-10 23:58 
GeneralRe: C# Seeing Through Objects Pin
Dave Kreskowiak20-Sep-10 1:56
mveDave Kreskowiak20-Sep-10 1:56 
AnswerRe: C# Seeing Through Objects Pin
PIEBALDconsult20-Sep-10 3:12
mvePIEBALDconsult20-Sep-10 3:12 

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.