Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht

Hallo,

ich habe ein Problem...

Ich möchte über ein C# Programm zunächst abfragen, ob der Bildschirmschoner gerade aktiv ist, dass habe ich wie folgt gelöst:


	public static class ScreenSaver

	{

		// Signatures for unmanaged calls

        [DllImport("user32.dll", EntryPoint = "SystemParametersInfo")]

        public static extern bool SystemParametersInfo(uint uiAction, uint uiParam, ref uint pvParam, uint fWinIni);


		// Constants

		private const int SPI_GETSCREENSAVERRUNNING = 114;

        private const int SPI_GETSCREENSAVERRUNNING = 114;


		// Returns TRUE if the screen saver is actually running

		public static bool GetScreenSaverRunning( )

		{

			bool isRunning = false;


			SystemParametersInfo( SPI_GETSCREENSAVERRUNNING, 0, ref isRunning, 0 );

			return isRunning;

		}


        //Schließt den Bildschirmschoner

        private void ScreenSaverClose(object sender, EventArgs e)

        {

            if (GetScreenSaverRunning = true)

            {

             //Bildschirmschoner schließen

            }

        }


	}

Jetzt möchte ich aber noch den Bildschirmschoner schließen,

wenn er aktiv ist und das ohne die Maus und die Tastatur zu bewegen/benutzen?

Ist dies auch über SystemParametersInfo möglich?

Wenn ja, wäre für mich auch das Wie interessant... :)

Mfg,

Seba89

hatte ich auch schon gefunden...

Konnte damit nicht viel anfangen, hat jetzt aber geklappt!

Danke! :)

*CLOSED*

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.