Jump to content

Extended Message Box - New Version: 16 Feb 24


Melba23
 Share

Recommended Posts

  • Moderators

Monooboe,

As you create the EMB you can just copy the values to the ini at that point:

; Create GUI with $WS_POPUPWINDOW, $WS_CAPTION style and required extended style
Local $hMsgGUI = GUICreate($sTitle, $iDialog_Width, $iMsg_Height, $iHpos, $iVPos, BitOR(0x80880000, 0x00C00000), $iExtStyle, $iParent_Win)
If @error Then
    Return SetError(7, 0, -1)
Else
    IniWrite($Config, 'LPEXMSG', 'XPOS', $iHpos)
    IniWrite($Config, 'LPEXMSG', 'YPOS', $iVPos)
EndIf

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Hi Melba32

Thx for this cools UDF. though I have one problem

Using this

_ExtMsgBoxSet(Default, Default, 0x008000, 0xFF8000, 12, "MS Sans Serif")

The colors is not used.

Wouldn't it normally just replace the Default keyword with the default parameter values?

btw. I'm using the latest Autoit beta, don't know if that could be the problem :(

Cheers
/Rex

Edited by Rex
Forgot to add what the problem was :$
Link to comment
Share on other sites

  • Moderators

Rex,

From the _ExtMsgBoxSet header:

;Setting the $iStyle parameter to 'Default' resets ALL parameters to default values <<<<<<<<<<<<<<<<<<<<<<<

So use:

_ExtMsgBoxSet(0, Default, 0x008000, 0xFF8000, 12, "MS Sans Serif")

And you will get the colours.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Hi Melba23,

thanks for your help.

When I  add this line in your script and run my script, it showed warning message "$Config: possible used before declaration" .

I have already declared in my main script.

; Create GUI with $WS_POPUPWINDOW, $WS_CAPTION style and required extended style
Local $hMsgGUI = GUICreate($sTitle, $iDialog_Width, $iMsg_Height, $iHpos, $iVPos, BitOR(0x80880000, 0x00C00000), $iExtStyle, $iParent_Win)
If @error Then
    Return SetError(7, 0, -1)
Else
    IniWrite($Config, 'LPEXMSG', 'XPOS', $iHpos)
    IniWrite($Config, 'LPEXMSG', 'YPOS', $iVPos)
EndIf

Sorry for confusion about saving Last Position. 

EMB was started with Center of screen ( initial settings in INI) .  It will be moved to top or bottom of screen that depends on user's preference.

with my previous modification in EMB, last position of EMB was saved in INI file after move.  Next time when I use my script, EMB showed at the bottom or top of screen instead of Center of screen.

GUIRegisterMsg(0x03, "LASTPOST")

Can you tell me how to save last position for EMB after moved instead of using "GUIRegisterMsg" ?

here is part of my script.

#include "ExtMsgBox.au3"

#include <File.au3>

 

Global $Config = @ScriptDir & "\config.ini"

$chkF=FileExists($Config)

if $chkF = 0 then

                IniWrite($Config, 'LPEXMSG', 'XPOS', Int(@DesktopWidth / 2))

                IniWrite($Config, 'LPEXMSG', 'YPOS', Int(@DesktopHeight / 2))

endif

 

selection()

 

Func selection()

                Local $emXPos = Int(IniRead($Config, 'LPEXMSG', 'XPOS', '')) ;ready to close position

                Local $emYPos = Int(IniRead($Config, 'LPEXMSG', 'YPOS', '')) ;ready to close position

 

                _ExtMsgBoxSet(32 + 64, 2, 0x004080, 0xFFFF00, 10, "Comic Sans MS")

                ; message for text body

                $sMsg = '"Message for text body'

                $iRetValue = _ExtMsgBox($EMB_ICONEXCLAM, "&Continue|&Skip|E&xit", "click 'Continue' to save current file.|click 'Skip' saving |click 'Exit' to Quit!", "Ready to Complete", $sMsg, 0, $emXPos, $emYPos)

                If $iRetValue = 2 Then

                                MsgBox(4096, 'Skip', ' "Skip" to save')

                ElseIf $iRetValue = 3 Then

                                Exit

                ElseIf $iRetValue = 1 Then

                                MsgBox(4096, 'Continue', 'save current file')

                EndIf

 

EndFunc

 

 

 

Func LASTPOST($hWnd, $nMsg, $wParam, $lParam)

                Local $aWPos = WinGetPos($hWnd)

                If IsArray($aWPos) Then

                                ;$aWPos = WinGetPos("")

                                IniWrite($Config, 'LPEXMSG', 'XPOS', $aWPos[0])

                                IniWrite($Config, 'LPEXMSG', 'YPOS', $aWPos[1])

                                $emXPos = $aWPos[0]

                                $emYPos = $aWPos[1]

                EndIf

                Return

EndFunc

Thanks

Monooboe

Edited by Monooboe
Link to comment
Share on other sites

  • Moderators

Monooboe,

You need to define the ini file before the EMB include so that the path variable is defined within the UDF. Then you can do this:

Global $Config = @ScriptDir & "\config.ini"

FileDelete($Config) ; Just to make sure we do not have an ini to start

Global $emXPos, $emYPos

#include "ExtMsgBox.au3"
#include <File.au3>

$chkF = FileExists($Config)
If $chkF Then
    $emXPos = Int(IniRead($Config, 'LPEXMSG', 'XPOS', '')) ;ready to close position
    $emYPos = Int(IniRead($Config, 'LPEXMSG', 'YPOS', '')) ;ready to close position
Else
    $emXPos = Int(@DesktopWidth / 2)
    $emYPos = Int(@DesktopHeight / 2)
    IniWrite($Config, 'LPEXMSG', 'XPOS', $emXPos)
    IniWrite($Config, 'LPEXMSG', 'YPOS', $emYPos)
EndIf

; This will be around the centre of the screen
selection()

; Set the new coords to top-left
$emXPos = 100
$emYPos = 100

; And that is where it appears
selection()

; Read from the ini
$emXPos = Int(IniRead($Config, 'LPEXMSG', 'XPOS', ''))
$emYPos = Int(IniRead($Config, 'LPEXMSG', 'YPOS', ''))

; And we get it in the same position
selection()

Func selection()
    _ExtMsgBoxSet(32 + 64, 2, 0x004080, 0xFFFF00, 10, "Comic Sans MS")
    ; message for text body
    $sMsg = '"Message for text body'
    $iRetValue = _ExtMsgBox($EMB_ICONEXCLAM, "&Continue|&Skip|E&xit", "Ready to Complete", $sMsg, 0, $emXPos, $emYPos)
    IniWrite($Config, 'LPEXMSG', 'XPOS', $emXPos)
    IniWrite($Config, 'LPEXMSG', 'YPOS', $emYPos)
    If $iRetValue = 2 Then
        MsgBox(4096, 'Skip', ' "Skip" to save')
    ElseIf $iRetValue = 3 Then
        Exit
    ElseIf $iRetValue = 1 Then
        MsgBox(4096, 'Continue', 'save current file')
    EndIf
EndFunc   ;==>selection

All clear?

M23

Edit: As this is modifying the main UDF and I am not going to support it in the future, if we need to go on any longer I shall split off these posts into a separate thread.

Edited by Melba23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

[NEW VERSION] 2 Aug 18

Added: When specifying the icon to use, if the $vIcon parameter is set to the name of an ico or exe file, the main icon within will be displayed, but if a trailing "|" followed by the icon index is added to the name, that icon from within the file is used.

New UDF and examples in the first post.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • 1 month later...
On 8/2/2018 at 11:07 AM, Melba23 said:

[NEW VERSION] 2 Aug 18

New UDF and examples in the first post.

Just noticed the new date on the thread and thought I'd grab the update as it's once of my faves... Anyway, the zip file I downloaded from the OP shows a date April 6, 2018. Is that the latest or did I misunderstand the message above?

Link to comment
Share on other sites

  • Moderators

CaptainGadget,

When I download the zip in the first post I get the latest version, which was created on 2/08/18 and is 17,244 bytes.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

I had have the same issue

image.thumb.png.202c37d49e262f184448a51f55325c95.png

Edited by mLipok
wording

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

  • Moderators

mLipok & CaptainGadget,

I see what you mean now. That date is correct - I modified the file a long time ago and only just got around to releasing it. Sorry for the confusion.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • 1 month later...

I love the UDF and thank you for sharing. Very useful indeed.

For my own usage I have moved the icon be located down vertically and added more horizontal padding (similar to the original windows msgbox)
It doesn't look like there are any settings for this, but perhaps a future version could feature it? (as an option perhaps)
Not that it matters as I'm happy to change the code myself, but it may be of benefit for others.

I just aligned it vertically with the label:


 

 

 

2018-11-02 22_03_53-ExtMsgBox.png

Link to comment
Share on other sites

  • Moderators

boomingranny

Can you please let me have a copy of the lines you changed - I quite like the new icon positioning.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 months later...

I've been using your excellent UDF for quit some time now. Thank you, Melba23.

It's not my habbit, to modify somebody else's UDF, but I only recently found out that I could not position EMB on my second monitor.
In several places you use @DesktopWidth which seems to be limited only to the first monitor.
In this script I found what I wanted: https://www.autoitscript.com/forum/topic/113140-determine-screen-resolution-of-multiple-monitors/
I used some coding from member ahha from his (her?) post from April 16, 2010.

Here you can see the lines; one added and one modified:

; If dialog is to appear on main display
    If $bMain Then
        Local $VirtX = DllCall("user32.dll", "int", "GetSystemMetrics", "int", 78)    ;SM_CXVIRTUALSCREEN 78. New Gordon 28jan2019.
        ; Dialog is visible horizontally
        If $iHpos < 10 Then $iHpos = 10
;~      If $iHpos + $iDialog_Width > @DesktopWidth - 20 Then $iHpos = @DesktopWidth - 20 - $iDialog_Width ;Melba23 original.
        If $iHpos + $iDialog_Width > $VirtX[0] - 20 Then $iHpos = $VirtX[0] - 20 - $iDialog_Width ;Modified Gordon 28jan2019.
        ; Then vertically
        If $iVPos < 10 Then $iVPos = 10
        If $iVPos + $iMsg_Height > @DesktopHeight - 60 Then $iVPos = @DesktopHeight - 60 - $iMsg_Height
    EndIf

Hopefully it can get your approval.

 

Link to comment
Share on other sites

  • Moderators

GordonShumway

Quote

but I only recently found out that I could not position EMB on my second monitor.

Are you sure about that?

Quote

[NEW VERSION] 30 Mar 15
-----------------------

Added: A new parameter to the _ExtMsgBox function to allow the dialog to display on secondary displays. The UDF default behaviour prevents simple coordinate errors from making the dialog invisible (the coordinates are adjusted to make sure it appears on the main screen as close as possible to the desired location) which does not allow the dialog to be deliberately positioned off the main display - setting this new parameter allows the dialog to be located at any position. Obviously the user who sets this parameter is now responsible for ensuring that the dialog is visible.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • 2 weeks later...
  • Moderators

kurtykurtyboy,

Thanks - glad you like the UDF.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • 1 month later...

Hi Melba

:( I broke your UDF

u4gy5ko.png

If I use Your UDF and the GUICtrlOnHover UDF in the same script, I get the above result :'(

Sample code to replicate the problem (at least on my win10 and my test win7)

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile=TEST_GUI_ERROR.exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <includes\GUICtrlOnHover.au3>
#include "Includes\ExtMsgBox.au3"
Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=
Global $Form1 = GUICreate("Form1", 221, 48, Default, Default)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
Global $idInp_1 = GUICtrlCreateInput("This is a text that, is longer than 34 chars in len, and therefore it should be displayed in a tooltip, upon hover", 8, 8, 153, 21)
_GUICtrl_OnHoverRegister(-1, "_Hover_Func", "_Hover_Func")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    Sleep(100)
WEnd

Func Form1Close()
Local $iMsgAnsw = _ExtMsgBox($EMB_ICONQUERY, $MB_YESNO, "Close GUI", "Do you want to close the GUI?")
    ; Run thru the answers
    Switch $iMsgAnsw

        Case 1 ; The user clicked yes
            ; Delete the gui's
            GUIDelete($Form1)

            Exit ; And we exit the program

        Case 2 ; The user clicked no
            Return ; We return doing nothing

    EndSwitch
EndFunc

Func _Hover_Func($iCtrlID, $iParam)
    Switch $iParam
        Case 1
            Local $sdata = GUICtrlRead($idInp_1)

            If $sdata <> '' And StringLen($sdata) > 34 Then
                If Not IsDeclared("sToolTipAnswer") Then Local $sToolTipAnswer
                $sToolTipAnswer = ToolTip(GUICtrlRead($idInp_1), Default, Default, "", 1, 1)
            EndIf
        Case 2
            ToolTip("")
    EndSwitch
EndFunc   ;==>_Hover_Func

 

Cheers
/Rex

Link to comment
Share on other sites

  • Melba23 changed the title to Extended Message Box - New Version: 16 Feb 24

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...