Connecting Tech Pros Worldwide Help | Site Map

common dialog!

John Lauwers
Guest
 
Posts: n/a
#1: Jul 17 '05

Hello,

Is there a way to move the commondialog to a specific position ?

Greets John


Rick Rothstein
Guest
 
Posts: n/a
#2: Jul 17 '05

re: common dialog!


> 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


John Lauwers
Guest
 
Posts: n/a
#3: Jul 17 '05

re: common dialog!


Ok, But does that work for the printerdialog??

Greets John

"Rick Rothstein" <rickNOSPAMnews@NOSPAMcomcast.net> schreef in bericht
news:ZYednTv45pbYd0iiRVn-gg@comcast.com...[color=blue][color=green]
> > Is there a way to move the commondialog to a specific position ?[/color]
>
> I believe this link covers the basics of what you want to do (although[/color]
from[color=blue]
> 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
>
>[/color]


Rick Rothstein
Guest
 
Posts: n/a
#4: Jul 17 '05

re: common dialog!


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" <nobody@fictief.com> wrote in message
news:3fd5eeef$0$2860$ba620e4c@reader1.news.skynet. be...[color=blue]
> Ok, But does that work for the printerdialog??
>
> Greets John
>
> "Rick Rothstein" <rickNOSPAMnews@NOSPAMcomcast.net> schreef in bericht
> news:ZYednTv45pbYd0iiRVn-gg@comcast.com...[color=green][color=darkred]
> > > Is there a way to move the commondialog to a specific position ?[/color]
> >
> > I believe this link covers the basics of what you want to do (although[/color]
> from[color=green]
> > 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
> >
> >[/color]
>
>[/color]


Randy Birch
Guest
 
Posts: n/a
#5: Jul 17 '05

re: common dialog!


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" <rickNOSPAMnews@NOSPAMcomcast.net> wrote in message
news:KaednXnpLLpnZ0iiRVn-iw@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" <nobody@fictief.com> wrote in message
: news:3fd5eeef$0$2860$ba620e4c@reader1.news.skynet. be...
: > Ok, But does that work for the printerdialog??
: >
: > Greets John
: >
: > "Rick Rothstein" <rickNOSPAMnews@NOSPAMcomcast.net> schreef in bericht
: > news:ZYednTv45pbYd0iiRVn-gg@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
: > >
: > >
: >
: >
:
:


John Lauwers
Guest
 
Posts: n/a
#6: Jul 17 '05

re: common dialog!


Ok thanks Randy and Rick, I will take the MSGPos and modify it so I can use
it with the commondialog.

Greets John


"Randy Birch" <rgb_removethis@mvps.org> schreef in bericht
news:5XsBb.560$kr2.516@news01.bloor.is.net.cable.r ogers.com...[color=blue]
> 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[/color]
using[color=blue]
> a windows hook. With some work it may be able to handle a VB common[/color]
control[color=blue]
> 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[/color]
can[color=blue]
> 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" <rickNOSPAMnews@NOSPAMcomcast.net> wrote in message
> news:KaednXnpLLpnZ0iiRVn-iw@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[/color]
code[color=blue]
> : 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" <nobody@fictief.com> wrote in message
> : news:3fd5eeef$0$2860$ba620e4c@reader1.news.skynet. be...
> : > Ok, But does that work for the printerdialog??
> : >
> : > Greets John
> : >
> : > "Rick Rothstein" <rickNOSPAMnews@NOSPAMcomcast.net> schreef in bericht
> : > news:ZYednTv45pbYd0iiRVn-gg@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[/color]
(although[color=blue]
> : > from
> : > > the write up, you'll have to modify it slightly to account placing[/color]
the[color=blue]
> : > > dialog box at a specific position rather than the center of the
> screen.
> : > >
> : > > http://www.mvps.org/vbnet/code/hooks...dlghookadv.htm
> : > >
> : > > Rick - MVP
> : > >
> : > >
> : >
> : >
> :
> :
>
>[/color]


Closed Thread