大哥大姐吗!帮我看看这段代码那里出错了..........
清风树下 2005-11-29 02:58:38 If Me.File_Path.Text.Trim.Length = 0 Then
MessageBox.Show("您还没有选择Word文件,请选择!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error)
Me.File_Path.Focus()
Exit Sub
End If
Dim FilePath As String = Me.File_Path.Text
'连接服务器
MsgBox("用户名:" & Sys_Server_User & "密码:" & Sys_Server_Password & "IP地址:" & Sys_Server_Ip)
Try
Dim coption As New ConnectionOptions
coption.Username = CStr(Sys_Server_User.Trim)
coption.Password = CStr(Sys_Server_Password.Trim)
Dim scope As ManagementScope
scope = New ManagementScope("\\" & CStr(Sys_Server_Ip.Trim), coption)
scope.Connect()
MsgBox("登入服务器成功!")
Catch ex As Exception
MsgBox("无法登入服务器!", MsgBoxStyle.OKOnly, "提示")
End Try
Dim fi As New FileInfo(FilePath)
fi.CopyTo("\\" & Sys_Server_Ip & "\d$\新建文件夹\technic.doc", True)
MessageBox.Show("新文件已经创建成功!!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk)
Me.Close()