Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extended KotD #20: _NOTIFYPOPUP
#1
Onwards and backwards, as we're now down to the new version 3.4+ keywords!   To start with, let's just start at the top of the list and discuss _NotifyPopUp.

Wiki entry: https://qb64phoenix.com/qb64wiki/index.php/NOTIFYPOPUP
Syntax:    _NOTIFYPOPUP [title$][, message$][, iconType$]

Not at all like our last keyword (BACK!  BACK, EVIL _UCHARPOS!! BACK, I SAY!!), this one is rather simple to make use of and understand.  Smile

A simple SUB, this command will sent one of those annoying little pop-up notifications to your PC, that we all love to hate.  You know the ones I'm talking about -- those little square boxes that usually pop up over in some corner of the screen saying junk like, "Your Firewall is Turned Off.  Do you want to fix it now?".   Or, "We've discovered an update for Spammy Spam-Spam!  Would you like to enable it now?"  Or, "Download finished at 1:13:47AM."

Yeah... This creates THOSE annoying little notification pop-ups.  Tongue

Usage is simple enough that it's almost a waste to go over it.   Call the command, supply it a few parameters.  Presto -- done!!

So what is the command and those parameters??

_NOTIFYPOPUP [title$][, message$][, iconType$]

_NOTIFYPOPUP -- the name of the command!   (Phew!  That was hard to explain!)
title$  -- the title that appears at the top of the notification.
message$ --   the body of text that makes up the message for the notification.
icontype$ -- "info", "error", ot "warning".   Choose from one of those three so your notification will have the corresponding gpahiic stamped on it.

Code: (Select All)
_NOTIFYPOPUP "My Cool App", "Conversion complete!", "info"

Run the above and it'll either do something.... or it won't.  Tongue

If you have notifications turned off, or "Do Not Disturb" turned on, then your system will simply ignore the command and not bother you.  It's not that you did anything wrong, or that the command doesn't work -- it's just that you've disabled notifications and can't recieve them.  (Think of it as turning off your phone and then someone trying to call you...  Nothing happens on your end as the phone is off; but that doesn't mean the other person's phone isn't dialing out, or working as it's supposed to.  You're just not responding to it.)

If notifications are on, and "Do not disturb" is off, then you should see one of those annoying little pop-ups appear at the corner of your screen telling you that an imaginary conversion is now completed.

And that's all there is to it, in a nutshell.  Wink
Reply


Messages In This Thread
Extended KotD #20: _NOTIFYPOPUP - by SMcNeill - 07-01-2024, 03:13 AM
RE: Extended Kotd #20: _NotifyPopUp - by bplus - 07-01-2024, 03:36 PM
RE: Extended Kotd #20: _NOTIFYPOPUP - by OldMoses - 07-02-2024, 12:18 PM
RE: Extended KotD #20: _NOTIFYPOPUP - by bplus - 07-02-2024, 02:14 PM



Users browsing this thread: 1 Guest(s)