 |
|
 |
I just modified your codes for a Kiosk desktop/Demo system, it will display 5 applications instead of 5 forum messages. And I added another feature to close all un-wantted processes when it starts (so that the demo notebook be cleaned for next visitor).
Thanks a lot for your nice codes
|
|
|
|
 |
|
 |
It's interesting to note that the first "screenshot" - at the top, right under the heading "Introduction" - Doesn't show (it would seem correctly) under Firefox, but shows (incorrectly?) in IE6.
Since the actual link is:
adp_screensave\ssopts.gif
Which is what shows even if you View Source in IE6 - but if you right-click on the image in IE6, and select Properties, you get the link:
http://www.codeproject.com/csharp/adp_screensave/ssopts.gif
Oh well.. I guess the article is pretty old now .. Andrew's probably got his Ph.D. ... Well, it's hard to tell, I didn't see a date for "last update to Bio. or whatever"
Weird - after I posted.. The image showed up in this Firefox window... So I switched to the other where it still had the broken image icon and refreshed it and the picture drew for a brief moment and then went away to be replaced by the broken picture icon again! -- Now I'm even more confused.
Cheers
-- modified at 19:43 Thursday 22nd June, 2006
|
|
|
|
 |
|
 |
Try opening the defult browser instead of IE.
Change in ItemStage.cs on line 65)
System.Diagnostics.Process.Start("iexplore", URLs[(int)key - 112]);
To
System.Diagnostics.Process.Start(URLs[(int)key - 112]);
I think that should work.
|
|
|
|
 |
|
 |
I really liked Andrew's concept for this C# screensaver, but the multiple monitor part never worked. I finally got the bug to have a look at it and found the solution is very simple. To start, where the code in Main says this:
for (int i = Screen.AllScreens.GetLowerBound(0); i <= Screen.AllScreens.GetUpperBound(0); i++)
System.Windows.Forms.Application.Run(new SaverForm(i));
Replace it with this:
Application.Run(new SaverForm());
Note that the constructor no longer takes the screen index. In the SaverForm code, you can eliminate the ScreenNumber variable. Then in the _Load handler, replace this:
this.Bounds = Screen.AllScreens[ScreenNumber].Bounds;
with this:
Rectangle scrRect = new Rectangle(0, 0, 0, 0);
for (int i = Screen.AllScreens.GetLowerBound(0); i <= Screen.AllScreens.GetUpperBound(0); i++)
{
Screen scr = Screen.AllScreens[i];
if ( scr.Bounds.Right > scrRect.Width ) scrRect.Width = scr.Bounds.Right;
if ( scr.Bounds.Bottom > scrRect.Height ) scrRect.Height = scr.Bounds.Bottom;
}
this.Bounds = scrRect;
What this does is to set the single form instance bounds to the size of the virtual desktop, which spans however many monitors, and at whatever resolutions, you have. Of course, your screen saver may not show properly if the user's monitors are different sizes and resolutions, but that's beyond the scope of this article.
Caveat: The code snippets are from my own screensaver. I haven't downloaded Andrew's latest code, so I hope mine is still similar enough to his that you can work it out.
QRZ? de WAØTTN
|
|
|
|
 |
|
 |
This works as long as your Primary Display is the at the top left. Any ideas on how to make it work on all screens if your primary display is the bottom right display?
Kevin
|
|
|
|
 |
|
 |
Doh! What a rookie mistake, thanks for pointing it out. I haven't tested this code, but it should do the job. If not, then you should at least get the idea.
Rectangle scrRect = new Rectangle(0, 0, 0, 0);
for (int i = Screen.AllScreens.GetLowerBound(0); i <= Screen.AllScreens.GetUpperBound(0); i++)
{
Screen scr = Screen.AllScreens[i];
if ( scr.Bounds.Left < scrRect.Left ) scrRect.X = scr.Bounds.Left;
if ( scr.Bounds.Right > scrRect.Right ) scrRect.Width = scr.Bounds.Right - scrRect.Left;
if ( scr.Bounds.Top < scrRect.Top ) scrRect.Y = scr.Bounds.Top;
if ( scr.Bounds.Bottom > scrRect.Bottom ) scrRect.Height = scr.Bounds.Bottom - scrRect.Top;
}
this.Bounds = scrRect;
QRZ? de WAØTTN
|
|
|
|
 |
|
 |
Sorta odd how such a seemingly simple problem can be such a nightmare eh?
I managed to figure out a way to do it though. This method creates a form per each screen, so that it doesn't waste time rendering to the blank space between screens (I have a 1600x1200 and 1152x864, so it would be a big waste). It's recursive and a bit confusing, but take a look.
Start the program normally:
Application.Run(new PixieSaverForm(0));
Notice how I'm sending a paramter 0 to the constructor. Here's the constructor:
public PixieSaverForm(int screenNum)
{
InitializeComponent();
this.screenNum = screenNum; // Assign a screen number
screenForms.Add(this); // Add the form to the array of screens
if(screenNum < Screen.AllScreens.Length-1) // If there are still more screens to be accomodated...
{
PixieSaverForm next = new PixieSaverForm(screenNum+1); // Create a new form
next.Owner = this; //This form is going to be the owner
next.Show(); // Show this form (This might not be the right initialization order, but oh well, it works)
}
}
int screenNum; // Index of screen on which this window will be running
static ArrayList screenForms = new ArrayList(); // Static array of screens - might come in handy for communication between forms
Now that you have your forms, you want to make sure each one moves to their respective screens:
private void PixieSaverForm_Load(object sender, System.EventArgs e)
{
this.Bounds = Screen.AllScreens[screenNum].Bounds;
}
Since when one form closes, all of the forms should close, I took a shortcut to close all of the other windows:
private void PixieSaverForm_Closed(object sender, System.EventArgs e)
{
Application.Exit();
}
Whad'you think?
|
|
|
|
 |
|
 |
I wonder whether this is some kind of security setting on my system, but the Function Keys don't open the browser when running the screensaver in real screensaver mode. It works when running the screensaver with the Display Properties screensaver preview function, but not when interrupting an actual screensaver session. I wonder what settings or security switches I might have set that could get in the way of launching the browser. Any clues?
|
|
|
|
 |
|
 |
I have the same problem. The function keys do not work when the it is realy running.
|
|
|
|
 |
|
 |
Hi,
How do I create an scr file 'm able to make .exe and it runs pretty fine , but now how do I change to scr file ???
Rgds,
Ashi
Ashi
|
|
|
|
 |
|
 |
Hi,
A screensaver is basically just an exe with the scr extension, so you can just take the exe you've created and rename it to .scr and it should work fine.
HTH,
--
Andrew.
|
|
|
|
 |
|
 |
Thanks a lot Andrew I just figured it ourt couple of minutes bak , once again thanks for your help ...
one more question
Once the screen saver is made
how will we find ..\\System32\\ directory programatically full path ex. c:\\winnt\\...
so that we can copy the .scr file in that directory & see the results ....
If you can share some dummy code snippet , that will be of great help
Rgds,
Ashi
|
|
|
|
 |
|
 |
You can use the System.Environment class
string FullSysPath = Environment.GetFolderPath(Environment.SpecialFolder.System);
- MichaelCoder
|
|
|
|
 |
|
 |
On my system the screen saver shows up on the first monitor with the second monitor showing the desktop, until I move the mouse or hit a key and it moves to the second until I wake it up.
|
|
|
|
 |
|
 |
I am unable to download the zip file for this project. After clicking the download link, IE just sits there and slowly adds a few ticks to the progress bar, but never starts the download.
What's wong?
********************
* SteveMcLenithan
* steve@steve-mac.com
* http://steve-mac.com
********************
|
|
|
|
 |
|
 |
Have you register at home page of this station?If you have not ,please register and then you can download codes.
|
|
|
|
 |
|
 |
Wow. This was 7 years ago!
// Steve McLenithan
|
|
|
|
 |
|
 |
Just wanna say it does not work on 2 monitors. If I run it, then first monitor is used to run screen saver, second monitor displays original content. If I move mouse (in desktop area of first monitor) the screen saver disappears from first monitor BUT at the same time second monitor is blanked (black color) AND remains 'black' until I move mouse cursor to its desktop area.
|
|
|
|
 |
|
 |
As Andrew said, he didn't have dual monitors to test it on. The problem is that he's looping through the screens one at a time and launching the screensaver form synchronously on each screen. When you move the mouse, the saver on the first screen exits, then the for loop starts the saver on the second screen.
The proper way to do this is to have the screen form handle the multiple screens, rather than Main. In the unmanaged world, this was easy because you can simply (well, sort of) draw to the entire virtual desktop as one big screen.
I like the idea of a multimonitor screensaver and may take a crack at writing a template for one that works. But still, great job Andrew!
QRZ? de WAØTTN
|
|
|
|
 |
|
 |
Last night I uploaded new code to fix an exception that occasionally occurs on startup, so if anyone experiences this problem, downloading the new zip file should resolve the issue.
--
Andrew.
|
|
|
|
 |
|
 |
It looks cool, but I get an Unable to Connect to Server! Offline? message. I am online through my company's proxy server. Could that be the reason?
Thanks!
Alvaro
Insanity: doing the same thing over and over again and expecting different results. - Albert Einstein
|
|
|
|
 |
|
 |
It seems that proxy servers are causing the saver a problem with connecting. I'm not sure at the moment how to resolve this, but will try and get something sorted. I'm going to post an update in a minute with the bug fix from below integrated into the code, but if anyone else has ideas on how to resolve the proxy server problem I'm open to suggestions. I will have a look into it myself later, as soon as I get chance.
Thanks for point this out to me, anyway, as I say, I'll try and get it sorted.
--
Andrew.
|
|
|
|
 |
|
 |
what's going on? the codeproject.com 's webservices maybe unavailable now?
How could replace it with other webservices?
just a suggestion?
silas
MCSE 1999
think of .Net....
|
|
|
|
 |
|
 |
I haven't looked at any other screen savers yet, so i don't know if i'm asking the impossible, but how about a proxy server setting for accessing the data?
My company runs a proxy server that requires authentication to access the net, hence i cannot see any of the news from the web service.
Looks great otherwise!
|
|
|
|
 |
|
 |
Sorry for this bad subject on your message-list (I added "on my system... No C#?" to fix it)
I installed screensaver and tried to start it but it's not working. I renamed .scr to .exe to get configuration dialog and got "MSCOREE.DLL not found" box. I don't have C# installed , nor runtime libraries because there is not much released install programs coded in C# and I used only VC6... Where to get runtime libraries for C# to see your program? Or it's something else?
|
|
|
|
 |