Hello, I did as you said to get the bubbles to be transparent and I got it working. Though I have one problem. That is after about 10 minutes of it running the bubbles crash or restart? some times they go rather fast or just stop and then freeze and some
bubbles might disappear or they all stay and then its they stop and its like the screensaver started again on top of the frozen bubbles. I'd like this to stop if possible. Any suggestions?
had same issue, added custom program that change scr setting after custom start; (maybe exists simple way with cmd or vbs but don't have time to look up it);
'some times they go rather fast' - maybe MS bug still appears sometimes when app run too long;
namespace runbubbles
{
static class Program
{
[DllImport("user32.dll")]
public static extern bool LockWorkStation();
// Signatures for unmanaged calls
[DllImport("user32.dll", CharSet = CharSet.Auto)]
private static extern bool SystemParametersInfo(
int uAction, int uParam, ref int lpvParam,
int flags);
[DllImport("user32.dll", CharSet = CharSet.Auto)]
private static extern bool SystemParametersInfo(
int uAction, int uParam, ref bool lpvParam,
int flags);
[DllImport("kernel32.dll", SetLastError = true)]
public static extern EXECUTION_STATE SetThreadExecutionState(EXECUTION_STATE esFlags);
// Constants
private const int SPI_GETSCREENSAVERACTIVE = 16;
private const int SPI_SETSCREENSAVERACTIVE = 17;
private const int SPI_GETSCREENSAVERTIMEOUT = 14;
private const int SPI_SETSCREENSAVERTIMEOUT = 15;
private const int SPI_GETSCREENSAVERRUNNING = 114;
private const int SPIF_SENDWININICHANGE = 2;
private const uint DESKTOP_WRITEOBJECTS = 0x0080;
private const uint DESKTOP_READOBJECTS = 0x0001;
private const int WM_CLOSE = 16;
[FlagsAttribute]
public enum EXECUTION_STATE : uint
{
ES_SYSTEM_REQUIRED = 0x00000001,
ES_DISPLAY_REQUIRED = 0x00000002,
// Legacy flag, should not be used.
// ES_USER_PRESENT = 0x00000004,
ES_AWAYMODE_REQUIRED = 0x00000040,
ES_CONTINUOUS = 0x80000000,
}
public static void SetScreenSaverActive(int active)
{
if (active == 0)
SetThreadExecutionState(EXECUTION_STATE.ES_CONTINUOUS | EXECUTION_STATE.ES_DISPLAY_REQUIRED | EXECUTION_STATE.ES_SYSTEM_REQUIRED);
else
SetThreadExecutionState(EXECUTION_STATE.ES_CONTINUOUS);
}
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
//[PrincipalPermission(SecurityAction.Demand, Role = @"BUILTIN\Administrators")]
static void Main()
{
SetScreenSaverActive(0);
ProcessStartInfo starter = new ProcessStartInfo("Bubbles.scr");
starter.Arguments = "/s";
starter.WindowStyle = ProcessWindowStyle.Hidden;
starter.CreateNoWindow = true;
starter.RedirectStandardOutput = false;
starter.UseShellExecute = false;
Process process = new Process();
process.StartInfo = starter;
process.Start();
process.WaitForExit();
SetScreenSaverActive(1);
LockWorkStation();
Application.Exit();
}
}
}