Sign in Join
Wiki copytemporary

SplashAbout/Advanced Use: what changed

Revision 2 to 3. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11- For installation, download, version and other information, see the [[SplashAbout]] page
22
33## SplashAbout properties tester Application
44
55- The distribution archive contains an example application with all the resources needed to experiment with advanced properties - pre-configured with Resource and External graphics, also sample license.txt and Credits
66- Click the \[Help\] button to view the readme
77
88![](/wiki-images/8/8a/Splashabout_properties_tester144.png)
99
1010------------------------------------------------------------------------
1111
1212## Properties
1313
1414When dropped onto a new application mainform, the property defaults will show a Splash Screen and About window that look something like this:
1515
1616![](/wiki-images/8/8b/Splashabout_default_splash.png)
1717
1818![](/wiki-images/0/04/Splashabout_default_about.png)
1919
2020- A normal (borderless rectangle) Splash screen displayed for 2 seconds (ShowSplash method)
2121 - It will use the Application default icon (default=Lazarus icon)
2222 - Title will be the Application name (default='project1')
2323 - Colour will be clSkyBlue
2424 - No background image
2525 - No description
2626 - Window size = 320px x 240px
2727 - LCL and FPC build text
2828 - Compilation Date/Time text
2929- The About screen will show (ShowAbout method)
3030 - No License or Credits buttons
3131 - The same text as the default Splash Screen
3232
3333The default screens are probably OK for a quick one-off app that is not for commercial use. It shows useful information for a developer.
3434
3535However; if you think they look a bit *uninspiring*, the SplashAbout component is capable of considerable customisation from its default settings, and there are many properties available to help you achieve *a unique and very inspiring result*.
3636
3737Here are the SplashAbout properties you can change for each kind of customisation:
3838
3939### Personalising the Splash screen
4040
4141- Properties that affect the Splash Screen:
4242 - The Application Title,Icon and VersionInfo (set in Project/Options)
4343 - BackGroundColor
4444 - BitMapBackground
4545 - BitmapMaskColor
4646 - BitmapMaskMono
4747 - DelaySeconds
4848 - Description
4949 - Font
5050 - FormSplashHeight
5151 - FormSplashTextAlign
5252 - FormSplashWidth
5353 - Graphics
5454 - Icon
5555 - MaskType
5656 - Organisation
5757 - ShowDecription
5858 - ShowPoweredBy
5959 - TitleStyle
6060 - UserTitle
6161
6262### Personalising the About screen
6363
6464- Properties that affect the About Screen:
6565 - The Application Title,Icon and VersionInfo (set in Project/Options)
6666 - Author
6767 - BackGroundColor
6868 - CreditLines
6969 - CreditsTextFileName
7070 - Description
7171 - Font
7272 - FormAboutHeight
7373 - FormAboutTextAlign
7474 - FormAboutWidth
7575 - Graphics
7676 - Icon
7777 - LicenseFile
7878 - Orgnisation
7979 - ShowCreditButton
8080 - ShowDecription
8181 - LicenseFile
8282 - SupportContact
8383 - TitleStyle
8484 - UserTitle
8585
8686### Personalising the License Screen
8787
8888- Properties that affect the License Screen:
8989 - Author
9090 - LicenseFile
9191 - Organisation
9292 - SupportContact
9393
9494### Personalising the Credits Screen
9595
9696- Properties that affect the Credits Screen:
9797 - CreditLines
9898 - CreditsTextFileName
9999 - ShowCreditButton
100100
101101------------------------------------------------------------------------
102102
103103## How To...
104104
105105### How to show a shaped Splash screen
106106
107107Properties to set:
108108
109109- BitmapMaskColor (Graphics=saResources)
110110- BitmapMaskMono (Graphics=saResources)
111111- MaskType
112112- Graphics
113113
114114#### MaskType
115115
116116- Default=saNoMask
117117
118118The simple thing to do is to choose one of the built-in masks (saRoundedRect, saBigCog, saBigFlower and saBigSplash) If you choose saUserMask then you need to make a 2-colour mask graphic in the .BMP format. You can optionally also make a corresponding BitMapMaskColor image. Note: There are some example images deployed in the /exampleapp folder of the distribution archive
119119
120120##### How to make a BitMapMaskMono image
121121
122122- Start with a black (RGB:0,0,0)background
123123- Make your contigious shape using a white (RGB:255,255,255) shape
124124- Reduce the image to a 2-color palette
125125- Save the file as a Windows Bitmap (.BMP) and use it to set the BitmapMaskColor property
126126 - It should NOT be run-length encoded (RLE)
127127
128128If you want a shaped colour splash screen then you need to make a corresponding BitMapColor image
129129
130130##### How to make a BitmapMaskColor image
131131
132132You would normally do this before making the BitmapMaskMono image
133133
134134- Make with an colour image that has a white (RGB:255,255,255) background
135135 - You can use a selection tool to isolate the background then paint it white in a graphics application
136136- Save the file as a .JPG and use it to set the BitmapMaskColor property
137137- To make a corresponding BitmapMaskColor image:
138138 - Invert the selection, and paint it black (RGB:0.0.0)
139139 - Reduce the image to a 2-color palette
140140 - Save the new image as a non-RLE Windows Bitmap file (.BMP) and use it to set the BitmapMaskMono property
141141
142142------------------------------------------------------------------------
143143
144144### How to show a license button on the About screen
145145
146146Properties to set:
147147
148148- LicenseFile
149149- Optional:
150150 - Author
151151 - Organisation
152152 - SupportContact
153153
154154#### LicenseFile
155155
156156- Default=saNone
157157
158158##### Standard licences (GPL etc)
159159
160160- If you set LicenseFile to one of the standard license type (saGPL,saLGPL,saMIT or saModifiedGPL) then the License button will appear on the About dialog
161161- When clicked, the License button shows a modal window with the appropriate license text
162162- The text is stored as a resource, so no need for external files
163163- The text of the standard license can be modified by setting the Author Organisation and SupportContact properties
164164
165165##### User licenses
166166
167167- If you set LicenseFile to saUserFile then the License button will appear on the About dialog
168168- When clicked, the License button shows a modal window with text
169169- The text will come from a file you create yourself which must be called 'license.txt' and deployed in the same folder as your executable (see exampleapp)
170170- You can use the following tokens in 'license.txt'
171171 - All instances of \<name of author\> are replaced with the Author property
172172 - All instances of \<contact\> are replaced with the SupportContact property
173173 - All instances of \<copyright holders\> are replaced with the Organisation property
174174 - All instances of \<year\> are replaced with the compilation date
175175
176176------------------------------------------------------------------------
177177
178178### How to show a Credits button on the About screen
179179
180180Properties to set:
181181
182182- ShowCreditButton
183183- CreditLines
184184- Optional
185185- Font (inherited)
186186- BackgroundColor (inherited)
187187 - CreditTextFileName
188188
189189#### ShowCreditButton
190190
191191- Default-False
192192- If set to True, then the Credits button will appear on the About dialog
193193- When clicked it will show either:
194194 - The contents of CreditLines
195195 - or the contents of a text file (default name='credits.txt') deployed in the same folder as your executable
196196- If both contain no text, then default text is shown
197197- If both contain text, then 'credits'txt' will be shown in preference
198198- The text will scroll upwards, and repeat until the user clicks the close button
199199- The text will be centre-justified
200200
201201#### CreditLines
202202
203203- default=(empty)
204204- Use the Object inspector to write your credits text.
205205
206206#### CreditTextFileName
207207
208208- This can be set so that is doesn't clash with any existing deployed text file
209209
210210------------------------------------------------------------------------
211211
212212### How to show a 'Powered by Lazarus' pre-splash graphic
213213
214214Properties to set:
215215
216216- ShowPoweredBy
217217
218218That's it!
219219
220220------------------------------------------------------------------------
221221
222222### How to show different text in the Splash and About screens
223223
224224Properties to set:
225225
226226- ShowDescription
227227- Description
228228- TitleStyle
229229- UserTitle
230230- Organisation
231231- FormSplashTextAlign
232232- FormAboutTextAlign
233233- LicenseFile
234234- Application VersionInfo
235235
236236##### Description and ShowDescription
237237
238238- Use the Object Inspector to write a short description of your application and set ShowDescription=True
239239- The Description text will show on both the Splash and About dialogs
240240- The Description text will replace the Build and Platform information on both dialogs
241241
242242##### TitleStyle and UserTitle
243243
244244- If TitleStyle=saUserTitle then the UserTitle text will appear on the Splash and About dialogs
245245- If TitleStyle=saForm the Caption text of your mainform will be used
246246- If TitleStyle=saApplication, the Application title (set in Project/Options) will be used
247247 - The text will also appear as the caption text of all dialogs
248248
249249##### Organisation
250250
251251- If set, then the text will appear below the UserTitle on the Splash and About dialogs
252252
253253##### FormSplashTextAlign and FormAboutTextAlign
254254
255255- You might want to set these if you have a background image that has a blank area for text on one side
256256
257257##### LicenseFile
258258
259259- If this is anything other than LicenseFile=saNone, then the text 'Released under \<licensetype\> license' will appear at the bottom of the Splash and About dialogs where \<licensetype\> is
260260 - LicenseFile=saGPL: 'GPL'
261261 - LicenseFile=saLGPL: 'LGPL'
262262 - LicenseFile=saMIT: 'MIT'
263263 - LicenseFile=saModifiedGPL: 'Modified GPL'
264264 - LicenseFile=saUserFile: 'proprietry'
265265
266266##### Application Version info
267267
268268- If you enable Version Information in the Project/Options then it will appear in both Splash and About dialogs
269269
270270------------------------------------------------------------------------
271271
272272### How to show a graphic in the Splash and About screens
273273
274274Properties to set:
275275
276276- BitmapBackground
277277- Optional:
278278 - FormSplashWidth
279279 - FormSplashHeight
280280 - FormAboutWidth
281281 - FormAboutHeight
282282
283283##### BitmapBackground
284284
285285- Use the Object Inspector to load a graphic file (most types supported)
286286- The graphic will override the BackgroundColor setting
287287- The graphic will stretch to fit the Splash and About dialogs
288288
289289##### FormSplashWidth/Height and FormAboutWidth/Height
290290
291291- You can set these to any reasonable values and the controls and background will stretch/move as necessary
292292
293293------------------------------------------------------------------------
294294
295295### How to set a custom Icon
296296
297297Properties to set:
298298
299299- Icon
300300- TitleStyle
301301
302302##### TitleStyle
303303
304304- To show a custom Icon then TitleStyle must be set to saUserTitle
305305
306306##### Icon
307307
308308- Use the Object Inspector to set an appropriate icon
309309 - It will be shown on all dialogs
310310- If TitleStyle is set to saForm then the mainform's icon will always be shown
311311- If TitleStyle is set to saApplication then the application's always icon will be shown
312312- If no custom icons have been set for either, the the default Lazarus icon is displayed
313313
314314------------------------------------------------------------------------
315315
316316### How (or why) to avoid a bigger executable by using external graphic files
317317
318318SplashAbout has been designed from the start to be very lightweight. Splash and About dialogs are hardly the most important part of an application so the component is designed to add as little as possible in both filesize and effort. Lazarus/fpc are extremely efficient in storing resources in executables, however adding SplashAbout with embedded graphics will make your executable bigger. If you choose to set a huge Splash and/or About dialog with correspondingly huge graphics, maybe it will be worth 'going external'
319319
320320Here are the stats:
321321
322322- Typical Win64 application using SplashAbout with every graphics property set and stored in the executable = 5MB
323323- Typical Win64 application using SplashAbout with all graphics deployed externally=3.7MB
324324
325325If this difference is important to your particular deployment, then read on...
326326
327327Properties to set:
328328
329329- Graphics
330330- ExternalFileBackgroundImage
331331- ExternalFileIcon
332332- ExternalFileMaskMonoImage
333333- ExternalFileMaskColorImage
334334- ExternalFileOptions
335335
336336##### Graphics
337337
338338- Default=saUseResources
339339- If Graphics=saExternalFiles then the ExternalFile\<propertyname\> properties will be used
340340
341341##### ExternalFile\<propertyname\>
342342
343343- All ExternalFile properties accept a simple filename as text
344344- All external files MUST be in the executable's deployed folder
345345- SplashAbout will test at runtime to see if the appropriate file is present, and will display an error message if it is absent or in the wrong folder
346346
347347##### ExternalFileOptions
348348
349349- Setting these will allow you to use some External files and some resources together
350350
351351------------------------------------------------------------------------
352352
353353### How to use a large background image
354354
355355- By default, ShowSplash respects the dimensions you set in the Splash and About Formwidth and Formheight properties. It will stretch/compress any BackgroundImage to fit the window which is preferred behaviour. You may, however want to resize the Splash and About windows to fit your background graphic, or even avoid all resizing altogether.
356356- Note: ResizeMode has no effect on shaped Splash screens - they are always resized to fit the mask.
357357
358358Properties to set:
359359
360360- ResizeMode
361361- BackgroundImage
362362
363363##### ResizeMode
364364
365365- Default=saResizeGraphic
366366- If ResizeMode=saResizeWindow, then SplashAbout will resize the Splash and About windows to the loaded graphic dimensions.
367367- If ResizeMode=saNoResize, then the Splash and About width/height properties will be respected, and the BackgroundImage will display without stretching or compressing.
368368
369369------------------------------------------------------------------------
370370
371371### How to deploy an application that uses the SplashAbout component
372372
373373- If Graphics=saResources then no external files are necessary
374374- If ShowCreditButton=True, CreditLines is empty then you will need to deploy a 'credits.txt' textfile (CreditsTextfileName can set the filename) in the same folder as your deployed executable.
375375 - This could be a good option if you want to update the Credits screen without recompiling and re-deploying the executable
376376
377377------------------------------------------------------------------------
378378
379379## Is it OK to...
380380
381381Some information about licensing, updating the source etc.
382382
383383### Is it OK to use SplashAbout in a commercial application?
384384
385385- Splashabout is released under the LGPL licence, so the short answer is 'yes' I would hope for a mention in the Credits screen :)
386386- Here is the relevant text of the LGPL license:
387387
388-` This library is free software; you can redistribute it and/or modify it`\
389-` under the terms of the GNU Library General Public License as published by`\
390-` the Free Software Foundation; either version 2 of the License, or (at your`\
391-` option) any later version.`\
392-` This program is distributed in the hope that it will be useful, but WITHOUT`\
393-` ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or`\
394-` FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License`\
395-` for more details.`
388+``` pascal
389+ This library is free software; you can redistribute it and/or modify it
390+ under the terms of the GNU Library General Public License as published by
391+ the Free Software Foundation; either version 2 of the License, or (at your
392+ option) any later version.
393+ This program is distributed in the hope that it will be useful, but WITHOUT
394+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
395+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License
396+ for more details.
397+```
396398
397399### Is it OK to alter/change the code for my own version of SplashAbout?
398400
399401- Of course! That's what open source software is all about
400402- \[[mailto:minesadorada@charcodelvalle.com](mailto:minesadorada@charcodelvalle.com)\| Email me\] with your updates as a courtesy and perhaps I could incorporate them here
401403- In the spirit of open source, please retain acknowledgement of my source code
402404
403405Page written by Torrenter 20:06, 2 June 2014 (CEST)
404406
405407------------------------------------------------------------------------
406408
407409## See Also
408410
409411[[SplashAbout|SplashAbout component main page]]
410412
411413---
412414*From the Free Pascal wiki, page "SplashAbout/Advanced Use", as it stood on 2014-06-04 after a change by Torrenter, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
413415Category: Components

Back to history