Custom print dialog in VB6 - printing

How do I create this custom print dialog and get the values of the red options when the user clicks ok?
The print dialog below is not created manually, the app I took this screenshot from is probably modifying the default print dialog.
The items circled in red is associated with some data found in the app I took the screenshot from.
The class name of this dialog is #32770 (Dialog) which is the same print dialog found in notepad, wordpad, and vb6 common dialog print. So it is clear that it is modifying the dialog, adding controls to it somehow

You could look at Customizing Common Dialog Boxes but don't expect this to be simple from VB6. it is clumsy enough in C++.
You could just create your own dialog Form.
Update:
Perhaps consider using the download in HOW TO: Raise and Control Print Dialog Boxes from Visual Basic?

Related

Allow user to select text in ShowMessage dialog

I am writing a program in Delphi XE2. At one point in my program the user will be presented with output text, which I display through a simple "showmessage('The text of interest')" dialog.
I would like for the user to be able to copy and paste this text if they like to. It's not a key part of the program at all but I know that it might be nice for them to be able to do so.
At the moment, as far as I can see, it is not possible to select all or parts of the text from this type of message box, which brings me to my question: is there some way to make the message box text selectable for the user, or will I have to move on to other ways of displaying the text if I want this functionality? Any help would be greatly appreciated.
When you call ShowMessage a system message dialog is shown. This dialog does not support highlighting of individual portions of text. However, the dialog does respond to CTRL + C by placing the entire content of the dialog on the clipboard.
If you absolutely must have selection of individual portions of text then you will need to create the dialog yourself using Delphi controls.

How to get the handle of a Vista style Open/SaveDialog?

I'd like to get the window handle of a new vista-style Open/SaveDialog opened by my Delphi application.
It was possible with the old style dialog by parsing OnShow, but with the new style dialog there is no such event.
Is there a possibility maybe to iterate through all window handles in Windows and get it that way?
Thanks!
Edit: I know that OpenDialog.Handle will return the handle, but only when the dialog is visible (otherwise it's 0). I'd need an event to catch the Handle straight after showing the dialog (without any user action, ie.: select an item in the dialog, changing the file type, etc.).
I'd like to get the window handle of a new vista-style Open/SaveDialog opened by my Delphi application.
This is available through the dialog's Handle property.
Probably the easiest way to catch the event of the dialog showing is to use a CBT hook that you set immediately before showing the dialog, and remove as soon as it closes.
TOpenDialog has an OnShow event which fires just after dialog is shown so you can use to get the OpenDialog.Handle since the handle is already set at that time.
EDIT: After some pepole pointed out that using of OnShow event changes the dialogs apperance I tested this out and can confirm that using of OnShow event realy does change the dialogs aperance.

Hyperlinks dont work in Captivate 6 when imported from powerpoint

We are trying to create a captivate 6 presentation by importing a powerpoint 2013 presentation that has hyperlinks in it. However, it seems that the hyperlinks don't work when the project is published as a swf file. When you mouse over the hyperlink, the mouse changes the cursor to a hand, but when you click it, nothing happens ? Any ideas on what could be the problem or the fix for this ?
Captivate doesn't understand text hyperlinks; place a click box over the link and assign it the action 'Open URL or file' to accomplish this.
Note: the dropdown immediately to the right of the URL input box allows you to set the target of the link, and whether or not the presentation will be played/paused upon clicking.

Adding "Paste" to the Shell Context Menu

I am using this routine to pop up the Shell Context Menu for a file name which is working well, except for one thing.
How to pop-up the Windows context menu for a given file using Delphi?
When I click "Copy" the menu closes as expected. If I move to another Folder or stay in the same one, when I right-click again for the Context Menu, it has no "Paste" option. Not even a grayed out one. I checked on the Poster's blog as mentioned in his Edit at the bottom, but that new routine crashes with Incorrect Parameter.
Can someone please assist with adding "Paste" to the original routine in the above link
Thanks
Look for TClipboard (library/uses ClipBrd). Using this you can manage a cliboard on Delphi.
More information: Basic CLipboard Operations
Obs.: You can use "Actions" too, depending your needs. See ActionManager component, and Action properties of your popupmenu.

How to prevent Delphi MainForm to show when a file dialog is showing?

My application has many forms, there is also one more important form, that is the main form, the behaviour is in general ok but in same cases (for example when I open a file dialog from a subform) the beahviour is: subform is hidden and mainform is shown.
How to avoid this?
Make sure you either implicitly or explicitly set the PopupParent of both the sub-form and the dialog. If you open both the sub-form and the dialog from some random bit of code somewhere and don't tell Windows about the correct Z-order, stacking issues can happen.

Resources