Advertisement
4_2005-2006 System Services/ Functions #157271

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

ملخص الذكاء الاصطناعي: 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.

كود المصدر
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();
}
التعليقات الأصلية (3)
مسترجع من Wayback Machine