Top

Tags


Roadkill .NET Wiki

Google ads

Recommended reading


Search

Entries in winforms (3)

Thursday
Jun182009

Wake up from Sleep (CreateWaitableTimer) in C# 

The code illustrates how to set a timer to wake your computer up having been sleep'd. It's tested on Vista and Windows 7 with sleep mode.

Click to read more ...

Wednesday
Mar182009

Automated browser screenshot capture

This small windows forms application does the following:

  • Opens a website you specify in Internet Explorer, Firefox, Safari and Opera.
  • Resizes the window to the size you set.
  • Takes a screengrab of each one.
  • Optionally closes each browser.

You can specify the browser paths and path to save the screenshots (which are saved in PNG format) to.

The screenshot mechanism is courtesy a class from of this article. The remaining code is some straight forward windows enumeration via the winapi and PostMessage.

Thursday
Feb162006

Changing a Richtextbox caret in C#

This old bit of code from 2004 is an unfinished (i.e. not that pretty to read) demo project for changing the caret in a rich text box. It was the beginnings of a kind of console host for C#.

RTB screenshot

It shows a telnet style shell, a block caret, tab completion and a few other features. Type "prog" and then hit tab to see an example of the tab completion.