Problems with the PrintPreviewControl, PrintPreviewDialog controls

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

I have developed an application using VB.NET 2002 on windows XP. When I run
this application on Windows 98 SE, I get the exception "Object reference not
set to an instance of an object", while the page, I want to preview, is been
loaded to the PrintPreviewControl (or to the PrintPreviewDialog). The program
doesn't throw this exception on winXP and the page can be previewed.
Another problem I have, is that the printout I get (when the app. is tested
on WinXP), is not an exact copy of the previewed page. While the text on the
previewed page is centered and the result is perfect, the text on the
printout is moved to the right by some hundredths of an inch and the right
margin is diminished.
Does anynone know anything about these problems?

Thank u for your time
Panos
 
Panos,

When set this
dim a as whatever than you have created an address where a reference to an
whatever object can be placed in.

When you do this
dim a as New whatever, than you have created an object and the reference is
placed in a.

When you do this
a = Myproc() than when myproc is

Private function Myprob() as whatever
dim b as New whatever
return b
end function

Than you have set a reference in value a to an object whatever that you
created in myproc.

I hope this makes it a little bit clear?

Cor
 
Panos.

And I forget when that value a stays empty than you have
"Object reference not set to an instance of an object",

Cor
 
Cor,

This application is deployed to 2 machines, one running winXP and the other
one running win98SE. How come and only the last one throws this exception and
not the other?

Panos
 
Panos,

Than you are in trouble, because you cannot debug on a Win98 computer.

The only thing where I can than think about is that you you use a class
wherefore is not an underlaying OS part as by instance CDO, while that is
standard for W2000 computers. I am not direct aware of a table of those.

Cor
 
Back
Top