Schmoove Posted September 17, 2004 Author Share Posted September 17, 2004 What did you use to make this program? The language used is C# and I write it in Microsoft Visual Studio .NET 2003. Link to comment https://www.neowin.net/forum/topic/212463-battery-monitornet/page/7/#findComment-584575447 Share on other sites More sharing options...
AshMan Posted September 17, 2004 Share Posted September 17, 2004 Thank you again for making it. I have never used C# Only VB. Do you think it's possible to make similat types of applications using VB? Link to comment https://www.neowin.net/forum/topic/212463-battery-monitornet/page/7/#findComment-584576171 Share on other sites More sharing options...
Schmoove Posted September 17, 2004 Author Share Posted September 17, 2004 Yes, both use the same .NET framework so that shouldn't be a problem. Link to comment https://www.neowin.net/forum/topic/212463-battery-monitornet/page/7/#findComment-584576191 Share on other sites More sharing options...
Elexir Posted September 17, 2004 Share Posted September 17, 2004 Indeed :)... There are just other ways of, how to use API in code. But still, they are similar. Link to comment https://www.neowin.net/forum/topic/212463-battery-monitornet/page/7/#findComment-584576554 Share on other sites More sharing options...
bangbang023 Veteran Posted September 21, 2004 Veteran Share Posted September 21, 2004 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. Link to comment https://www.neowin.net/forum/topic/212463-battery-monitornet/page/7/#findComment-584596602 Share on other sites More sharing options...
jaydacodemonkey Posted September 21, 2004 Share Posted September 21, 2004 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; Link to comment https://www.neowin.net/forum/topic/212463-battery-monitornet/page/7/#findComment-584596696 Share on other sites More sharing options...
jaydacodemonkey Posted September 21, 2004 Share Posted September 21, 2004 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. Link to comment https://www.neowin.net/forum/topic/212463-battery-monitornet/page/7/#findComment-584596703 Share on other sites More sharing options...
Schmoove Posted September 21, 2004 Author Share Posted September 21, 2004 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) Link to comment https://www.neowin.net/forum/topic/212463-battery-monitornet/page/7/#findComment-584597354 Share on other sites More sharing options...
Avian Posted September 23, 2004 Share Posted September 23, 2004 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. Link to comment https://www.neowin.net/forum/topic/212463-battery-monitornet/page/7/#findComment-584610399 Share on other sites More sharing options...
Banzai Posted September 23, 2004 Share Posted September 23, 2004 When and what can we expect in the next release? Link to comment https://www.neowin.net/forum/topic/212463-battery-monitornet/page/7/#findComment-584610421 Share on other sites More sharing options...
Schmoove Posted September 25, 2004 Author Share Posted September 25, 2004 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. Link to comment https://www.neowin.net/forum/topic/212463-battery-monitornet/page/7/#findComment-584620127 Share on other sites More sharing options...
Homer Posted September 25, 2004 Share Posted September 25, 2004 I have my laptop back from repair, I have just installed this and I have to say: awsome. Very nice little util man! :D Link to comment https://www.neowin.net/forum/topic/212463-battery-monitornet/page/7/#findComment-584620137 Share on other sites More sharing options...
mieJas Posted October 8, 2004 Share Posted October 8, 2004 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 Link to comment https://www.neowin.net/forum/topic/212463-battery-monitornet/page/7/#findComment-584695336 Share on other sites More sharing options...
amr_01 Posted October 9, 2004 Share Posted October 9, 2004 would it be possible to take the icon out of the alt-tab menu? Link to comment https://www.neowin.net/forum/topic/212463-battery-monitornet/page/7/#findComment-584698261 Share on other sites More sharing options...
mieJas Posted October 9, 2004 Share Posted October 9, 2004 I forgot to say: I set the monitor opacity to 0% when fully charged. So if I pull out the plug, the battery doesn't show up until reaching 95% Link to comment https://www.neowin.net/forum/topic/212463-battery-monitornet/page/7/#findComment-584699665 Share on other sites More sharing options...
Schmoove Posted October 9, 2004 Author Share Posted October 9, 2004 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. Link to comment https://www.neowin.net/forum/topic/212463-battery-monitornet/page/7/#findComment-584699769 Share on other sites More sharing options...
finality Posted October 9, 2004 Share Posted October 9, 2004 This is quite possibly the best tool I've ever downloaded. My laptop will never be the same. Link to comment https://www.neowin.net/forum/topic/212463-battery-monitornet/page/7/#findComment-584699772 Share on other sites More sharing options...
amr_01 Posted October 9, 2004 Share Posted October 9, 2004 since you're not going to be working on it much anymore, would it be possible for you to release the code? if not, it's cool, i understand. Link to comment https://www.neowin.net/forum/topic/212463-battery-monitornet/page/7/#findComment-584702766 Share on other sites More sharing options...
Diffused Mind Posted October 9, 2004 Share Posted October 9, 2004 since you're not going to be working on it much anymore, would it be possible for you to release the code? if not, it's cool, i understand. There are "other" ways to get the source. :whistle: Link to comment https://www.neowin.net/forum/topic/212463-battery-monitornet/page/7/#findComment-584702797 Share on other sites More sharing options...
Elexir Posted October 9, 2004 Share Posted October 9, 2004 :ninja: ;) Link to comment https://www.neowin.net/forum/topic/212463-battery-monitornet/page/7/#findComment-584702800 Share on other sites More sharing options...
jamend Posted October 9, 2004 Share Posted October 9, 2004 I would work on it if the source were released, but I wouldn't decompile it because it's a lame thing to do. Link to comment https://www.neowin.net/forum/topic/212463-battery-monitornet/page/7/#findComment-584702809 Share on other sites More sharing options...
amr_01 Posted October 11, 2004 Share Posted October 11, 2004 There are "other" ways to get the source:whistle:e: 584702797[/snapback] sure there are ways, but it would be nice to have his permission to use it... Link to comment https://www.neowin.net/forum/topic/212463-battery-monitornet/page/7/#findComment-584711998 Share on other sites More sharing options...
AJerman Posted October 11, 2004 Share Posted October 11, 2004 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: Link to comment https://www.neowin.net/forum/topic/212463-battery-monitornet/page/7/#findComment-584713236 Share on other sites More sharing options...
Schmoove Posted October 12, 2004 Author Share Posted October 12, 2004 I'm not giving up on it, it just doesn't have priority for me at the moment. I'll see if I can put out the latest version I have here this week. Link to comment https://www.neowin.net/forum/topic/212463-battery-monitornet/page/7/#findComment-584717321 Share on other sites More sharing options...
+primortal Subscriber² Posted October 13, 2004 Subscriber² Share Posted October 13, 2004 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 Link to comment https://www.neowin.net/forum/topic/212463-battery-monitornet/page/7/#findComment-584725659 Share on other sites More sharing options...
Recommended Posts