How to hide the status bar while Splashscreen is Shown in IOS

To hide the status bar while Splashscreen is Shown in IOS follow these Steps.

  • 1. Open the Info.plist File.
  • 2. Search for the “Status bar is initially hidden” property and set it to checked.
  • if you do not have the “Status bar is initially hidden” property, simply add it by selecting the last line in the File and then click the plus button on the right end of the line.

    To show the status bar you can use this snippet.

    [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone]; //UIStatusBarAnimationNone, UIStatusBarAnimationFade or UIStatusBarAnimationSlide
    

    How to set the ios bookmark icon in HTML

    To set the ios bookmark icon in HTML you can use the following snippet.

    Sample HTML

    <link rel="apple-touch-icon" href="iOs_Icon.png"/>
    

    If your icon is already glossy, you can prevent the device from adding its own gloss by using.

    Sample HTML

    <link rel="apple-touch-icon-precomposed" href="iOs_Icon.png"/>
    

    How to set the wallpaper in C# and VB.NET

    To set the wallpaper in C# and VB.NET you can use the following snippet.

    Sample C#

    [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
    public static extern int SystemParametersInfo(int uAction, int uParam, string lpvParam, int fuWinIni);
    
    public const int SPI_SETDESKWALLPAPER = 20;
    public const int SPIF_UPDATEINIFILE = 1;
    public const int SPIF_SENDCHANGE = 2;
    
    public static void SetWallpaper(string imagePath)
    {
    	if (File.Exists(imagePath))
    	{
    		SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, imagePath, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);
    	}
    }
    

    Sample VB.NET

    <DllImport("user32.dll", CharSet := CharSet.Auto, SetLastError := True)> _
    Public Shared Function SystemParametersInfo(uAction As Integer, uParam As Integer, lpvParam As String, fuWinIni As Integer) As Integer
    End Function
    
    Public Const SPI_SETDESKWALLPAPER As Integer = 20
    Public Const SPIF_UPDATEINIFILE As Integer = 1
    Public Const SPIF_SENDCHANGE As Integer = 2
    
    Public Shared Sub SetWallpaper(imagePath As String)
    	If File.Exists(imagePath) Then
    		SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, imagePath, SPIF_UPDATEINIFILE Or SPIF_SENDCHANGE)
    	End If
    End Sub
    

    How to take a screenshot in Java

    To take a screenshot in Java you can use the following snippet.

    Sample Java

    BufferedImage bufferedImage = new Robot().createScreenCapture(new Rectangle(Toolkit.getDefaultToolkit().getScreenSize()));
    ImageIO.write(bufferedImage, "png", new File("C:\screenshot.png"));
    

    for more informations see BufferedImage, ImageIO, Toolkit: getScreenSize(), Robot


    How to get number and informations of all monitors in C# and VB.NET

    To get number and informations of all monitors in C# and VB.NET you can use the following snippet.

    Sample C#

    for (int index = 0; index < Screen.AllScreens.Length; index++)
    {
    	var screen = Screen.AllScreens[index];
    	Console.WriteLine("Name: {0}", screen.DeviceName);
    	Console.WriteLine("Bounds: {0}", screen.Bounds);
    	Console.WriteLine("Working Area: {0}", screen.WorkingArea);
    	Console.WriteLine("Primary Screen: {0}", screen.Primary);
    	Console.WriteLine("Type: {0}", screen.GetType());
    }
    

    Sample VB.NET

    For index As Integer = 0 To Screen.AllScreens.Length - 1
    	Dim screen__1 = Screen.AllScreens(index)
    	Console.WriteLine("Name: {0}", screen__1.DeviceName)
    	Console.WriteLine("Bounds: {0}", screen__1.Bounds)
    	Console.WriteLine("Working Area: {0}", screen__1.WorkingArea)
    	Console.WriteLine("Primary Screen: {0}", screen__1.Primary)
    	Console.WriteLine("Type: {0}", screen__1.[GetType]())
    Next