Procedure SetWindowIcon(Window, Image)
If IsWindow(Window) And IsImage(Image)
CompilerSelect #PB_Compiler_OS
CompilerCase #PB_OS_Linux
gtk_window_set_icon_(WindowID(Window), ImageID(Image))
CompilerCase #PB_OS_Windows
If ImageWidth(Image) <> 16 Or ImageHeight(Image)<>16
ResizeImage(Image,16,16)
EndIf
SendMessage_(WindowID(Window), #WM_SETICON, #False, ImageID(Image))
CompilerCase #PB_OS_MacOS
; :?:
CompilerEndSelect
EndIf
EndProcedure
PureBasic 6.21 (Windows x64) | Windows 11 Pro | AsRock B850 Steel Legend Wifi | R7 9800x3D | 64GB RAM | RTX 5080 | ThermaltakeView 270 TG ARGB | build by vannicom
English is not my native language... (I often use DeepL.)
Define your icons with an app that is designed for the job, there is normally more than one image in an icon file and you need an icon elsewhere too - for the executable and perhaps the installer, app folder etc.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.