Problem is that code displays the API dialog, not the common control OCX
dialog. The API presents the WM_INITDIALOG message when it is about to be
displayed.
Karl has a demo in his site's samples section at
http://www.mvps.org/vb/
called movedmsg that shows how to reposition a standard VB message box using
a windows hook. With some work it may be able to handle a VB common control
printer dialog. I have the code for the API printer dialog together, but I
haven't added position hooking yet. And this is one complicated beast,
compared to other common dialogs, sue to the amount of information that can
be set and retrieved.
--
Randy Birch
MVP Visual Basic
http://www.mvps.org/vbnet/
Please respond only to the newsgroups so all can benefit.
"Rick Rothstein" <ri************@NOSPAMcomcast.net> wrote in message
news:Ka********************@comcast.com...
: It should... the CommonDialogBox is a container for several types of
dialog
: boxes with the Printer Dialog being only one, so I don't see why it
: wouldn't. Perhaps Randy Birch (it was his site I referenced) will come
along
: and confirm this; but you might want to just try it and see. Take his code
: as is and see if it centers your Printer Dialog Box... if it does, then
: modifying it as Randy indicates can be done will work also.
:
: Rick - MVP
:
:
: "John Lauwers" <no****@fictief.com> wrote in message
: news:3f**********************@reader1.news.skynet. be...
: > Ok, But does that work for the printerdialog??
: >
: > Greets John
: >
: > "Rick Rothstein" <ri************@NOSPAMcomcast.net> schreef in bericht
: > news:ZY********************@comcast.com...
: > > > Is there a way to move the commondialog to a specific position ?
: > >
: > > I believe this link covers the basics of what you want to do (although
: > from
: > > the write up, you'll have to modify it slightly to account placing the
: > > dialog box at a specific position rather than the center of the
screen.
: > >
: > >
http://www.mvps.org/vbnet/code/hooks...dlghookadv.htm
: > >
: > > Rick - MVP
: > >
: > >
: >
: >
:
: