Recommended Posts

1) I would like a "Stick to Desktop" mode like, say, Rainlendar has. I don't want it always on top, but I don't want it in the middle of windows either.

I was bored and looking through this thread and found a request I was thinking about too. I can help you out here. Here is the code to pin the window to the desktop. What it does is set the window's parent to the desktop.

[DllImport("user32.dll", CharSet=CharSet.Auto)]
  public static extern IntPtr FindWindow(
 	 [MarshalAs(UnmanagedType.LPTStr)] string lpClassName,
 	 [MarshalAs(UnmanagedType.LPTStr)] string lpWindowName);

[DllImport("user32.dll")]
  public static extern IntPtr SetParent(
 	 IntPtr hWndChild,      // handle to window
 	 IntPtr hWndNewParent   // new parent window
 	 );

IntPtr hwndParent = FindWindow("ProgMan", null);
SetParent(hwndf,hwndParent);
this.TopMost = false;

Hmm, I got the free form code working, the same one you used, but I can't figure out how to add controls to the form. I use the proper add code but the control just doesn't show up on the form.

By making the window freeform, you are handling all the painting of the controls yourself, rather than having the framework do it. You must treat your window as a canvas rather than a form, drawing everything yourself.

I was bored and looking through this thread and found a request I was thinking about too. I can help you out here. Here is the code to pin the window to the desktop. What it does is set the window's parent to the desktop.

[DllImport("user32.dll", CharSet=CharSet.Auto)]
  public static extern IntPtr FindWindow(
 	 [MarshalAs(UnmanagedType.LPTStr)] string lpClassName,
 	 [MarshalAs(UnmanagedType.LPTStr)] string lpWindowName);

[DllImport("user32.dll")]
  public static extern IntPtr SetParent(
 	 IntPtr hWndChild,      // handle to window
 	 IntPtr hWndNewParent   // new parent window
 	 );

IntPtr hwndParent = FindWindow("ProgMan", null);
SetParent(hwndf,hwndParent);
this.TopMost = false;

I'll try that out and implement it if it works ok.

Thanks for the code, really helpfull (Y)

This program works great except I have a Tablet PC /w docking station, so whenever I change resolutions (ie play a game) while docked (two monitors) the meter jumps to some random location on the screen... Oddly when I try to move it back the battery meter runs away from the cursor, litterally when, i move the cursor near it it jumps away. Also when rotating the screen to tablet mode sometimes the title bar of the properties window appears on the desktop... even when I haven't been looking at the properties at all.

This program works great except I have a Tablet PC /w docking station, so whenever I change resolutions (ie play a game) while docked (two monitors) the meter jumps to some random location on the screen... Oddly when I try to move it back the battery meter runs away from the cursor, litterally when, i move the cursor near it it jumps away. Also when rotating the screen to tablet mode sometimes the title bar of the properties window appears on the desktop... even when I haven't been looking at the properties at all.

It's best to restart the program in such a case. I will look into that mattter.

When and what can we expect in the next release?

Haven't been working on it since the last release because I was busy with other things, so frankly I don't know.

The "stick to desktop" feature will probably added but I'm not sure about other features yet.

  • 2 weeks later...

Hi!

I don't know if this is allready mentioned (and I'm not planning to read 11 pages for that):

The green battery only shows up when reaching 95%, not instantly. Is it a bug or is it to prevent form crashing or... whatever.

p.s.: respect, nice piece of coding

Yes it is possible to take the icon out of the alt-tab menu. Infact the latest build I have here has that fixed already..... though it is not ready yet. That said.... I recently found a job (at Capgemini) and I am making long days. The consequence is that I don't have time to work on the program. So basically I have to move that to the weekends in which I almost never can find the energy to turn on the pc and work on software.

For short, I have no time...... sorry.

That's disappointing to hear. I'd like to at least see the new version you have before you completely give up on the program. Getting the icon out of the alt-tab list would make the program just about perfect for me. I would like to see continued development of this program though, it really is a great program. Thanks for all the work you have put into it up to this point! :cool:

thanks for the great work schmoove. One thing I noticed, my display is 1600X1200 and when i place the monitor all the way to the top right log out and back in again the monitor moves over to the left about 100-200 pixel or so. It won't stay close to the edge where i leave it

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • "Samsung is shutting down yet another app used by millions" I will fix the clickbait title for you, free-of-charge: "Samsung shutting down it's Max VPN app"
    • Microsoft brings Planner Agent to all Microsoft 365 Copilot users by Ivan Jenic Image: Microsoft Microsoft has announced that Planner Agent in Microsoft 365 Copilot is now generally available to all users with a Microsoft 365 Copilot license. Planner Agent is the latest addition in the string of AI features that Microsoft is implementing across virtually all of its products. The agent lets you manage tasks through natural language prompts directly inside Microsoft 365 Copilot. You can create and update tasks, check priorities, and get insights about current entries without leaving the chat interface. The general availability release comes with a handful of new additions on top of what was available during the initial rollout. A new plan picker lets you search and filter your plans by name, then update task names, statuses, due dates, or priorities through the agent. There's also a goals bucket now, which lets you group tasks under specific goals. This builds on the Goals view, a feature that was introduced as part of the broader Planner refresh that rolled out earlier. Image: Microsoft | Planner Agent in Microsoft 365 Copilot All AI-generated plans and tasks are created in draft mode by default, so you can review and approve changes before anything goes through. This is actually a thoughtful safety feature, because trusting AI to handle all your tasks without a human in the loop is usually a recipe for disaster. Having tasks initially saved as drafts is the best possible middle ground. Microsoft also says that not all tasks are executed equally. Simple tasks get processed quickly, while more complex ones, like building a plan from a Word, Excel, or PowerPoint file, are handed to a more capable model. Microsoft says this approach delivers the best performance, but it could also help with usage management, as you won't have to waste tokens on performing simple tasks. Planner Agent is available now across Teams, Loop, SharePoint, and other Microsoft 365 apps for anyone on a Microsoft 365 Copilot subscription.
    • To be clear I'm anti trump, the bigger point is why review this game at all?
    • Trillion dollar Microsoft has to reduce spending by hurting more people. Good job Microsoft. Good Job Asha.
  • Recent Achievements

    • First Post
      Cosminus earned a badge
      First Post
    • One Year In
      ThatGuyOnline earned a badge
      One Year In
    • Week One Done
      Jeroen Wilms earned a badge
      Week One Done
    • Week One Done
      rolfus earned a badge
      Week One Done
    • One Month Later
      Leroy Jethro Gibbs earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      489
    2. 2
      +Edouard
      189
    3. 3
      PsYcHoKiLLa
      124
    4. 4
      Steven P.
      86
    5. 5
      neufuse
      73
  • Tell a friend

    Love Neowin? Tell a friend!