Example #1
0
        protected override void Initialize()
        {            
            // Setup a couple of bitmaps
            // First make a bitmap to capture the current screen image
            RectangleI rect = DesktopView.MainDesktopView.Frame;
            fScreenImage = new GDIBitmap("image1", 0, 0, rect.Width, rect.Height);
            GDIRenderer.BitBlt(fScreenImage.GraphDevice.DeviceContext, 0, 0, rect.Width, rect.Height,
                DesktopView.MainDesktopView.GraphDevice.DeviceContext,
                0, 0, TernaryRasterOps.SRCCOPY);

            // Then make a bitmap we'll draw transitions onto
            fBlankImage = new GDIBitmap("image2", 0, 0, rect.Width, rect.Height);
            fBlankImage.ClearToWhite();

            // Load a picture
            fPicture = new GDIBitmap("LEAP.jpg",0,0);
            fPictureImage = new GDIBitmap("leap", 0, 0, rect.Width, rect.Height);
            int xoff = (rect.Width - fPicture.Width) / 2;
            int yoff = (rect.Height - fPicture.Height) / 2;
            fPictureImage.GraphDevice.DrawImage(fPicture,xoff,yoff,fPicture.Width,fPicture.Height);

            // Load some sound to play
            fPlayer = new SoundPlayer("c:\\media\\sounds\\BlueSkyMine.wma");
            fPlayer.Play();
            Animate();

            this.Quit();
        }