网站首页 > 文章中心 > 其它

vb.nethelp的简单介绍

作者:小编 更新时间:2023-09-02 10:33:22 浏览量:80人看过

vb.net中如何写代码显示帮助文档(html)

在按钮的Click事件处理函数中,添加

dim str as string="..\help.html" '文件路径名

vb.nethelp的简单介绍-图1

System.Diagnostics.Process.Start(str)

VB.NET获取目录文件夹名称

先用System.IO.Directory.GetDirectories函数获取子目录的名称(包括其路径),再用System.IO.Path.GetFileName获取子目录的名称.下面是代码:

Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click

For Each s In System.IO.Directory.GetDirectories("C:\Windows")

Console.WriteLine(System.IO.Path.GetFileName(s))

Next

End Sub

下面是部分输出:

Application Data

AppPatch

vb.nethelp的简单介绍-图2

assembly

BOCNET

Boot

Branding

ConfigSetRoot

Cursors

Debug

DigitalLocker

Downloaded Installations

Downloaded Program Files

ehome

en-US

Fonts

Globalization

Help

...

可能有更简洁的方法,你可以到MSDN看看

System.IO.Directory.GetDirectories:

System.IO.Path.GetFileName:

通用 I/O 任务:

用vb.net编写记事本源代码

Dim sFileName As String

Dim Search

Private Sub dateTimeMenu_Click()

Text1.Text = Now

Private Sub deleteMenu_Click()

Text1.Text = Left(Text1.Text, Text1.SelStart) + Mid(Text1.Text, Text1.SelStart + Text1.SelLength + 1)

Private Sub findMenu_Click()

Search = InputBox("请输入要查找的字词:")

Dim Where1 '获取需要查找的字符串变量

Text1.SetFocus '文本框获得焦点,以显示所找到的内容Search = InputBox("请输入要查找的字词:")

Where1 = InStr(Text1.Text, Search) '在文本中查找字符串

If Where1 Then

'若找到则设置选定的起始位置并使找到的字符串高亮

Text1.SelStart = Where1 - 1

Text1.SelLength = Len(Search)

' Me.Caption = Where1 '测试用

'否则给出提示

Else: MsgBox "未找到所要查找的字符串.", vbInformation, "提示"

End If

Private Sub findNextMenu_Click()

Dim StartMe As Integer '查找的起始位置变量

Text1.SetFocus '文本框获得焦点

StartMe = Text1.SelLength + Text1.SelStart + 1 '给变量赋值

Private Sub aboutMenu_Click()

Private Sub allMenu_Click()

Text1.SelStart = 0

Text1.SelLength = Len(Text1.Text)

Private Sub backcolorMenu_Click() '设置背景色代码

Text1.BackColor = Form1.CommonDialog1.Color

Private Sub colorMenu_Click() '改变文字颜色代码

Text1.ForeColor = Form1.CommonDialog1.Color

Private Sub cutMenu_Click()

Clipboard.SetText Text1.SelText

Private Sub exitMenu_Click()

End

Private Sub fontMenu_Click() '字体菜单代码

If Len(Form1.CommonDialog1.FontName) = 0 Then

Form1.Text1.FontName = "宋体"

Else

Form1.Text1.FontName = Form1.CommonDialog1.FontName

Form1.Text1.FontSize = Form1.CommonDialog1.FontSize

If Form1.CommonDialog1.FontBold = True Then

Form1.Text1.FontBold = True

Form1.Text1.FontBold = False

If Form1.CommonDialog1.FontItalic = True Then

Form1.Text1.FontItalic = True

Form1.Text1.FontItalic = False

Private Sub Form_Load()

Form1.Text1.Height = Form1.Height

Private Sub Form_Resize()

Private Sub help1Menu_Click()

Form1.CommonDialog1.HelpCommand = cdlHelpForceFile

CommonDialog1.ShowHelp

Private Sub newMenu_Click()

If Len(Trim(Text1.Text)) = 0 Then

Form1.Caption = "我的记事本" "--" "未命名"

sFileName = "未命名"

Text1.FontName = "宋体"

Text1.Text = ""

Call saveAsMenu_Click

Private Sub openMenu_Click() '打开文件代码

Form1.Caption = "我的记事本"

Form1.CommonDialog1.Filter = "文本文件|*.txt"

Form1.CommonDialog1.Action = 1

If Len(Form1.CommonDialog1.FileName) 0 Then

sFileName = Form1.CommonDialog1.FileName

Form1.Caption = Form1.Caption "--" Form1.CommonDialog1.FileTitle

Open sFileName For Input As #1

Do While Not EOF(1)

Line Input #1, Text$

Loop

Text1.Text = All

Close #1

Private Sub pasteMenu_Click() '粘贴菜单代码

Text1.Text = Left(Text1.Text, Text1.SelStart) + Clipboard.GetText() + Mid(Text1.Text, Text1.SelStart + Text1.SelLength + 1)

Private Sub printMenu_Click()

Form1.CommonDialog1.ShowPrinter

For i = 1 To CommonDialog1.Copies

Printer.Print Text1.Text

Printer.EndDoc

Private Sub saveAsMenu_Click() '另存为菜单代码

If Len(Trim(Text1.Text)) 0 Then

Form1.CommonDialog1.DialogTitle = "保存文件"

Form1.CommonDialog1.InitDir = "D:\"

Form1.CommonDialog1.ShowSave

Open sFileName For Output As #1

whole$ = Text1.Text

Print #1, whole

Private Sub saveMenu_Click()

Form1.CommonDialog1.FileName = "新建文本"

Private Sub statusMenu_Click()

请问下在vb,vb.net或c#中添加系统服务时怎样设置在服务启动失败后重启服务!找了好久都不知道怎么设置

个人意见,希望采纳:

:你先了解一下:

启动项英文msconfig

alerter -错误警报器,垃圾,关闭.

vb.nethelp的简单介绍-图3

application management-用于设定,发布和删除软件服务.

automatic 更新s -windows自动更新,K,滚!

background intelligent transfer service -这个服务原是用来实现http1.1服务器之间的信息传输,微软称支持windows更新时断点续传

clipbook - 用与局域网电脑来共享 粘贴/剪贴的内容.(K,想得出!)

com+Event system -一些 COM+ 软件需要,检查你的 c:\program files\ComPlus Applications 目录,没东西可以把这个服务关闭.

COM+Event system application -同上

COmputer browser - 用来浏览局域网电脑的服务,但关了也不影响浏览!垃圾

cryptographic services -windows更新时用来确认windows 文件指纹的,我更新时才开启一下.

DHCP client-静态IP者需要(xDSL 等)小猫就不用了!!

Distributed Transaction coordinator-无聊的东西.

DNS Client-DNS解析服务..无聊~~

Error reporting service -错误报告器,把windows中错误报告给微软,无聊~~~~~

*Event Log- 系统日志纪录服务,很有用于查找系统毛病.

Fast user switching compatibility-多用户快速切换服务..无聊

help and support -帮助,无聊,还是无聊帮助..哈哈

Human interface device access-支持"弱智"电脑配件的..比如键盘上调音量的按钮等等..

Indexing service -恐怖的xp减速的东东!!!关关关!!!

Internet Connection Firewall(ICF).........-xp防火墙..不用就关.

IPSEC Services-大众用户连边都沾不上.

Logical Disk manager -磁盘管理服务..需要时它会通知你,所以一般关.

Logical Disk manager administrative service-同上.

messenger -不是msn,不想被骚扰的话就关.注:妖刺就是利用这个.

MS software shadow copy provider-无用,据说是备份用的..我看什么用都没.

Net Logon-登陆 Domain Controller 用的,大众用户快关!

Netmeeting remote desktop sharing-用netmeeting 实现电脑共享..晕!关!!

Network Connections - 上网/局域网要用的东东!

Network DDE -和clipbook一起用的,无聊~~~~

Network DDE DSDM -同上

Network 本地 Awareness-如有网络共享或ICS/ICF可能需要.(服务器端)

NT LM Security support provider-telnet 服务用的东东,关!!

NVIDIA Driver Helper service -nvidia 显卡帮助,关!

PDEngine - perfectdisk 引擎

PDScheduler -perfectdisk 计划服务

PerFORMance logs and alerts-记录机器运行状况而且定时写入日志或发警告,内容可能过于专业,所以..自己决定.

*Plug and Play- 自动查测新装硬件,即插即用,开着吧~~~

Portable media serial number-绝对无用,无聊之及.

Print Spooler -打印机用的,我打印时才开一下.

Protected Storage-储存本地密码和网上服务密码的服务,包括填表时的"自动完成"功能.

Remote access auto connection manager-宽带者/网络共享可能需要!!

*Remote Procedure Call (RPC) -系统核心服务!

Remote Procedure Call LOCATOR-这个倒没什么用,管理 RPC 数据库服务,占用1兆内存.

remote registry -远程注册表运行/修改.大漏洞,还不快关!!

removable storage -一般情况下不用,磁带备份用的.

routing and remote access-哈哈..不知者关!

secondary logon-给与administrator 以外的用户分配指定操作权.晕~~~

security accounts manager-像 Protected Storage, IIS Admin 才需要.

server -局域网文件/打印共享需要的.

shell hardware detection-给有些配置自动启动,像内存棒,和有些cd驱动等

smart card helper -关!

SSDP Discovery service-没有什么硬件利用这个服务..

system event notification-记录用户登录/注销/重起/关机信息..谁管这些..

system restore service -系统还原服务,吃资源和内存的怪兽..虽然有时用到,自己决定.

task scheduler-windows 计划服务啦,垃圾.

TCP/IP NetBIOS helper-如果你的网络不用 Netbios 或WINS,关了.

Telephony - 拨号服务,如果你的宽带不用拨号,那么关了它.

terminal services-实现远程登录本地电脑,快速用户切换和远程桌面功能需要,

不用这些功能就关了吧.

themes -给xp打扮的东东,不要太花锹的就关了.

uninterruptible power supply-停电保护设备用的...没有的就关.

universal plug and play device host-同SSDP Discovery Service ,没用.

volume shadow copy-同MS Software Shadow Copy Provider,无用.

webclient-可能和以后的.net技术有联系,安全起见,我关得实实的!

Windows Audio - 控制着你听到的声音.关了就没声音了!!

Windows Installer -windows的MSI安装服务,建议设成手动.

windows image acquisition (WIA) -有些数码相机和扫描器用的,我的扫描器觉得它没用.

Windows Management Instrumentation - 满重要的服务,是管"服务依K"的,但关

了会出现奇怪的问题.

windows management 包含umentat

另外,团IDC网上有许多产品团购,便宜有口碑

vb.net 帮助文档

msdn的帮助文档都会在微软中文官网附加在Visual Studio的开发环境中

VB,VBA, VB.net 都有什么区别和共同点?

如果你想学的话,最好学VB.net,一来功能强,二来,能帮助你学习基本概念.比方说我学VB的时候,什么是类一点概念都没有.都是学了.net之后才懂得.三来么,学会了VB.net.学其他都很方便的.

但是如果就是用用excel的话么,VBA就可以了.不过说句老实话,光学VBA的话,很多东西理解起来比较难.我是最后学VBA的,看了书一个礼拜之后就能随便编了.但是书上很多代码的,我猜如果没有VB基础,估计看不懂

以上就是土嘎嘎小编为大家整理的vb.nethelp的简单介绍vb.nethelp的简单介绍相关咨询咨询主题介绍,如果您觉得小编更新的文章只要能对粉丝们有用,就是我们最大的鼓励和动力,不要忘记讲本站分享给您身边的朋友哦!!

版权声明:倡导尊重与保护知识产权。未经许可,任何人不得复制、转载、或以其他方式使用本站《原创》内容,违者将追究其法律责任。本站文章内容,部分图片来源于网络,如有侵权,请联系我们修改或者删除处理。

编辑推荐

热门文章