Click here to Skip to main content
15,909,498 members
Home / Discussions / C#
   

C#

 
QuestionDrawing twice causes exception? Pin
Pain_Elemental29-Jul-04 9:34
Pain_Elemental29-Jul-04 9:34 
AnswerRe: Drawing twice causes exception? Pin
Heath Stewart29-Jul-04 9:42
protectorHeath Stewart29-Jul-04 9:42 
GeneralRe: Drawing twice causes exception? Pin
Pain_Elemental29-Jul-04 20:26
Pain_Elemental29-Jul-04 20:26 
GeneralRe: Drawing twice causes exception? Pin
Heath Stewart30-Jul-04 3:13
protectorHeath Stewart30-Jul-04 3:13 
GeneralRe: Drawing twice causes exception? Pin
Pain_Elemental30-Jul-04 3:34
Pain_Elemental30-Jul-04 3:34 
GeneralRe: Drawing twice causes exception? Pin
Pain_Elemental30-Jul-04 10:37
Pain_Elemental30-Jul-04 10:37 
GeneralDifferent behavior on different machines Pin
DougW4829-Jul-04 9:22
DougW4829-Jul-04 9:22 
GeneralRe: Different behavior on different machines Pin
Heath Stewart29-Jul-04 9:36
protectorHeath Stewart29-Jul-04 9:36 
First off, please don't address me personally. I'm flattered, but it's not very nice to others with good answers like Nick and Dave and others that show up from time to time.

Second, keep in mind that the .NET Framework - while the same on all Windows platforms (save the differences between Windows and Windows NT, like the FileSystemWatcher component that doesn't work on Windows), they rely on underlying system components like Windows Common Controls. Differences in the system there can make a little difference, though not as drastic as what you described with the positioned Button.

When it comes to positioning, the most common culprit is the DPI (dots per inch, sometimes refered to as PPI or pixels per inch). The difference in DPI affects how elements are positioned. As much as I hate VB (version 6 and below), it did get this right; it used twips, which is a logical unit (i.e., inches, points, centimeters, etc.). .NET uses pixels.

If you search the C# forum, you'll find several threads where I've posted more information about this including a snippet of code I use when necessary.

Other differences in behavior could be because you're using a debug build where another machine is using the release build. Debug builds are typically slower (not always true, but most often true). It could also be because you have some APIs (native functions, COM libraries, etc.) that you're P/Invoking or RCW'ing (it's a verb now, I say! Smile | :) ) that others don't have. Keep in mind when you deploy RCWs (interop assemblies), the corresponding COM libraries must be present as well (not necessarily the same version, but a version of the typelib and implementing COM server that uses the same CLSIDs and IIDs, assuming the COM server is written correctly).

For all these reasons, that's why companies test in large test bays with a multitude of different hardware and software configurations.

Also, before some *nix zealot jumps in and says "switch to linux", the same is true for linux and other *nix flavors as well. *nix solves DLL hell by using symbolic links but still requires that a library to which an executable was bound be installed on the platform.

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: Different behavior on different machines Pin
DougW4829-Jul-04 9:59
DougW4829-Jul-04 9:59 
GeneralCryptography Pin
Wender Oliveira29-Jul-04 9:14
Wender Oliveira29-Jul-04 9:14 
GeneralRe: Cryptography Pin
Heath Stewart29-Jul-04 9:22
protectorHeath Stewart29-Jul-04 9:22 
Questioncontrol InvokeRequired() always necessary? Pin
vista2729-Jul-04 8:32
vista2729-Jul-04 8:32 
AnswerRe: control InvokeRequired() always necessary? Pin
Judah Gabriel Himango29-Jul-04 8:58
sponsorJudah Gabriel Himango29-Jul-04 8:58 
AnswerRe: control InvokeRequired() always necessary? Pin
Nick Parker29-Jul-04 9:07
protectorNick Parker29-Jul-04 9:07 
GeneralRe: control InvokeRequired() always necessary? Pin
Heath Stewart29-Jul-04 9:13
protectorHeath Stewart29-Jul-04 9:13 
GeneralRe: control InvokeRequired() always necessary? Pin
Nick Parker29-Jul-04 9:28
protectorNick Parker29-Jul-04 9:28 
GeneralRe: control InvokeRequired() always necessary? Pin
Heath Stewart29-Jul-04 9:39
protectorHeath Stewart29-Jul-04 9:39 
GeneralRe: control InvokeRequired() always necessary? Pin
Judah Gabriel Himango29-Jul-04 9:39
sponsorJudah Gabriel Himango29-Jul-04 9:39 
AnswerRe: control InvokeRequired() always necessary? Pin
Heath Stewart29-Jul-04 9:16
protectorHeath Stewart29-Jul-04 9:16 
GeneralInstantiating an array of objects Pin
crushinghellhammer29-Jul-04 8:11
crushinghellhammer29-Jul-04 8:11 
GeneralRe: Instantiating an array of objects Pin
Nick Parker29-Jul-04 9:11
protectorNick Parker29-Jul-04 9:11 
GeneralRe: Instantiating an array of objects Pin
crushinghellhammer29-Jul-04 9:32
crushinghellhammer29-Jul-04 9:32 
GeneralRe: Instantiating an array of objects Pin
Nick Parker29-Jul-04 10:11
protectorNick Parker29-Jul-04 10:11 
GeneralWM_PRINT for themed controls Pin
Mathew Hall29-Jul-04 6:31
Mathew Hall29-Jul-04 6:31 
GeneralRe: WM_PRINT for themed controls Pin
Heath Stewart29-Jul-04 9:25
protectorHeath Stewart29-Jul-04 9:25 

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.