Winform中打开对应窗口标题的窗口
摘要:1 public static class WindowsMessageHelper 2 { 3 4 public const int WM_COPYDATA = 0x004A; 5 6 [DllImport("User32.dll", EntryPoint = "SendMessage")] 7
阅读全文
C# 获取字符串的字节长度
摘要:System.Text.Encoding.Default.GetByteCount("中文占2个字节,英文占1个字节");
阅读全文
RichTextBox解决回车的问题
摘要:richtext.AppendText("\n"); richtext.Selection.Select(richtext.Document.ContentEnd,richtext.Document.ContentEnd);
阅读全文
WPF中从资源中检索指定路径的图片文件
摘要:ResourceManager resourceManager = new($"{Assembly.GetExecutingAssembly().GetName().Name}.g", Assembly.GetExecutingAssembly()); ResourceSet resources =
阅读全文