This version of the wallpaper changer is based on my original code that was written in VB.NET. I chose to re-write this program mainly because the original code was horrible and I’ve been wanting to move a lot of my older programs over to C#.
The main purpose for this program was to be used in windows XP since this wasn’t a feature that it had. It never really worked in a way that I wanted it to (originally) so this re-write corrects a lot of the issues that the original had. I decided to post it on github with the hopes that someone may find it useful in some way.
The code as is isn’t complete. There are some changes I plan on making (currently it just does jpgs) but as the code is , it works.
The code can be found below:
Sys Clock is a simple program to show the Current Day of the week, Time, and Date. This window will overlap the current windows system clock in the system tray and will always be visible (top of anything) provided you are not playing a Fullscreen game.
Source Code can be found on my github.
This was a problem I ran into with using MDI parents /children forms. You could open the same form over and over and it soon became a mess. The code below will check to see if it already exists and if it doesn’t assign the new form as a child to the mdi parent form and open it.
//Code that handles Child forms. May be adding more code to this down the road for customization.
//No need to write the same code for every form
private void CreateMDIChild(Form childForm)
//Checks if child form already exists. Only open if it does not exist in the collection
FormCollection allForms = Application.OpenForms;
bool formOpened = false; //Assume that this form does not already exist
foreach (Form frm in allForms)
if (frm.Name == childForm.Name)
//Tried to open form here however it throws an error about the collection being modified. So we create a bool and if the form exists
//set it to true
formOpened = true;
//As long as formOpened is false we can open the new form as a child form to the parent
if (formOpened == false)
childForm.MdiParent = this;
Using the method
private void loginRegisterToolStripMenuItem_Click(object sender, EventArgs e)
Someone was asking how to do multi-threading in the shoutbox and my original example didn’t work because of cross-threads. This basically means I couldn’t set the value of a control within a thread since it’s considered a different process. Well I did manage to get it to work and I figured I’d post the code here. I will also include the source code both both the VB.net and C# versions below.
Public Class Form1
Dim Max As Double = 600000
Dim i As Integer = 0
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ProgressBar1.Maximum = Max
Dim threadFill As Thread = New Thread(AddressOf Thread_FillProgressbar)
Private Sub Thread_FillProgressbar()
For i = 0 To Max
Private Sub AccessControl()
If Me.InvokeRequired Then
Me.Invoke(New MethodInvoker(AddressOf AccessControl))
ProgressBar1.Value = i
ShowInTaskbar = True
public partial class Form1 : Form
int Max = 60000;
int i = 0;
private void Form1_Load(object sender, EventArgs e)
progressBar1.Maximum = Max;
Thread threadFill = new
private void Thread_FillProgressBar()
for (i = 0; i <= Max; i++)
private void accessControl()
progressBar1.Value = i;
ShowInTaskbar = true;