Convert vbs to vb code
Convert vbs to vb code
Convert vbs to vb code
Convert vbs to vb code
Convert vbs to vb code
Convert vbs to vb code Convert vbs to vb code Convert vbs to vb code Convert vbs to vb code Convert vbs to vb code Convert vbs to vb code Convert vbs to vb code Convert vbs to vb code
Convert vbs to vb code Convert vbs to vb code
Convert vbs to vb code
Go Back  Xtreme Visual Basic Talk > > > Convert vbs to vb code


Reply
 
Thread Tools Display Modes
  #1  
Old 10-20-2005, 01:02 PM
Sweathog Sweathog is offline
Newcomer
 
Join Date: Oct 2005
Posts: 1
Default Convert vbs to vb code


I've been trying to change my vbs to a vb so that I can make a little utility kit. I have the following vbs code that runs flawlessly and I'm trying to make a vb from it. I've got the inputbox and message box working, its the remainder that Ic annot figure out. I have no experience in programming so I'm a work in progress...

vbs:
Code:
'Set the server name strComputer = InputBox("Enter Computer Name Here", "Server UpTime Query") Set objShell = CreateObject("WScript.Shell") 'Run uptime to generate the data Set objWshScriptExec = objShell.Exec("cmd /c uptime.exe " & " \\" & strComputer) Set objStdOut = objWshScriptExec.StdOut 'Get the details strLine = objStdOut.ReadLine 'Display the result msgbox strLine, vbokonly, "Server UpTime Results"
So far in VB:
Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim myServer As Object Dim response As MsgBoxResult Dim line As String Dim ID As String myServer = InputBox("Enter Computer Name Here", "Server UpTime Query") ID = Shell("cmd /c C:\temp\batch\uptime\uptime.exe", , True, 100000) line = Console.ReadLine() response = MsgBox(line) End End Sub
Edit by moderator: You can use the [vb] tags to format your code, to make it easier to read. Click 'Edit' or 'Reply' on this post to see how they work, or read all about tags here.
It also helps if you post VB.NET questions in the right forum (= not in the VB6 section). Thanks.

Last edited by herilane; 10-20-2005 at 03:04 PM.
Reply With Quote
  #2  
Old 10-20-2005, 01:10 PM
reboot's Avatar
rebootConvert vbs to vb code reboot is offline
Keeper of foo

Retired Moderator
* Guru *
 
Join Date: Nov 2001
Location: Graceland
Posts: 15,614
Default

Look at System.Process
__________________
~ Quod non mortiferum, fortiorem me facit ~

Avatar by lebb
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Convert vbs to vb code
Convert vbs to vb code
Convert vbs to vb code Convert vbs to vb code
Convert vbs to vb code
Convert vbs to vb code
Convert vbs to vb code Convert vbs to vb code Convert vbs to vb code Convert vbs to vb code Convert vbs to vb code Convert vbs to vb code Convert vbs to vb code
Convert vbs to vb code
Convert vbs to vb code
 
Convert vbs to vb code
Convert vbs to vb code
 
-->