Page 7 of 7 FirstFirst ... 4567
Results 241 to 248 of 248

Thread: [VB6] TaskDialogIndirect - Complete class implementation of Vista+ Task Dialogs

  1. #241

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,653

    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

  2. #242
    New Member
    Join Date
    Apr 2014
    Posts
    12

    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.

  3. #243

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,653

    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.

  4. #244
    Member
    Join Date
    Mar 2020
    Posts
    33

    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.

  5. #245

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,653

    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.
    Download Attachment: Attachment 190043

    (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).

  6. #246
    Member
    Join Date
    Mar 2020
    Posts
    33

    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.

  7. #247
    Addicted Member
    Join Date
    Feb 2022
    Posts
    167

    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.

  8. #248

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,653

    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.

Page 7 of 7 FirstFirst ... 4567

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width