common dialog!

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Lauwers

    common dialog!


    Hello,

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

    Greets John


  • Rick Rothstein

    #2
    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.

    VBnet provides Intermediate and Advanced Win32 API code for VB developers. Comprehensive Code, FAQ, Developers Resources & News, alphabetical API/Type/Constant/Method Index, along with the largest Visual Basic-related links list on the net.


    Rick - MVP


    Comment

    • John Lauwers

      #3
      Re: common dialog!

      Ok, But does that work for the printerdialog??

      Greets John

      "Rick Rothstein" <rickNOSPAMnews @NOSPAMcomcast. net> schreef in bericht
      news:ZYednTv45p bYd0iiRVn-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]


      Comment

      • Rick Rothstein

        #4
        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.sk ynet.be...[color=blue]
        > Ok, But does that work for the printerdialog??
        >
        > Greets John
        >
        > "Rick Rothstein" <rickNOSPAMnews @NOSPAMcomcast. net> schreef in bericht
        > news:ZYednTv45p bYd0iiRVn-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]


        Comment

        • Randy Birch

          #5
          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

          Please respond only to the newsgroups so all can benefit.


          "Rick Rothstein" <rickNOSPAMnews @NOSPAMcomcast. net> wrote in message
          news:KaednXnpLL pnZ0iiRVn-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.sk ynet.be...
          : > Ok, But does that work for the printerdialog??
          : >
          : > Greets John
          : >
          : > "Rick Rothstein" <rickNOSPAMnews @NOSPAMcomcast. net> schreef in bericht
          : > news:ZYednTv45p bYd0iiRVn-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
          : > >
          : > >
          : >
          : >
          :
          :


          Comment

          • John Lauwers

            #6
            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.ca ble.rogers.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:KaednXnpLL pnZ0iiRVn-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.sk ynet.be...
            > : > Ok, But does that work for the printerdialog??
            > : >
            > : > Greets John
            > : >
            > : > "Rick Rothstein" <rickNOSPAMnews @NOSPAMcomcast. net> schreef in bericht
            > : > news:ZYednTv45p bYd0iiRVn-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]


            Comment

            Working...