Visual Basic 2013-0049
Visual Basic 2013-0049
Visual Basic 2013-0049
3. Click the Spin button 15 or 16 more times, watching the results of the spins in the number text
blocks.
About half the time you spin, you hit the jackpot—pretty easy odds. (The actual odds are
about 2.8 times out of 10; you're just lucky at first.) Later on, you might want to make the
game tougher by displaying the photo only when two or three 7s appear, or by creating a run-
ning total of winnings.
4. When you've finished experimenting with your new creation, close the Windows Store app.
The program stops, and the IDE reappears on your screen. Click the Stop Debugging button
on the toolbar to end the program. Now you'll add a splash screen to the project.
Although you can create a splash screen with Microsoft Paint or another third-party graphics
program, you can also create a simple splash screen within Visual Studio. Just remember that a splash
screen appears very briefly when you first launch your app. Accordingly, this is not the place to put
elaborate program instructions or copyright information. You'll want to avoid placing advertisements
or version information on a splash screen.
Instead, use the splash screen to offer a preview of the functionality of your app in some unique
way. Consider an image or photo that will be easily adapted to other countries and cultures (that is,
easily localizable) and that can be displayed effectively in different screen resolutions. Notice that
Portable Network Graphics (.png) format is used because this file type is capable of displaying alpha
transparency and 24-bit color images. When part of an image is formatted as transparent, the back-
ground color will be displayed behind it. (You'll see this in most splash screens and tiles in Windows
Store and Windows Phone apps.)
1. In Solution Explorer, open the Assets folder, and then double-click the file SplashScreen.scale-
100.png.
2. This action opens the Image Editor Designer in Visual Studio, and loads the SplashScreen.
scale-100.png file into the editor. Your screen looks like this: