This is a simple replacement for the MS ShellAbout_() about box which, if you use it, effectively hands your copyrights over to Microsoft.
Tweak the icon libraries listed in about() and text to suit your own preferences. Hope it can be of any use, just wrote this for myself

Code: Select all
Procedure about(parent, text.s)
;field delimiter
nf.s = Chr(8)
;fields
about.s = StringField(text, 1, nf)
name.s = StringField(text, 2, nf)
corp.s = StringField(text, 3, nf)
txt.s = StringField(text, 4, nf)
url.s = StringField(text, 5, nf)
lnk.s = StringField(text, 6, nf)
flags = #PB_Window_ScreenCentered | #PB_Window_SystemMenu
win = OpenWindow(#PB_Any, 0, 0, 420, 325, name, flags)
If win
EnableWindow_(WindowID(parent), #False)
StickyWindow(win, #True)
ResizeWindow(win, #PB_Ignore, WindowY(win) - 50, #PB_Ignore, #PB_Ignore)
img1 = CreateImage(#PB_Any, 420, 70)
fnt1 = LoadFont(#PB_Any, "", 10)
fnt2 = LoadFont(#PB_Any, "", 16)
If StartDrawing(ImageOutput(img1))
DrawingMode(#PB_2DDrawing_Transparent)
;header background gradient
For x = 0 To 419
LineXY(x, 0, x, 60, RGB(x / 2.5, x / 2.5, 255))
LineXY(x, 60, x, 70, RGB(225- x / 5, 225 - x / 5, 255))
Next x
;header icon
res.s = "shell32.dll"
ndx = 130
;res.s = programFileName()
;ndx = 0
ExtractIconEx_(res, ndx, 0, @icon, 1)
If icon
DrawImage(icon, 10, 5, 48, 48)
DestroyIcon_(icon)
EndIf
;header about field
DrawingFont(FontID(fnt1))
DrawText(70, 10, about, RGB(255, 255, 255))
;header program name field
DrawingFont(FontID(fnt2))
DrawText(70, 28, name, RGB(255, 255, 255))
;header company name field
DrawingFont(FontID(fnt1))
DrawText(400 - TextWidth(corp), 35, corp, RGB(255, 255, 255))
StopDrawing()
EndIf
ImageGadget(#PB_Any, 0, 0, 0, 0, ImageID(img1))
;text icon
img2 = CreateImage(#PB_Any, 32, 32)
If StartDrawing(ImageOutput(img2))
Box(0, 0, 32, 32, GetSysColor_(15))
res.s = "shell32.dll"
;ndx = 166
ndx = 55
;res.s = programFileName()
;ndx = 0
ExtractIconEx_(res, ndx, 0, @icon, 1)
If icon
DrawImage(icon, 0, 0, 32, 32)
DestroyIcon_(icon)
EndIf
StopDrawing()
EndIf
ImageGadget(#PB_Any, 20, 100, 0, 0, ImageID(img2))
;text
TextGadget(#PB_Any, 70, 100, 330, 145, txt)
;divider line
img3 = CreateImage(#PB_Any, 410, 2)
If StartDrawing(ImageOutput(img3))
Line(0, 0, 420, 0, RGB(160, 160, 160))
Line(0, 1, 420, 0, RGB(255, 255, 255))
StopDrawing()
EndIf
ImageGadget(#PB_Any, 10, 260, 0, 0, ImageID(img3))
;online link
If Len(url)
lnk1 = HyperLinkGadget(#PB_Any, 20, 275, 200, 24, url, RGB(0, 0, 255), #PB_HyperLink_Underline)
SetGadgetColor(lnk1, #PB_Gadget_FrontColor, RGB(0, 0, 255))
EndIf
;ok button
btn1 = ButtonGadget(#PB_Any, 330, 288, 80, 24, "OK", #PB_Button_Default)
SetActiveGadget(btn1)
Repeat
event = WaitWindowEvent()
Select event
Case #PB_Event_Gadget
Select EventGadget()
Case lnk1
RunProgram(lnk)
exit = #True
Case btn1
exit = #True
EndSelect
Case #PB_Event_CloseWindow
exit = #True
EndSelect
Until exit
CloseWindow(win)
EndIf
EnableWindow_(WindowID(parent), #True)
SetActiveWindow(parent)
EndProcedure
;Open main window
flags = #PB_Window_ScreenCentered | #PB_Window_SystemMenu
OpenWindow(0, 0, 0, 200, 200, "", flags)
;CALL ABOUT():
;next field
nf.s = Chr(8)
;next line
nl.s = Chr(13) + Chr(10)
;about field
txt.s = "About" + nf
;program name field
txt + "Mission Controller" + nf
;company field
txt + "Inc.Corp" + nf
;main text field
txt + "Inc.Corp Corporation (c) 2007 Mission Controllers Division" + nl + nl
txt + "Version 11.00 Build 2007010201" + nl
txt + "Copyright (C) 1991 - 2007 Inc.Corp Corporation" + nl + nl
txt + "This program is licenced to:" + nl
txt + "VACUUM CLEANER CORPORATION" + nl + nl
txt + "WARNING: This program is protected by copyright law and international treaties."+ nf
;online link field
txt + "Visit Mission Controller online" + nf
txt + "http://www.purebasic.fr/english/viewtopic.php?t=25234"
about(0, txt)
End
Repeat
event = WaitWindowEvent()
Until event = #PB_Event_CloseWindow
End