You can learn a few things from this even if you use it for a different purpose.
(Made for dark theme users. Size optimized for 1080p or 1200p monitor. Left-click to drag. Double click to terminate.)
Code: Select all
TheMessage.s = ""
If CountProgramParameters() <> 0
For i = 0 To CountProgramParameters()
TheMessage + ProgramParameter() + " "
Next
EndIf
OpenWindow(0, 0, 0, 50, 50, "HiddenWindow", #PB_Window_Invisible)
OpenWindow(1, 0, 0, 1900, 66, "My Message", #PB_Window_BorderLess | #PB_Window_ScreenCentered, WindowID(0))
SetWindowColor(1, #Magenta)
SetWindowLong_(WindowID(1), #GWL_EXSTYLE, #WS_EX_LAYERED | #WS_EX_TOPMOST)
SetLayeredWindowAttributes_(WindowID(1), #Magenta, 0, #LWA_COLORKEY)
StickyWindow(1, #True)
LoadFont(0, "Millenium BdEx BT", 28)
If TheMessage = "" : TheMessage = "Let out the cat!!!" : EndIf
TextGadget(0, 0, 0, 1900, 50, TheMessage)
SetGadgetFont(0, FontID(0))
SetGadgetColor(0, #PB_Gadget_FrontColor, #White)
SetGadgetColor(0, #PB_Gadget_BackColor, #Magenta)
Repeat
Event = WaitWindowEvent(100)
Select Event
Case #WM_LBUTTONDOWN
SendMessage_(WindowID(1), #WM_NCLBUTTONDOWN, #HTCAPTION, 0)
Case #PB_Event_LeftDoubleClick
Break
EndSelect
ForEver
Code: Select all
@echo off
color 0b
echo ***************************
echo * Welcome to OnTopMessage *
echo ***************************
echo.
echo This program will display a draggable reminder message on your desktop.
echo.
set /p message=Enter your message:
start OnTopMessage.exe %message%
It has a tiny glitch around the edges of the font. I guess they are antialiased and are blending with the magenta background. I chose this font because those artifacts make it look cool anyway.