vb.net电话拨号 windows电话拨号程序

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

个人意见,希望采纳:

网站建设哪家好,找创新互联公司!专注于网页设计、网站建设、微信开发、小程序定制开发、集团企业网站建设等服务项目。为回馈新老客户创新互联还提供了象山免费建站欢迎大家使用!

:你先了解一下:

启动项英文msconfig

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

application layer gateway service -给与第三者网络共享/防火墙支持的服务,有些防火墙/网络共享软件需要。占用1。5mb内存。

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 link tracking client-用于局域网更新连接信息,比如在电脑A有个文件,在B做了个连接,如果文件移动了,这个服务将会更 新信息。占用4兆内存。

Distributed Transaction coordinator-无聊的东西。

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

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

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

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

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

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

IMAPI CD-burning COM service -xp刻牒服务,用软件就不用了占用1。6兆内存

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-储存本地密码和网上服务密码的服务,包括填表时的“自动完成”功能。

QoS RSVP -关!就是那个20%的 QoS

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

Remote desktop help session manager-远程帮助服务,傻透,占用4兆内存。

*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 -关!1。4兆内存

smart card helper -关!

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

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

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

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

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

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

telnet -大漏洞,我第一个关的就是这个.这根dos中 telnet 命令没关系。2兆内存。

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

不用这些功能就关了吧。

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

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

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

upload manager-用来实现服务器和客户端输送文件的服务,简单文件传输不需要这个!

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中的call

没什么区别,只是增加可读性而已,以下是摘自MSDN的说明:

Visual Basic 语言参考

Call 语句 (Visual Basic)

将控制传送到 Function、Sub 或动态链接库 (DLL) 过程。

[ Call ] procedureName [ (argumentList) ]

各部分说明

procedureName

必选。要调用的过程名。

argumentList

可选。变量和表达式列表,表示当调用过程时传递给该过程的参数。多个参数以逗号分隔。如果包括 argumentList,则必须将它放在括号内。

备注

您通常使用 Call 语句调用不返回值的过程。如果该过程返回值,Call 语句将放弃该值。

在调用过程时不要求您必须使用 Call 语句,但使用该语句可以提高代码的可读性。

VB.NET怎样做拨号连接?

Imports System.Drawing.Imaging.ImageFormat

Public Class Form1

Inherits System.Windows.Forms.Form

#Region " Windows 窗体设计器生成的代码 "

Public Sub New()

MyBase.New()

'该调用是 Windows 窗体设计器所必需的。

InitializeComponent()

'在 InitializeComponent() 调用之后添加任何初始化

End Sub

'窗体重写 dispose 以清理组件列表。

Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)

If disposing Then

If Not (components Is Nothing) Then

components.Dispose()

End If

End If

MyBase.Dispose(disposing)

End Sub

'Windows 窗体设计器所必需的

Private components As System.ComponentModel.IContainer

'注意: 以下过程是 Windows 窗体设计器所必需的

'可以使用 Windows 窗体设计器修改此过程。

'不要使用代码编辑器修改它。

Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu

Friend WithEvents MenuItem1 As System.Windows.Forms.MenuItem

Friend WithEvents MenuItem2 As System.Windows.Forms.MenuItem

Friend WithEvents MenuItem3 As System.Windows.Forms.MenuItem

Friend WithEvents MenuItem5 As System.Windows.Forms.MenuItem

Friend WithEvents MenuItem6 As System.Windows.Forms.MenuItem

Friend WithEvents MenuItem4 As System.Windows.Forms.MenuItem

Friend WithEvents MenuItem7 As System.Windows.Forms.MenuItem

Friend WithEvents MenuItem8 As System.Windows.Forms.MenuItem

Friend WithEvents MenuItem9 As System.Windows.Forms.MenuItem

Friend WithEvents MenuItem10 As System.Windows.Forms.MenuItem

Friend WithEvents MenuItem11 As System.Windows.Forms.MenuItem

Friend WithEvents MenuItem12 As System.Windows.Forms.MenuItem

Friend WithEvents MenuItem13 As System.Windows.Forms.MenuItem

Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox

Friend WithEvents OpenFileDialog1 As System.Windows.Forms.OpenFileDialog

Friend WithEvents Button1 As System.Windows.Forms.Button

Friend WithEvents Button2 As System.Windows.Forms.Button

Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox

Friend WithEvents Button3 As System.Windows.Forms.Button

Friend WithEvents Button4 As System.Windows.Forms.Button

System.Diagnostics.DebuggerStepThrough() Private Sub InitializeComponent()

Me.MainMenu1 = New System.Windows.Forms.MainMenu

Me.MenuItem1 = New System.Windows.Forms.MenuItem

Me.MenuItem2 = New System.Windows.Forms.MenuItem

Me.MenuItem3 = New System.Windows.Forms.MenuItem

Me.MenuItem5 = New System.Windows.Forms.MenuItem

Me.MenuItem6 = New System.Windows.Forms.MenuItem

Me.MenuItem4 = New System.Windows.Forms.MenuItem

Me.MenuItem7 = New System.Windows.Forms.MenuItem

Me.MenuItem8 = New System.Windows.Forms.MenuItem

Me.MenuItem9 = New System.Windows.Forms.MenuItem

Me.MenuItem10 = New System.Windows.Forms.MenuItem

Me.MenuItem11 = New System.Windows.Forms.MenuItem

Me.MenuItem12 = New System.Windows.Forms.MenuItem

Me.MenuItem13 = New System.Windows.Forms.MenuItem

Me.PictureBox1 = New System.Windows.Forms.PictureBox

Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog

Me.Button1 = New System.Windows.Forms.Button

Me.Button2 = New System.Windows.Forms.Button

Me.GroupBox1 = New System.Windows.Forms.GroupBox

Me.Button4 = New System.Windows.Forms.Button

Me.Button3 = New System.Windows.Forms.Button

Me.GroupBox1.SuspendLayout()

Me.SuspendLayout()

'

'MainMenu1

'

Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem1, Me.MenuItem4, Me.MenuItem9, Me.MenuItem12})

'

'MenuItem1

'

Me.MenuItem1.Index = 0

Me.MenuItem1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem2, Me.MenuItem3, Me.MenuItem5, Me.MenuItem6})

Me.MenuItem1.Text = "文件"

'

'MenuItem2

'

Me.MenuItem2.Index = 0

Me.MenuItem2.Text = "打开"

'

'MenuItem3

'

Me.MenuItem3.Index = 1

Me.MenuItem3.Text = "关闭"

'

'MenuItem5

'

Me.MenuItem5.Index = 2

Me.MenuItem5.Text = "保存"

'

'MenuItem6

'

Me.MenuItem6.Index = 3

Me.MenuItem6.Text = "退出"

'

'MenuItem4

'

Me.MenuItem4.Index = 1

Me.MenuItem4.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem7, Me.MenuItem8})

Me.MenuItem4.Text = "窗口"

'

'MenuItem7

'

Me.MenuItem7.Index = 0

Me.MenuItem7.MdiList = True

Me.MenuItem7.Text = "属性"

'

'MenuItem8

'

Me.MenuItem8.Index = 1

Me.MenuItem8.Text = "工具"

'

'MenuItem9

'

Me.MenuItem9.Index = 2

Me.MenuItem9.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem10, Me.MenuItem11})

Me.MenuItem9.Text = "工具"

'

'MenuItem10

'

Me.MenuItem10.Index = 0

Me.MenuItem10.Text = "中心定位"

'

'MenuItem11

'

Me.MenuItem11.Index = 1

Me.MenuItem11.Text = "选项"

'

'MenuItem12

'

Me.MenuItem12.Index = 3

Me.MenuItem12.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem13})

Me.MenuItem12.Text = "帮助"

'

'MenuItem13

'

Me.MenuItem13.Index = 0

Me.MenuItem13.Text = "关于"

'

'PictureBox1

'

Me.PictureBox1.BackColor = System.Drawing.SystemColors.Control

Me.PictureBox1.Enabled = False

Me.PictureBox1.Location = New System.Drawing.Point(88, 8)

Me.PictureBox1.Name = "PictureBox1"

Me.PictureBox1.Size = New System.Drawing.Size(256, 168)

Me.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize

Me.PictureBox1.TabIndex = 1

Me.PictureBox1.TabStop = False

'

'Button1

'

Me.Button1.Location = New System.Drawing.Point(8, 16)

Me.Button1.Name = "Button1"

Me.Button1.Size = New System.Drawing.Size(64, 56)

Me.Button1.TabIndex = 2

Me.Button1.Text = "中心定位"

'

'Button2

'

Me.Button2.Location = New System.Drawing.Point(8, 80)

Me.Button2.Name = "Button2"

Me.Button2.Size = New System.Drawing.Size(64, 56)

Me.Button2.TabIndex = 3

Me.Button2.Text = "容错值:0"

'

'GroupBox1

'

Me.GroupBox1.Controls.Add(Me.Button4)

Me.GroupBox1.Controls.Add(Me.Button3)

Me.GroupBox1.Controls.Add(Me.Button2)

Me.GroupBox1.Controls.Add(Me.Button1)

Me.GroupBox1.Cursor = System.Windows.Forms.Cursors.Hand

Me.GroupBox1.Dock = System.Windows.Forms.DockStyle.Left

Me.GroupBox1.Location = New System.Drawing.Point(0, 0)

Me.GroupBox1.Name = "GroupBox1"

Me.GroupBox1.Size = New System.Drawing.Size(80, 473)

Me.GroupBox1.TabIndex = 4

Me.GroupBox1.TabStop = False

Me.GroupBox1.Text = "功能"

'

'Button4

'

Me.Button4.Location = New System.Drawing.Point(8, 208)

Me.Button4.Name = "Button4"

Me.Button4.TabIndex = 5

Me.Button4.Text = "Button4"

'

'Button3

'

Me.Button3.Location = New System.Drawing.Point(8, 144)

Me.Button3.Name = "Button3"

Me.Button3.Size = New System.Drawing.Size(64, 56)

Me.Button3.TabIndex = 4

Me.Button3.Text = "显示过渡"

'

'Form1

'

Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)

Me.ClientSize = New System.Drawing.Size(800, 473)

Me.Controls.Add(Me.GroupBox1)

Me.Controls.Add(Me.PictureBox1)

Me.Menu = Me.MainMenu1

Me.Name = "Form1"

Me.Text = "Form1"

Me.WindowState = System.Windows.Forms.FormWindowState.Maximized

Me.GroupBox1.ResumeLayout(False)

Me.ResumeLayout(False)

End Sub

#End Region

Dim PropertyWindows As New 属性窗口

Private Sub MenuItem7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem7.Click

'PropertyWindows.Parent = Me

'PropertyWindows.MdiParent = Me

PropertyWindows.Show()

End Sub

Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click

Dim Open As New OpenFileDialog

Open.Title = "选择图片"

Open.Filter = "全部|*.*|JPG(*.jpg)|*.jpg|BMP(*.bmp)|*.bmp|TIFF(*.Tiff)|*.Tiff|PNG(*.png)|*.png|ICO(*.ico)|*.ico"

If Open.ShowDialog = DialogResult.OK Then

Try

PictureBox1.Image = Image.FromStream(Open.OpenFile, True)

'确定类型

If PictureBox1.Image.RawFormat.Equals(System.Drawing.Imaging.ImageFormat.Bmp) Then

PropertyWindows.P1.Text = "Bmp"

ElseIf PictureBox1.Image.RawFormat.Equals(System.Drawing.Imaging.ImageFormat.Gif) Then

PropertyWindows.P1.Text = "Gif"

ElseIf PictureBox1.Image.RawFormat.Equals(System.Drawing.Imaging.ImageFormat.Icon) Then

PropertyWindows.P1.Text = "Ico"

ElseIf PictureBox1.Image.RawFormat.Equals(System.Drawing.Imaging.ImageFormat.Jpeg) Then

PropertyWindows.P1.Text = "Jpg"

ElseIf PictureBox1.Image.RawFormat.Equals(System.Drawing.Imaging.ImageFormat.Png) Then

PropertyWindows.P1.Text = "Png"

End If

'确定黑白

'其它

PropertyWindows.P3.Text = PictureBox1.Image.PhysicalDimension.Width

PropertyWindows.P4.Text = PictureBox1.Image.PhysicalDimension.Height

PropertyWindows.P5.Text = PictureBox1.Image.HorizontalResolution

PropertyWindows.P6.Text = PictureBox1.Image.VerticalResolution

PictureBox1.Enabled = True '激活

Catch ex As Exception

MessageBox.Show("你打开的文件为无法识别的图像格式")

End Try

End If

End Sub

Private Sub MenuItem5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem5.Click

Dim Save As New SaveFileDialog

Save.Title = "保存图片"

Save.Filter = "全部|*.*| JPG(*.jpg)|*.jpg|BMP(*.bmp)|*.bmp _|TIFF(*.Tiff)|*.Tiff|PNG(*.png)|*.png|ICO(*.ico)|*.ico"

If Save.ShowDialog = DialogResult.OK Then

Dim PicFormat As System.Drawing.Imaging.ImageFormat

Select Case Save.FilterIndex

Case 1

PicFormat = Jpeg

Case 2

PicFormat = Jpeg

Case 3

PicFormat = Bmp

Case 4

PicFormat = Tiff

Case 5

PicFormat = Png

Case 6

PicFormat = System.Drawing.Imaging.ImageFormat.Icon

End Select

PictureBox1.Image.Save(Save.FileName, PicFormat)

End If

End Sub

Private Sub MenuItem6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem6.Click

End

End Sub

Private Sub MenuItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem3.Click

PictureBox1.Image = Nothing

'PictureBox1.Image.Dispose()

PropertyWindows.P1.Text = " "

PropertyWindows.P2.Text = " "

PropertyWindows.P3.Text = " "

PropertyWindows.P4.Text = " "

PropertyWindows.P5.Text = " "

PropertyWindows.P6.Text = " "

PictureBox1.Enabled = False '关闭激活

End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

PropertyWindows.Show()

Dim path As New System.IO.FileInfo("图像处理")

Me.Text = path.FullName

End Sub

Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseMove

Dim a As Bitmap = PictureBox1.Image

PropertyWindows.P7.Text = a.GetPixel(e.X, e.Y).R

PropertyWindows.P8.Text = a.GetPixel(e.X, e.Y).G

PropertyWindows.P9.Text = a.GetPixel(e.X, e.Y).B

PropertyWindows.P10.Text = e.X

PropertyWindows.P11.Text = e.Y

End Sub

Private Sub MenuItem10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem10.Click

End Sub

Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click

Data.X1 = Data.X2 : Data.Y1 = Data.Y2

Data.X2 = PropertyWindows.P10.Text : Data.Y2 = PropertyWindows.P11.Text

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

Dim RCoperation As New 容错值设置

If RCoperation.ShowDialog = DialogResult.OK Then

Button2.Text = "容错值:" Data.容错值

End If

End Sub

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

Dim 定位 As New 中心定位(PictureBox1.Image)

定位.MyPic = PictureBox1.Image

PictureBox1.Image = 定位.Enter()

定位 = Nothing

End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click

Data.Pic = PictureBox1.Image

Dim ShowTool As New 显示过渡工具

ShowTool.ShowDialog()

End Sub

Private Sub PictureBox1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox1.DoubleClick

Data.Pic = PictureBox1.Image

Dim ShowTool As New 显示过渡工具

ShowTool.Show()

End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click

MessageBox.Show(Int(3 / 2))

End Sub

End Class

我想用vb.net获得电话交换机的来电显示,可是却不知道从何下手,网上所说的MSComm1控件该如何用呢?

MSCOMM是VB6.0和VC6.0中的串口控件,VB.NET中是SerialPort。MSDN上可以找到相关的资料,网上也有很多例程


本文标题:vb.net电话拨号 windows电话拨号程序
当前路径:http://myzitong.com/article/hipjdd.html