-
Jan 5th, 2024, 11:01 AM
#241
Re: [VB6] TaskDialogIndirect - Complete class implementation of Vista+ Task Dialogs
Yes; specify the window (e.g. Me.hwnd when calling from a Form/UC) as the parent with .ParentHwnd, and use the TDF_POSITION_RELATIVE_TO_WINDOW flag in .dwFlags;
Code:
With TaskDialog1
.Flags = TDF_POSITION_RELATIVE_TO_WINDOW
.ParenthWnd = Me.hWnd
-
Jan 5th, 2024, 12:10 PM
#242
New Member
Re: [VB6] TaskDialogIndirect - Complete class implementation of Vista+ Task Dialogs
Thank you, it works.
The crucial point is:
.Flags = TDF_POSITION_RELATIVE_TO_WINDOW
Without this it doesn't work.
-
Jan 17th, 2024, 05:05 AM
#243
Re: [VB6] TaskDialogIndirect - Complete class implementation of Vista+ Task Dialogs
Project Updated - Version 1.4 (Universal Compatibility)
After review, I've included the undocumented additional common buttons that were used in the AccessUI version (thanks!). The following .CommonButtons are now available, with their return value given in parentheses:
Code:
TDCBF_ABORT_BUTTON (TD_ABORT)
TDCBF_IGNORE_BUTTON (TD_IGNORE)
TDCBF_TRYAGAIN_BUTTON (TD_TRYAGAIN)
TDCBF_CONTINUE_BUTTON (TD_CONTINUE)
TDCBF_HELP_BUTTON **This will raise the Help Event, and will not close the dialog.**
The Help button works everywhere, *including MS Access*. Unfortunately, the AccessUI version had a typo; the release had 16384 which isn't anything-- but it looks like they just had a typo originally, there's a comment '104857 which of course makes no sense... but if you convert these values to hex, you find &H10000, &H20000, &H40000, and &H80000 for the other new buttons... &H100000 is **1048576** in decimal-- so they just cut off a digit when copying it down. &H100000 works in Access, I checked.
-
Jan 19th, 2024, 10:26 AM
#244
Member
Re: [VB6] TaskDialogIndirect - Complete class implementation of Vista+ Task Dialogs
Thank you very much. Note that I had to delete all the 'PtrSafe' to test it on my VB6.
-
Jan 19th, 2024, 11:05 AM
#245
Re: [VB6] TaskDialogIndirect - Complete class implementation of Vista+ Task Dialogs
Apologies, I had the wrong version of mTDSample.bas in the zip. I've updated now to include the correct one and double checked it's fine in VB6.
(PS- You shouldn't have needed to remove them from anything besides mTDSample.bas; everywhere else they werre fine-- they appear in red, but are inside conditional compilation blocks so the VB6 compiler doesn't see them; that's now the case with mTDSample.bas too).
-
Jan 19th, 2024, 12:07 PM
#246
Member
Re: [VB6] TaskDialogIndirect - Complete class implementation of Vista+ Task Dialogs
Thanks a lot. Yes you're right, I had only changed mTDSample.bas. New version is fine. Cheers.
-
Mar 8th, 2024, 09:23 AM
#247
Addicted Member
Re: [VB6] TaskDialogIndirect - Complete class implementation of Vista+ Task Dialogs
Incredibly impressive project! Great work. Thanks for this fafalone!
Is there a way to make all of the fonts size 11?
Is there a way to make this function non-modal? I could never get a messagebox to work that would allow processing while waiting for the user to press OK.
Code:
Public Function SimpleDialog(sMessage As String, Optional dwBtn As TDBUTTONS = TDCBF_OK_BUTTON, Optional sTitle As String, Optional sMainText As String, Optional dwIco As TDICONS, Optional hWndOwner As LongPtr, Optional hInst As LongPtr) As TDRESULT
Last edited by taishan; Mar 8th, 2024 at 09:42 AM.
-
Mar 8th, 2024, 09:52 AM
#248
Re: [VB6] TaskDialogIndirect - Complete class implementation of Vista+ Task Dialogs
The font is controlled by the system unfortunately... since it's a Direct2D painted window I don't know any way to easily change that (besides changing it system-wide). You could change it for the custom controls, but that's it.
The simple dialog function should be nonmodal just by omitting hWndOwner.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|