mbt masai
 
Welcome !
         

                                
After experiencing a lot of down time, We decided to move this site to CrystalTech.com. CrystalTech.com is powered by only the finest Windows servers providing the best performance, reliability, and value anywhere.

 tab control and second form.

Author Message
Brendon

  • Total Posts : 2
  • Scores: 0
  • Reward points : 0
  • Joined: 2/1/2010
  • Status: offline
tab control and second form. Monday, February 01, 2010 7:24 PM (permalink)
0
Hi All,
New to the scripting thing.
I am writing a very large script, a complex user input form with many controls.
Problem is, too many. The form gets too big.
I would like to know if there is a COMPLETE guide to using the tab strip or tabbed dialog controls, in a windows application using VBSCRIPT from start to finish with some examples.
This is not a net based application.
I have the form mostly done, but need more inputs and options from the user, so I need to find a way to use the tab strip or tabbed dialog controls.

Also useful would be the ability to open a second form from a script, and keep the script running for when the second form is closed. This way I can use multiple forms instead of a tab strip to achieve the same result. I have created to classes, just data containers with lots of properties, no need for methods or events, so the second form(s) can update user data in these two classes directly so, there is no need to pass data to or from the second form, but the main form needs to still be there when the sub forms are closed.

A complete guide to using tabstrip is preferable though.
This is becoming very urgent, any help appreciated.

Thanks
Brendon

#1
    ebgreen

    • Total Posts : 8088
    • Scores: 95
    • Reward points : 0
    • Joined: 7/12/2005
    • Status: offline
    Re:tab control and second form. Tuesday, February 02, 2010 4:15 AM (permalink)
    0
    Could we see some of your existing code? I need to move this thread to the proper forum, but I can't tell where it should go from what you have provided. Seeing some code would help clarify exactly what you are working with. Thanks.
    "... 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
    #2
      tommyboy180

      • Total Posts : 7
      • Scores: 0
      • Reward points : 0
      • Joined: 2/23/2010
      • Status: offline
      Re:tab control and second form. Saturday, February 27, 2010 4:55 PM (permalink)
      0
      hmm, no code.
      #3
        asgaard

        • Total Posts : 2
        • Scores: 0
        • Reward points : 0
        • Joined: 9/21/2009
        • Status: offline
        Re:tab control and second form. Wednesday, July 21, 2010 8:17 PM (permalink)
        0
        @Brendon
        Vbscript Hta Tabs for u

         
        <html>
        <head>
        <title>Tabs.hta</title>
        <HTA:Application
        ID = "HTA"
        ApplicationName = "Tabs"
        Border = "thin"
        BorderStyle = "normal"
        Caption = "yes"
        ContextMenu="yes"
        Icon = ""
        InnerBorder="no"
        MaximizeButton = "yes"
        MinimizeButton = "yes"
        Navigable="yes"
        Scroll="yes"
        SrollFlat="no"
        Selection="yes"
        ShowInTaskBar = "yes"
        SingleInstance = "yes"
        SysMenu = "yes"
        Version = "1.0"
        >
        <script language="VBscript">
        Dim sItem
        Dim aPanels
        Dim el
        Dim iPanelCount
        iPanelCount = 6
        Private Sub Panel(tab)
        For i = 1 To iPanelCount
        If i = tab Then
        document.getElementById("tab" & i).className = "tabs tabsSelected"
        document.getElementById("panel" & i).style.display = "block"
        Else
        document.getElementById("tab" & i).className = "tabs tabsNotSelected"
        document.getElementById("panel" & i).style.display = "none"
        End If
        Next
        End Sub
        Sub AddCheck
        strHTML = panelContents2.InnerHTML
        strHTML = strHTML & "<input id=" & intCheckCount & " type=" & Chr(34) & "CheckBox" & Chr(34) & _
        " name=" & Chr(34) & "chkEnabled" & Chr(34) & "value= " & Chr(34) & "CheckBox" & intCheckCount & Chr(34) & " onClick=" & Chr(34) & _
        "NewCheckSubroutine" & Chr(34) & ">" & " <BR>"
        panelContents2.InnerHTML = strHTML
        End Sub
        </script>
        <style type="text/css">
        body,td,th { font-family:Arial }
        .head { font-size:110%; font-weight:bold }
        .panel {
        background-color: white;
        border: solid 1px black;
        height: 410px;
        padding: 5px;
        position: relative;
        width: 650px;
        z-index: 0;
        }
        .tabs {
        border-collapse: collapse;
        color: black;
        cursor: pointer;
        cursor: hand;
        font-family: arial;
        font-size: 9pt;
        font-weight: bold;
        margin-top: 4px;
        padding: 2px 4px 0px 4px;
        position: relative;
        text-align: center;
        text-decoration: none;
        z-index: 1;
        }
        .tabsNotSelected {
        background-color: wheat;
        border: solid 1px black;
        }
        .tabsSelected {
        background-color: white;
        border-color: black black white black;
        border-style: solid solid solid solid;
        border-width: 1px 1px 1px 1px;
        }
        </style>
        </head>
        <body>
        <table align="center" border="0" cellpadding="0" cellspacing="0" width="650">
        <tr valign="top">
        <td align="right" colspan="2">
        <span class="head">Tabs in HTA!</span> &nbsp; &nbsp;
        <br>
        </td>
        </tr>
        <tr valign="top">
        <td colspan="2">
        <span class="tabs tabsSelected" id="tab1" onclick="panel(1)">Tab 1</span>
        <span class="tabs tabsNotSelected" id="tab2" onclick="panel(2)">Tab 2</span>
        <span class="tabs tabsNotSelected" id="tab3" onclick="panel(3)">Tab 3</span>
        <span class="tabs tabsNotSelected" id="tab4" onclick="panel(4)">Tab 4</span>
        <span class="tabs tabsNotSelected" id="tab5" onclick="panel(5)">Tab 5</span>
        <span class="tabs tabsNotSelected" id="tab6" onclick="panel(6)">Tab 6</span>
        <div class="panel" id="panel1" style="display:block">
        <hr color="black">
        <table border="0" width="100%">
        <tr valign="top">
        <td>
        <span class="head">This is Tab 1.</span>
        <br><br>
        TAB 1
        </td>
        </tr>
        </table>
        </div>
        <div class="panel" id="panel2" style="display:none">
        <hr color="black">
        <table border="0" width="100%">
        <tr valign="top">
        <td>
        <span id="panelContents2" class="head">This is Tab 2.</span>
        <br><br>
        TAB 2
        </td>
        </tr>
        </table>
        </div>
        <div class="panel" id="panel3" style="display:none">
        <hr color="black">
        <table border="0" width="100%">
        <tr valign="top">
        <td>
        <span class="head">This is Tab 3.</span>
        <br><br>
        TAB 3
        </td>
        </tr>
        </table>
        </div>
        <div class="panel" id="panel4" style="display:none">
        <hr color="black">
        <table border="0" width="100%">
        <tr valign="top">
        <td>
        <span class="head">This is Tab 4.</span>
        <br><br>
        TAB 4
        </tr>
        </table>
        </div>
        <div class="panel" id="panel5" style="display:none">
        <hr color="black">
        <table border="0" width="100%">
        <tr valign="top">
        <td>
        <span class="head">This is Tab 5.</span>
        <br><br>
        TAB 5
        </td>
        </tr>
        </table>
        </div>
        <div class="panel" id="panel6" style="display:none">
        <hr color="black">
        <table border="0" width="100%">
        <tr valign="top">
        <td>
        <span class="head">This is Tab 6.</span>
        <br><br>
        TAB 6
        </td>
        </tr>
        </table>
        </div>
        </td>
        </tr>
        </table>
        </body>
        </html>
        #4
          roadrunnerm

          • Total Posts : 1
          • Scores: 0
          • Reward points : 0
          • Joined: 7/15/2011
          • Status: offline
          Re:tab control and second form. Wednesday, December 14, 2011 6:03 AM (permalink)
          0
          Hi I have download this tabbed HTA and put a Menubar in it and a Rightmousebutton menu
          But I have some trouble to goto the vbscripts subs sections
           
          I have the HTA from this website
          http://www.visualbasicscript.com/tab-control-and-second-form-m80430.aspx
          http://www.visualbasicscript.com/Tabbed-HTA39s-and-Compiling-HTA39s-m65728-p3.aspx
           
          For the menu bar I have used a script from
          Tom Lavedas, tlavedas at hotmail dot com
           
          And for the Rightmousebutton menu
          I have used Tiny context menu - By Alan Bond 2010
           
          The first want to do is when I klik (ore select) tabpage 3 (panel3)
          That a sub will be fired that ping a remote machine, If ping is ok get ipconfig information and some register information
          And the information must update the Form3.InnerHTML = strPCCheck
           
          How i get te ping, ipconfig an register info is no problem I get that already.
          Then problem is how to fired the sub that get the info only if i klik the tabpage and not on start of the total HTA
           
          Below I have the panel3 (tabpage 3)
          <div class="panel" id="panel3" style="display:none"><hr color="black"><table border="0" width="100%"><tr valign="top"><td> 
          <span class="head">This is Tab 3.</span><br><br> Mail.
          <span id=Form3></span>
          </td></tr></table></div>
           
          Below a test sub
          '***************************************************************************
          'Form Formtab3
          '***************************************************************************
          Sub FormTab3
          msgbox "Arrived to Check Ping, IPConfig en regkey"
          strPCCheck=strPCCheck&"<input id=runbutton  class='button' type='button' value='Submit' name='run_button' onClick='ESRunScript'>"
          Form3.InnerHTML = strPCCheck
           End Sub
          '***************************************************************************
          'Form Formtab3
          '***************************************************************************
           
          Is there somebody that can my some info
           
           
           
           
           
          <message edited by roadrunnerm on Wednesday, December 14, 2011 6:28 AM>
          #5

            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.8
            mbt shoes www.wileywilson.com