tescatlipoca
-
Total Posts
:
1
- Scores: 0
-
Reward points
:
0
- Joined: 4/23/2010
-
Status: offline
|
Help!!! Displaying a form under a VB Script
Friday, April 23, 2010 7:57 AM
( permalink)
Ok here is my situation. I have vb script which runs for a sw right at the moment. However we would like to edit that script and display a form which will help us to test a hardware. When I create a form under visual basic studio and basicly copy that forum to our script I get Statement is not valid in a namespace for : <System.Diagnostics.DebuggerNonUserCode()> _ Private components As System.ComponentModel.IContainer <System.Diagnostics.DebuggerStepThrough()> _ Friend WithEvents Label1 As System.Windows.Forms.Label any idea? I am really frustrated. Or any advice would be appreciated. Thank you
|
|
|
|
milnet
-
Total Posts
:
18
- Scores: 0
-
Reward points
:
0
- Joined: 4/23/2010
-
Status: offline
|
Re:Help!!! Displaying a form under a VB Script
Monday, May 10, 2010 6:03 PM
( permalink)
If you would like an interface for your visual basic scripts, the best would be to use an HTA (HTML Application). An HTA is basically a web page that runs using MSHTA (similar to CScript / WScript). A basic HTA looks like this:
<html>
<head>
<title>My HTML application</title>
<HTA:APPLICATION
APPLICATIONNAME="My HTML application"
ID="MyHTMLapplication"
VERSION="1.0"/>
</head> <script language="VBScript"> Sub Window_OnLoad
'This method will be called when the application loads
'Add your code here
End Sub
Sub subName
' do something
End Sub </script> <body bgcolor="white"> <!--Add your controls here--> <p onClick="subName">Hellow</p> <!--{{InsertControlsHere}}-Do not remove this line--> </body>
</html>
|
|
|
|
ehvbs
-
Total Posts
:
3320
- Scores: 112
-
Reward points
:
0
- Joined: 6/22/2005
- Location: Germany
-
Status: offline
|
Re:Help!!! Displaying a form under a VB Script
Monday, May 10, 2010 8:22 PM
( permalink)
The script block should go in the head section. (And the topic shouldn't be in the Challenges forum.)
|
|
|
|
ebgreen
-
Total Posts
:
8227
- Scores: 98
-
Reward points
:
0
- Joined: 7/12/2005
-
Status: offline
|
Re:Help!!! Displaying a form under a VB Script
Tuesday, May 11, 2010 3:12 AM
( permalink)
And for what it's worth, the original post is VB .Net not VBS.
|
|
|
|