相关疑难解决方法(0)

如何允许在MessageBox上复制邮件

如何在WPF中允许从MessageBox中选择和复制文本?

.net c# wpf

53
推荐指数
4
解决办法
3万
查看次数

添加按钮以复制 MessageBox 中的文本

我有一个程序,其中包含名称列表和一个在消息框中显示随机名称的按钮。有什么方法可以在消息框的“确定”旁边添加一个“复制”按钮,单击该按钮时复制名称然后关闭?

如果上述方法不可能,是否有办法在 MessageBox 中复制文本?

谢谢。

编辑:我的用户不会理解 Ctrl+C,突出显示并右键单击 > 复制是我正在寻找的(如果复制按钮不可用)

c# messagebox winforms

5
推荐指数
1
解决办法
4251
查看次数

用户活动记录、遥测(以及全局异常处理程序中的变量)

背景:

我正在处理一个非常旧的应用程序,它很少并且非常间歇性地生成异常。

目前的做法:

通常我们程序员使用全局异常处理程序处理罕见的未知数,连接如下:

[STAThread]
[SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.ControlAppDomain)]
private static void Main()
{
    Application.ThreadException += new ThreadExceptionEventHandler(UIThreadException);
    Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException); 
    AppDomain.CurrentDomain.UnhandledException +=
        new UnhandledExceptionEventHandler(UnhandledException);

    Application.EnableVisualStyles();
    Application.SetCompatibleTextRenderingDefault(false);
    Application.Run(new OldAppWithLotsOfWierdExceptionsThatUsersAlwaysIgnore());
}

private static void UIThreadException(object sender, ThreadExceptionEventArgs t)
{
    //-------------------------------
    ReportToDevelopers("All the steps & variables you need to repro the problem are: " + 
    ShowMeStepsToReproduceAndDiagnoseProblem(t));
    //-------------------------------

    MessageToUser.Show("It’s not you, it’s us. This is our fault.\r\n Detailed information about this error has automatically been recorded and we have been notified.Yes, we do look at …
Run Code Online (Sandbox Code Playgroud)

.net c# vb.net debugging exception

1
推荐指数
1
解决办法
4744
查看次数

标签 统计

c# ×3

.net ×2

debugging ×1

exception ×1

messagebox ×1

vb.net ×1

winforms ×1

wpf ×1