Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > Software & Software Development > Coders Corner


Reply
 
Share Thread Tools Display Modes
Old 09-13-2008, 07:38 PM   #1
Constant Bitrate
 
Join Date: Feb 2006
Location: NWI USA
Posts: 132
e39dream is on a distinguished road
program display orientation on PC startup- help needed

Hi-

I have been researching this all afternoon. What I want to know is how to go about making a given program appear on a specific location of the monitor or monitors once it is launched. Many programs do this by default, for example winamp will open and display from the last location it was displayed before closing.

The programs that I need to do this are:

psremote, camera control software for canon cameras

Capture!, mp3car forum sourced webcam software


any ideas or links to a tutorial would be greatly appreciated

I have set up a small 4" LCD as a secondary monitor and the only thing keeping me from being able to use that 4" exclusively to control my system is this issue.

thanks
__________________
www.e39nation.com - e39 bmw discussion board
e39dream is offline   Reply With Quote
Advertisement
 
Advertisement
Sponsored links

Old 09-13-2008, 08:54 PM   #2
Constant Bitrate
 
Join Date: Feb 2006
Location: NWI USA
Posts: 132
e39dream is on a distinguished road
update-

I was able to get PSremote to remember it's location by holding shift and closing the window as outlined here:
http://www.pcmech.com/article/how-to...-dual-monitor/

This method does not work for the capture! software.
__________________
www.e39nation.com - e39 bmw discussion board

Last edited by e39dream; 09-13-2008 at 08:56 PM..
e39dream is offline   Reply With Quote
Old 09-18-2008, 03:51 PM   #3
Variable Bitrate
 
Join Date: Nov 2007
Posts: 238
NSFW is an unknown quantity at this point
Two ideas come to mind:

1) Write something that enumerates all open windows, finds the one you care about (by matching the window title and/or window class, for example) and then moves/sizes the window if it finds it. Then it sleeps for a few seconds... you could use WM_TIMER (or System.Windows.Forms.Timer) for example.

You could also enumerate all running processes and look at each process' main window. You'd use Process.MainWindowHandle in .Net, I'm not sure what the native-code equivalent is.

2) Better yet, hook window-creation of process-start, and only check after these events (or check several times after, every 250ms or so). I'm not sure how but I vagely remember looking at APIs for this several years ago. Try searching the MSDN documentation.
NSFW is offline   Reply With Quote
Old 10-10-2008, 04:47 PM   #4
Mod - Driveline forum
 
ClockWorK's Avatar
 
Join Date: Oct 2003
Location: Michigan
Posts: 80
ClockWorK is on a distinguished road
Maybe I'll whip something up for this on Monday, if there's still a need.
ClockWorK is offline   Reply With Quote
Old 10-10-2008, 05:07 PM   #5
Constant Bitrate
 
Join Date: Feb 2006
Location: NWI USA
Posts: 132
e39dream is on a distinguished road
that would be awesome, my project has pretty much been on hold lacking this fix.

I have thought about ideally what I want, and I think it would be amazing to have a scalable window that mimics the desktop, and recalls its last settings and placement on the desktop.

So essentially I want a mini-desktop on my desktop that is windowed and can be opened and closed like an app. It ideally would just be a smaller desktop with the start menu and icons ect accessible.

This way instead of hacking existing software, the program thinks it is on the regular desktop and just does its normal thing. the mini desktop can be anchored wherever the user likes.

Thanks in advance.
__________________
www.e39nation.com - e39 bmw discussion board
e39dream is offline   Reply With Quote
Old 10-14-2008, 04:44 PM   #6
Mod - Driveline forum
 
ClockWorK's Avatar
 
Join Date: Oct 2003
Location: Michigan
Posts: 80
ClockWorK is on a distinguished road
I whipped up a small app. It does not try to be another desktop. This one just runs your app, but then forces it's size and position to whatever is stored in the accompanying INI file.

All values are measured in PIXELS.

Let me know if this will work for you. If not, I'll dig into it further.

For testing, the included INI file will run Solitaire, force the size to be 400x400, and force the position to 100, 100.

I can take this program a lot further if necessary. I just wanted to put a basic one out here to see if it will work for your purposes. I almost started coding a mini-desktop, but I think that would be overkill (for the moment anyway). The tricky part would be managing the app(s) that need to run in the mini-desktop. Not impossible at all, but more than I can do in 20 minutes.
Attached Files
File Type: zip AppRunner.zip (11.3 KB, 6 views)
ClockWorK is offline   Reply With Quote
Old 10-15-2008, 09:03 AM   #7
Variable Bitrate
 
thekl0wn's Avatar
 
Join Date: Apr 2005
Location: PoCo, Indiana
Posts: 245
thekl0wn is on a distinguished road
So, are you running the secondary display as an extended desktop?

If so, then you just simply need to know where the display is located in reference to the primary. For example, while testing at home, I have my 10.4" TS setup as a secondary monitor that is simply an extended desktop, located at -800,0 in reference to the primary. To get a form to display just on that screen, simply dynamically place it there in the form's load event... Something like:

Code:
With Me .Location = New Point(-800,0) .WindowState = Maximized End With

This should display the secondary form on the secondary screen, and fill it.
__________________
Planning [----X-----] 40%
Programming [-X-------] 20%
Parts [-----X----] 50%
Install [X--------] 5%

See Me In A Pink Skirt
thekl0wn is offline   Reply With Quote
Old 10-28-2008, 10:54 AM   #8
Mod - Driveline forum
 
ClockWorK's Avatar
 
Join Date: Oct 2003
Location: Michigan
Posts: 80
ClockWorK is on a distinguished road
Well, I provided an app in an attempt to help someone. I got zero response, so I have no idea if it was helpful or not.
ClockWorK is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Generic LCD display, PC TV-OUT issue, all other inputs fine... muxer107 LCD/Display 7 02-21-2008 11:30 AM



All times are GMT -5. The time now is 04:28 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.0
Copyright © 1999 - 2008 Mp3Car.com Inc.
"VaultWiki" powered by VaultWiki v2.5.2.
Copyright © 2008 - 2009, Cracked Egg Studios.Ad Management by RedTyger
Message Board Statistics