473,390 Members | 1,306 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,390 software developers and data experts.

common dialog!


Hello,

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

Greets John
Jul 17 '05 #1
5 6476
> 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
Jul 17 '05 #2
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

Jul 17 '05 #3
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


Jul 17 '05 #4
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
: > >
: > >
: >
: >
:
:
Jul 17 '05 #5
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" <rg************@mvps.org> schreef in bericht
news:5X***************@news01.bloor.is.net.cable.r 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" <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
: > >
: > >
: >
: >
:
:

Jul 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Gord | last post by:
Hello, Does anyone know how to access the caption property on a command button within the common dialog control? Specificaly, I'm trying to change the caption of the 'Open' button in the 'Open...
3
by: S.W. Rasmussen | last post by:
With the risk of being accused of multi-posting I would like to draw the attention to a serious visual basic/windows issue discussed in the microsoft.public.vb.bugs newsgroup. As pointed out below...
4
by: Ron Nolan | last post by:
Re: Access 2000 Has anyone been able to find information in the online help on the topic of "Common Dialog Control? If so, what did you type in your search to receive the information? I've been...
3
by: CaribSoft | last post by:
I want to create my own common dialog to use in an application . How do I show a custom dialog (form) in a class based on the common dialog class?
23
by: George | last post by:
Is there a way to customize the open file common dialog? I am trying to modify the button text so I can create a delete file common dialog. I need the same functionality of the open file common...
4
by: Adam | last post by:
I have a form that has a timer running on it (System.Timers.Timer). On this form, I have a button that opens a Common Dialog box. As soon as this button is pressed, the timer stops running. When I...
0
by: Bo Gusman | last post by:
A curious problem, one that I think I've seen before. I have a .250 MLOC vb6 app that uses the common dialog control. If I select File/Open in my app to display the file open dialog and then...
6
by: Steve Barnett | last post by:
I need to include a wizard in my application that will, as one of the steps, ask the user to select a file to open and (later) a file to save it as. The naff way to do this would be to have a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.