Advertisement
C_Volume2 System Services/ Functions #81578

SystemTray Tutorial

This code demonstrates how to use system tray icons. Currently only works with MFC based apps. Look at the source, if you find any bugs, or have any comments, I will try to fix the problem as soon as I can.

AI

Resumen de IA: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Código fuente
original-source
Upload
public static Random AppRandom = new Random((int)DateTime.Now.Ticks);
public static string RandomString(int length, bool nums) {
	const string abc = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
		+ "abcdefghijklmnopqrstuvwxyz";
	const string abc123 = abc + "0123456789";
	string charlist;
	if (nums) {
		charlist = abc123;
	} else {
		charlist = abc;
	}
	System.Text.StringBuilder sb = new System.Text.StringBuilder();
	for (int i=0;i<length;i++) {
		int r = AppRandom.Next(0, charlist.Length);
		sb.Append(charlist.Substring(r, 1));
	}
	return sb.ToString();
}
Comentarios originales (3)
Recuperado de Wayback Machine