Go Back   Forum Care Forums > Development Reference Area > Visual Basic

Reply
 
LinkBack Thread Tools Display Modes
common dialog!
Old
  (#1)
John Lauwers
Guest
 
Posts: n/a
Default common dialog! - 06-04-2007, 08:55 AM


Hello,

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

Greets John


   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: common dialog!
Old
  (#2)
Rick Rothstein
Guest
 
Posts: n/a
Default Re: common dialog! - 06-04-2007, 08:55 AM

> 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


   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: common dialog!
Old
  (#3)
John Lauwers
Guest
 
Posts: n/a
Default Re: common dialog! - 06-04-2007, 08:55 AM

Ok, But does that work for the printerdialog??

Greets John

"Rick Rothstein" <EMAIL REMOVED> schreef in bericht
news:ZYednTv45pbYd0iiRVn-EMAIL REMOVED...
> > 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
>
>



   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: common dialog!
Old
  (#4)
Rick Rothstein
Guest
 
Posts: n/a
Default Re: common dialog! - 06-04-2007, 08:55 AM

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" <EMAIL REMOVED> wrote in message
news:3fd5eeef$0$2860$EMAIL REMOVED. be...
> Ok, But does that work for the printerdialog??
>
> Greets John
>
> "Rick Rothstein" <EMAIL REMOVED> schreef in bericht
> news:ZYednTv45pbYd0iiRVn-EMAIL REMOVED...
> > > 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
> >
> >

>
>



   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: common dialog!
Old
  (#5)
Randy Birch
Guest
 
Posts: n/a
Default Re: common dialog! - 06-04-2007, 08:55 AM

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" <EMAIL REMOVED> wrote in message
news:KaednXnpLLpnZ0iiRVn-EMAIL REMOVED...
: 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" <EMAIL REMOVED> wrote in message
: news:3fd5eeef$0$2860$EMAIL REMOVED. be...
: > Ok, But does that work for the printerdialog??
: >
: > Greets John
: >
: > "Rick Rothstein" <EMAIL REMOVED> schreef in bericht
: > news:ZYednTv45pbYd0iiRVn-EMAIL REMOVED...
: > > > 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
: > >
: > >
: >
: >
:
:


   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: common dialog!
Old
  (#6)
John Lauwers
Guest
 
Posts: n/a
Default Re: common dialog! - 06-04-2007, 08:56 AM

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" <EMAIL REMOVED> schreef in bericht
news:5XsBb.560$EMAIL REMOVED ogers.com...
> 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" <EMAIL REMOVED> wrote in message
> news:KaednXnpLLpnZ0iiRVn-EMAIL REMOVED...
> : 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" <EMAIL REMOVED> wrote in message
> : news:3fd5eeef$0$2860$EMAIL REMOVED. be...
> : > Ok, But does that work for the printerdialog??
> : >
> : > Greets John
> : >
> : > "Rick Rothstein" <EMAIL REMOVED> schreef in bericht
> : > news:ZYednTv45pbYd0iiRVn-EMAIL REMOVED...
> : > > > 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
> : > >
> : > >
> : >
> : >
> :
> :
>
>



   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Contact Us - Forum Care Forums - Archive - Top