Help!!! Displaying a form under a VB Script

Author Message
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)
0
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
 
#1
    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)
    0
    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>
         

     
    #2
      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)
      0
      The script block should go in the head section.

      (And the topic shouldn't be in the Challenges forum.)

       
      #3
        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)
        0
        And for what it's worth, the original post is VB .Net not VBS.
        "... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
        Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
        http://www.visualbasicscript.com/m_47117/tm.htm
         
        #4

          Online Bookmarks Sharing: Share/Bookmark

          Jump to:

          Current active users

          There are 0 members and 1 guests.

          Icon Legend and Permission

          • New Messages
          • No New Messages
          • Hot Topic w/ New Messages
          • Hot Topic w/o New Messages
          • Locked w/ New Messages
          • Locked w/o New Messages
          • Read Message
          • Post New Thread
          • Reply to message
          • Post New Poll
          • Submit Vote
          • Post reward post
          • Delete my own posts
          • Delete my own threads
          • Rate post

          2000-2012 ASPPlayground.NET Forum Version 3.9