Posts: 13
Threads: 4
Joined: Jan 2023
Reputation:
1
The _MESSAGEBOX function has been a major improvement for me. Is there any way to add or change the default buttons? Being able to have buttons such as [Help] or [Quit] would be extremely useful. With the right buttons some of my utility programs wouldn't need any other type of GUI.
Posts: 34
Threads: 6
Joined: Apr 2024
Reputation:
5
05-11-2024, 07:50 AM
(This post was last modified: 05-11-2024, 07:51 AM by ahenry3068.)
You can make it return a 0 or 1 and get Yes / No buttons with the following syntax.
KillIt% = _MessageBox("FILE EXISTS", Z_File$ + " Exists\nOverwrite?", "yesno", "question", 0)
If KillIt% = 1 Then
Kill (Z_File$)
Else
Z_File$ = _InputBox$("NEW FILE NAME", "Enter ZCM File Name", Z_File$)
If Z_File$ = "" Then System
GoTo StartZWrite
End If
I too would like the option for more buttons. But you can do a lot with just a Yes/No option.
Posts: 3,978
Threads: 177
Joined: Apr 2022
Reputation:
220
+1 yes you can do allot with yes/no/cancel, cancel is 3rd option the one you never see in opinion polls ;-))
message box 1 do you want help? if yes then message box 2 offer help...
welcome @ahenry3068
b = b + ...
Posts: 734
Threads: 30
Joined: Apr 2022
Reputation:
43
05-11-2024, 04:29 PM
(This post was last modified: 05-11-2024, 04:31 PM by SpriggsySpriggs.
Edit Reason: Forgot that they broke my shit
)
You can try doing a TaskDialog. They are far more powerful than a standard MessageBox. However, they require a great deal of work. Here is a post I had submitted to the old forum website a long time ago.
https://qb64forum.alephc.xyz/index.php?t...#msg133688
However, be aware that the recent updates to Phoenix have broken a lot of older code I have written as they have changed the backend of some things. You will most likely need to do a lot of work to make it compatible with the recent versions.
Tread on those who tread on you