Click here to Skip to main content
15,902,027 members
Home / Discussions / C#
   

C#

 
GeneralRe: Net framework needed?? Pin
Heath Stewart3-Feb-04 8:55
protectorHeath Stewart3-Feb-04 8:55 
QuestionHow to draw X and Y axis? Pin
Member 18556083-Feb-04 3:06
Member 18556083-Feb-04 3:06 
AnswerRe: How to draw X and Y axis? Pin
Heath Stewart3-Feb-04 3:58
protectorHeath Stewart3-Feb-04 3:58 
GeneralRun .NET executable without the framework installed Pin
jvbragt3-Feb-04 2:51
jvbragt3-Feb-04 2:51 
GeneralRe: Run .NET executable without the framework installed Pin
Joel Lucsy3-Feb-04 2:53
Joel Lucsy3-Feb-04 2:53 
GeneralRe: Run .NET executable without the framework installed Pin
OmegaSupreme3-Feb-04 3:04
OmegaSupreme3-Feb-04 3:04 
GeneralRe: Run .NET executable without the framework installed Pin
Heath Stewart3-Feb-04 3:56
protectorHeath Stewart3-Feb-04 3:56 
GeneralRe: Run .NET executable without the framework installed Pin
TigerNinja_3-Feb-04 17:41
TigerNinja_3-Feb-04 17:41 
GeneralCreate a file and set the extended properties like companyname, comment, etc. Pin
jvbragt3-Feb-04 1:30
jvbragt3-Feb-04 1:30 
GeneralRe: Create a file and set the extended properties like companyname, comment, etc. Pin
Heath Stewart3-Feb-04 4:05
protectorHeath Stewart3-Feb-04 4:05 
GeneralRe: Create a file and set the extended properties like companyname, comment, etc. Pin
jvbragt3-Feb-04 4:18
jvbragt3-Feb-04 4:18 
GeneralRe: Create a file and set the extended properties like companyname, comment, etc. Pin
Heath Stewart3-Feb-04 6:00
protectorHeath Stewart3-Feb-04 6:00 
Generalmessage boxes Pin
ASGill3-Feb-04 1:29
ASGill3-Feb-04 1:29 
GeneralRe: message boxes Pin
sps-itsec463-Feb-04 2:09
sps-itsec463-Feb-04 2:09 
GeneralRe: message boxes Pin
thomasa3-Feb-04 2:22
thomasa3-Feb-04 2:22 
GeneralRe: message boxes Pin
dxhdxh3-Feb-04 3:10
dxhdxh3-Feb-04 3:10 
GeneralRe: message boxes Pin
Heath Stewart3-Feb-04 6:17
protectorHeath Stewart3-Feb-04 6:17 
GeneralRe: message boxes Pin
ASGill3-Feb-04 16:58
ASGill3-Feb-04 16:58 
GeneralRe: message boxes Pin
Heath Stewart3-Feb-04 18:04
protectorHeath Stewart3-Feb-04 18:04 
GeneralPrintPreviewDialog Pin
Anonymous3-Feb-04 1:16
Anonymous3-Feb-04 1:16 
GeneralRe: PrintPreviewDialog Pin
Heath Stewart3-Feb-04 4:18
protectorHeath Stewart3-Feb-04 4:18 
It's not that C# doesn't "know" this property, it's that it does not exist. C# is just one of many languages that target the CLR and uses the same assemblies in the same way as any other language can (though some language features - not class members - are not supported by all languages).

In this example you saw, either the author is wrong (like I said, the Zoom property doesn't exist) or he has created his own PrintPreviewDialog class, or he is using the PrintPreviewControl and either named it differently or hosted it in a dialog and is encapsulating the PrintPreviewControl.Zoom property. You could do the same thing.

The PrintPreviewControl does have a Zoom property but you must host this control in your own Form. One final way is to enumerate the PrintPreviewDialog.Controls property and find the PrintPreviewControl that it uses internally and then set the Zoom property on that, like so:
foreach (Control c in this.printPreviewDialog1.Controls)
{
  if (c is PrintPreviewControl)
  {
    ((PrintPreviewControl)c).Zoom = 2.0f;
  }
}


 

Microsoft MVP, Visual C#
My Articles
GeneralRe: PrintPreviewDialog Pin
Anonymous4-Feb-04 1:05
Anonymous4-Feb-04 1:05 
GeneralRe: PrintPreviewDialog Pin
Heath Stewart4-Feb-04 3:42
protectorHeath Stewart4-Feb-04 3:42 
GeneralRe: PrintPreviewDialog Pin
Anonymous4-Feb-04 4:07
Anonymous4-Feb-04 4:07 
GeneralSerialization of object references Pin
sps-itsec463-Feb-04 0:43
sps-itsec463-Feb-04 0:43 

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.