Sign in Join
Wiki copytemporary

SplashAbout/Advanced Use: what changed

Revision 1 to 2. 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
8-<figure>
9-<img src="splashabout_properties_tester144.png" title="splashabout_properties_tester144.png" />
10-<figcaption>splashabout_properties_tester144.png</figcaption>
11-</figure>
8+![](/wiki-images/8/8a/Splashabout_properties_tester144.png)
129
1310------------------------------------------------------------------------
1411
1512## Properties
1613
1714When dropped onto a new application mainform, the property defaults will show a Splash Screen and About window that look something like this:
1815
19-<figure>
20-<img src="splashabout_default_splash.png" title="splashabout_default_splash.png" />
21-<figcaption>splashabout_default_splash.png</figcaption>
22-</figure>
16+![](/wiki-images/8/8b/Splashabout_default_splash.png)
2317
24-<figure>
25-<img src="splashabout_default_about.png" title="splashabout_default_about.png" />
26-<figcaption>splashabout_default_about.png</figcaption>
27-</figure>
18+![](/wiki-images/0/04/Splashabout_default_about.png)
2819
2920- A normal (borderless rectangle) Splash screen displayed for 2 seconds (ShowSplash method)
3021 - It will use the Application default icon (default=Lazarus icon)
3122 - Title will be the Application name (default='project1')
3223 - Colour will be clSkyBlue
3324 - No background image
3425 - No description
3526 - Window size = 320px x 240px
3627 - LCL and FPC build text
3728 - Compilation Date/Time text
3829- The About screen will show (ShowAbout method)
3930 - No License or Credits buttons
4031 - The same text as the default Splash Screen
4132
4233The default screens are probably OK for a quick one-off app that is not for commercial use. It shows useful information for a developer.
4334
4435However; 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*.
4536
4637Here are the SplashAbout properties you can change for each kind of customisation:
4738
4839### Personalising the Splash screen
4940
5041- Properties that affect the Splash Screen:
5142 - The Application Title,Icon and VersionInfo (set in Project/Options)
5243 - BackGroundColor
5344 - BitMapBackground
5445 - BitmapMaskColor
5546 - BitmapMaskMono
5647 - DelaySeconds
5748 - Description
5849 - Font
5950 - FormSplashHeight
6051 - FormSplashTextAlign
6152 - FormSplashWidth
6253 - Graphics
6354 - Icon
6455 - MaskType
6556 - Organisation
6657 - ShowDecription
6758 - ShowPoweredBy
6859 - TitleStyle
6960 - UserTitle
7061
7162### Personalising the About screen
7263
7364- Properties that affect the About Screen:
7465 - The Application Title,Icon and VersionInfo (set in Project/Options)
7566 - Author
7667 - BackGroundColor
7768 - CreditLines
7869 - CreditsTextFileName
7970 - Description
8071 - Font
8172 - FormAboutHeight
8273 - FormAboutTextAlign
8374 - FormAboutWidth
8475 - Graphics
8576 - Icon
8677 - LicenseFile
8778 - Orgnisation
8879 - ShowCreditButton
8980 - ShowDecription
9081 - LicenseFile
9182 - SupportContact
9283 - TitleStyle
9384 - UserTitle
9485
9586### Personalising the License Screen
9687
9788- Properties that affect the License Screen:
9889 - Author
9990 - LicenseFile
10091 - Organisation
10192 - SupportContact
10293
10394### Personalising the Credits Screen
10495
10596- Properties that affect the Credits Screen:
10697 - CreditLines
10798 - CreditsTextFileName
10899 - ShowCreditButton
109100
110101------------------------------------------------------------------------
111102
112103## How To...
113104
114105### How to show a shaped Splash screen
115106
116107Properties to set:
117108
118109- BitmapMaskColor (Graphics=saResources)
119110- BitmapMaskMono (Graphics=saResources)
120111- MaskType
121112- Graphics
122113
123114#### MaskType
124115
125116- Default=saNoMask
126117
127118The 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
128119
129120##### How to make a BitMapMaskMono image
130121
131122- Start with a black (RGB:0,0,0)background
132123- Make your contigious shape using a white (RGB:255,255,255) shape
133124- Reduce the image to a 2-color palette
134125- Save the file as a Windows Bitmap (.BMP) and use it to set the BitmapMaskColor property
135126 - It should NOT be run-length encoded (RLE)
136127
137128If you want a shaped colour splash screen then you need to make a corresponding BitMapColor image
138129
139130##### How to make a BitmapMaskColor image
140131
141132You would normally do this before making the BitmapMaskMono image
142133
143134- Make with an colour image that has a white (RGB:255,255,255) background
144135 - You can use a selection tool to isolate the background then paint it white in a graphics application
145136- Save the file as a .JPG and use it to set the BitmapMaskColor property
146137- To make a corresponding BitmapMaskColor image:
147138 - Invert the selection, and paint it black (RGB:0.0.0)
148139 - Reduce the image to a 2-color palette
149140 - Save the new image as a non-RLE Windows Bitmap file (.BMP) and use it to set the BitmapMaskMono property
150141
151142------------------------------------------------------------------------
152143
153144### How to show a license button on the About screen
154145
155146Properties to set:
156147
157148- LicenseFile
158149- Optional:
159150 - Author
160151 - Organisation
161152 - SupportContact
162153
163154#### LicenseFile
164155
165156- Default=saNone
166157
167158##### Standard licences (GPL etc)
168159
169160- 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
170161- When clicked, the License button shows a modal window with the appropriate license text
171162- The text is stored as a resource, so no need for external files
172163- The text of the standard license can be modified by setting the Author Organisation and SupportContact properties
173164
174165##### User licenses
175166
176167- If you set LicenseFile to saUserFile then the License button will appear on the About dialog
177168- When clicked, the License button shows a modal window with text
178169- 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)
179170- You can use the following tokens in 'license.txt'
180171 - All instances of \<name of author\> are replaced with the Author property
181172 - All instances of \<contact\> are replaced with the SupportContact property
182173 - All instances of \<copyright holders\> are replaced with the Organisation property
183174 - All instances of \<year\> are replaced with the compilation date
184175
185176------------------------------------------------------------------------
186177
187178### How to show a Credits button on the About screen
188179
189180Properties to set:
190181
191182- ShowCreditButton
192183- CreditLines
193184- Optional
194185- Font (inherited)
195186- BackgroundColor (inherited)
196187 - CreditTextFileName
197188
198189#### ShowCreditButton
199190
200191- Default-False
201192- If set to True, then the Credits button will appear on the About dialog
202193- When clicked it will show either:
203194 - The contents of CreditLines
204195 - or the contents of a text file (default name='credits.txt') deployed in the same folder as your executable
205196- If both contain no text, then default text is shown
206197- If both contain text, then 'credits'txt' will be shown in preference
207198- The text will scroll upwards, and repeat until the user clicks the close button
208199- The text will be centre-justified
209200
210201#### CreditLines
211202
212203- default=(empty)
213204- Use the Object inspector to write your credits text.
214205
215206#### CreditTextFileName
216207
217208- This can be set so that is doesn't clash with any existing deployed text file
218209
219210------------------------------------------------------------------------
220211
221212### How to show a 'Powered by Lazarus' pre-splash graphic
222213
223214Properties to set:
224215
225216- ShowPoweredBy
226217
227218That's it!
228219
229220------------------------------------------------------------------------
230221
231222### How to show different text in the Splash and About screens
232223
233224Properties to set:
234225
235226- ShowDescription
236227- Description
237228- TitleStyle
238229- UserTitle
239230- Organisation
240231- FormSplashTextAlign
241232- FormAboutTextAlign
242233- LicenseFile
243234- Application VersionInfo
244235
245236##### Description and ShowDescription
246237
247238- Use the Object Inspector to write a short description of your application and set ShowDescription=True
248239- The Description text will show on both the Splash and About dialogs
249240- The Description text will replace the Build and Platform information on both dialogs
250241
251242##### TitleStyle and UserTitle
252243
253244- If TitleStyle=saUserTitle then the UserTitle text will appear on the Splash and About dialogs
254245- If TitleStyle=saForm the Caption text of your mainform will be used
255246- If TitleStyle=saApplication, the Application title (set in Project/Options) will be used
256247 - The text will also appear as the caption text of all dialogs
257248
258249##### Organisation
259250
260251- If set, then the text will appear below the UserTitle on the Splash and About dialogs
261252
262253##### FormSplashTextAlign and FormAboutTextAlign
263254
264255- You might want to set these if you have a background image that has a blank area for text on one side
265256
266257##### LicenseFile
267258
268259- 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
269260 - LicenseFile=saGPL: 'GPL'
270261 - LicenseFile=saLGPL: 'LGPL'
271262 - LicenseFile=saMIT: 'MIT'
272263 - LicenseFile=saModifiedGPL: 'Modified GPL'
273264 - LicenseFile=saUserFile: 'proprietry'
274265
275266##### Application Version info
276267
277268- If you enable Version Information in the Project/Options then it will appear in both Splash and About dialogs
278269
279270------------------------------------------------------------------------
280271
281272### How to show a graphic in the Splash and About screens
282273
283274Properties to set:
284275
285276- BitmapBackground
286277- Optional:
287278 - FormSplashWidth
288279 - FormSplashHeight
289280 - FormAboutWidth
290281 - FormAboutHeight
291282
292283##### BitmapBackground
293284
294285- Use the Object Inspector to load a graphic file (most types supported)
295286- The graphic will override the BackgroundColor setting
296287- The graphic will stretch to fit the Splash and About dialogs
297288
298289##### FormSplashWidth/Height and FormAboutWidth/Height
299290
300291- You can set these to any reasonable values and the controls and background will stretch/move as necessary
301292
302293------------------------------------------------------------------------
303294
304295### How to set a custom Icon
305296
306297Properties to set:
307298
308299- Icon
309300- TitleStyle
310301
311302##### TitleStyle
312303
313304- To show a custom Icon then TitleStyle must be set to saUserTitle
314305
315306##### Icon
316307
317308- Use the Object Inspector to set an appropriate icon
318309 - It will be shown on all dialogs
319310- If TitleStyle is set to saForm then the mainform's icon will always be shown
320311- If TitleStyle is set to saApplication then the application's always icon will be shown
321312- If no custom icons have been set for either, the the default Lazarus icon is displayed
322313
323314------------------------------------------------------------------------
324315
325316### How (or why) to avoid a bigger executable by using external graphic files
326317
327318SplashAbout 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'
328319
329320Here are the stats:
330321
331322- Typical Win64 application using SplashAbout with every graphics property set and stored in the executable = 5MB
332323- Typical Win64 application using SplashAbout with all graphics deployed externally=3.7MB
333324
334325If this difference is important to your particular deployment, then read on...
335326
336327Properties to set:
337328
338329- Graphics
339330- ExternalFileBackgroundImage
340331- ExternalFileIcon
341332- ExternalFileMaskMonoImage
342333- ExternalFileMaskColorImage
343334- ExternalFileOptions
344335
345336##### Graphics
346337
347338- Default=saUseResources
348339- If Graphics=saExternalFiles then the ExternalFile\<propertyname\> properties will be used
349340
350341##### ExternalFile\<propertyname\>
351342
352343- All ExternalFile properties accept a simple filename as text
353344- All external files MUST be in the executable's deployed folder
354345- 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
355346
356347##### ExternalFileOptions
357348
358349- Setting these will allow you to use some External files and some resources together
359350
360351------------------------------------------------------------------------
361352
362353### How to use a large background image
363354
364355- 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.
365356- Note: ResizeMode has no effect on shaped Splash screens - they are always resized to fit the mask.
366357
367358Properties to set:
368359
369360- ResizeMode
370361- BackgroundImage
371362
372363##### ResizeMode
373364
374365- Default=saResizeGraphic
375366- If ResizeMode=saResizeWindow, then SplashAbout will resize the Splash and About windows to the loaded graphic dimensions.
376367- If ResizeMode=saNoResize, then the Splash and About width/height properties will be respected, and the BackgroundImage will display without stretching or compressing.
377368
378369------------------------------------------------------------------------
379370
380371### How to deploy an application that uses the SplashAbout component
381372
382373- If Graphics=saResources then no external files are necessary
383374- 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.
384375 - This could be a good option if you want to update the Credits screen without recompiling and re-deploying the executable
385376
386377------------------------------------------------------------------------
387378
388379## Is it OK to...
389380
390381Some information about licensing, updating the source etc.
391382
392383### Is it OK to use SplashAbout in a commercial application?
393384
394385- Splashabout is released under the LGPL licence, so the short answer is 'yes' I would hope for a mention in the Credits screen :)
395386- Here is the relevant text of the LGPL license:
396387
397388` This library is free software; you can redistribute it and/or modify it`\
398389` under the terms of the GNU Library General Public License as published by`\
399390` the Free Software Foundation; either version 2 of the License, or (at your`\
400391` option) any later version.`\
401392` This program is distributed in the hope that it will be useful, but WITHOUT`\
402393` ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or`\
403394` FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License`\
404395` for more details.`
405396
406397### Is it OK to alter/change the code for my own version of SplashAbout?
407398
408399- Of course! That's what open source software is all about
409400- \[[mailto:minesadorada@charcodelvalle.com](mailto:minesadorada@charcodelvalle.com)\| Email me\] with your updates as a courtesy and perhaps I could incorporate them here
410401- In the spirit of open source, please retain acknowledgement of my source code
411402
412403Page written by Torrenter 20:06, 2 June 2014 (CEST)
413404
414405------------------------------------------------------------------------
415406
416407## See Also
417408
418409[[SplashAbout|SplashAbout component main page]]
419410
420411---
421412*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).*
422413Category: Components

Back to history