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.