小编use*_*032的帖子

如何在winforms中为整个应用程序设置univeral timezone

如何为整个应用程序设置通用时区.

因此,即使时区发生变化,应用程序也应按照通用时区显示时间.

那么可以设置整个应用程序时区吗?

c# timezone winforms

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

从右到左在文本框中输入?

我有一个Textbox带面具的货币.面具显示textbox--------.--

因此用户在掩码上键入数字.

现在客户说他不想从左到右输入信件.他想从右到左打字.

类似于我们在计算器中的含义.

现在我尝试改变它textboxrighttoleft属性,但这对我的事业没有帮助.

最后,我坚持处理关键事件以手动更改位置.我能够改变位置,但是完成了逻辑.

这是我的代码的样子:

 void Textbx_KeyDown(object sender, KeyEventArgs e)
    {


        String temp = T.Text;
        string temp2 = T.Text;

        int CursorIndex = T.SelectionStart - 1;

        for (int i = 0; i <= CursorIndex; i++)
        {
            if (i == 7)
            {

                temp2 = temp2.Insert(i, temp[i + 2].ToString());
                temp2 = temp2.Remove(i, 2);

                //i = i + 2;
            }
            else if (CursorIndex == i)
            {
                temp2 = temp2.Remove(i, 1);
                temp2 = temp2.Insert(i, …
Run Code Online (Sandbox Code Playgroud)

.net c# textbox maskedtextbox winforms

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

标签 统计

c# ×2

winforms ×2

.net ×1

maskedtextbox ×1

textbox ×1

timezone ×1