473,657 Members | 2,270 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

common dialog!


Hello,

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

Greets John
Jul 17 '05 #1
5 6497
> 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******** ************@co mcast.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.sk ynet.be...
Ok, But does that work for the printerdialog??

Greets John

"Rick Rothstein" <ri************ @NOSPAMcomcast. net> schreef in bericht
news:ZY******** ************@co mcast.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******** ************@co mcast.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.sk ynet.be...
: > Ok, But does that work for the printerdialog??
: >
: > Greets John
: >
: > "Rick Rothstein" <ri************ @NOSPAMcomcast. net> schreef in bericht
: > news:ZY******** ************@co mcast.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.ca ble.rogers.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******** ************@co mcast.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.sk ynet.be...
: > Ok, But does that work for the printerdialog??
: >
: > Greets John
: >
: > "Rick Rothstein" <ri************ @NOSPAMcomcast. net> schreef in bericht
: > news:ZY******** ************@co mcast.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
1405
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 File' dialog. Thanks, Gord
3
6788
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 by Norman Diamond the bug may result in loss of data when saving files with the standard common dialog control. Norman Diamond describes the problem as follows: ---------- In VB6 SP6, VB6 SP5, and possibly others, the common dialog box...
4
1488
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 typing in lots and lots of different keywords, all to no avail. I was needing assistance setting up a common dialog control in my app. I got the help I needed, but wanted to toss this to the group at large
3
4133
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
6988
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 dialog but just need to change the button text from "open" to "delete". Any ideas? Thanks
4
1884
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 return and close the common dialog, the timer will not start up again, no matter what I do. If I stop the timer before the box is displayed, and then try to start it afterwards (timer.start), it still doesn't work. I don't need to respond to...
0
1371
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 alt-tab to another running app, when I try to alt-tab back to my app, the common dialog box and my apps main window is gone (can't see it in the task bar, or in the alt-tab window). If I then maximize another window and minimize it again, my app and...
6
1916
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 button on the form that pops-up the common dialog. The cool way to do this would be to have the common dialog embedded in the wizard. I know it's possible, as I've seen other apps do this kind of thing, but I have no ideas how it can be achieved and...
0
8411
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8323
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8838
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8513
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8613
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5638
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1732
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.