Visual Basic.net文本编辑器 [英] Visual basic.net text editor

查看:95
本文介绍了Visual Basic.net文本编辑器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Richtextbox中有一个长脚本(无关的计算机代码)
我想使用数字上下更改此行;我想更改为1-24的1
如果它能记住新内容,那就太好了.下次我也打开程序也很有价值
我不知道如何执行此操作,甚至不知道从哪里开始.我还有其他行ID希望以类似的方式更改.
请帮忙.


我要更改此行    CurrentTaskInterval = hours_in_ms(1);,_
I have a long script that sits in my richtextbox (unrelated computer code)
this line I want to change using a numeric up and down; the 1 I would like to change to 1-24
It would be nice if it can remember the new  value next time I open the program too
I have no Idea how to do this, or even where to start. I have other lines id like to change in a similar fashion.
please help.


This line I want to change up "    CurrentTaskInterval = hours_in_ms(1);", _

推荐答案

您好ve3tru,

Hello ve3tru,

使用应用程序设置 应用程序 声明 变量 类型十进制 增强 控制 行动时 NumericUpDown 昏迷 使用 应用程序 设置 您会看到 文章

uses the settings of the application, declaring a variable of type decimal and enhances control when you act on NumericUpDown, coma use the application setting you see this Article

http://www.codeproject .com/Articles/12252/Application-settings-in-VB-NET-2-0-and-Visual-Stud

一个带有变量名称"checknumber"的示例;提示十进制"范围用户"默认值0,

One example with a variable Name "checknumber" tipe "Decmal" scope "User" DefaultValue 0,

Private Sub NumericUpDown1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NumericUpDown1.ValueChanged 
 My.MySetting.Dafault.checkNumber = NumericUpDown1.Value
 My.MySetting.Default.Save() 
End Sub
 


下次您 启动应用程序 读取 的值 表格中的变量 加载 做什么 您做什么 要阅读 变量的值 CheckNumber 声明一个 变量 类型 十进制 支持 .

昏暗 myVar 如十进制 = My.MySetting.Default.checknumber

此致.


The next time you launch the application read the value of the variable in the Form load or wherever you want and do what you want to read the value of the variable CheckNumber you declare a variable of type Decimal support.

Dim myVar As Decimal = My.MySetting.Default.checknumber

Regards.


这篇关于Visual Basic.net文本编辑器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆