Results 1 to 4 of 4

Thread: Best way to dim Tab Strip on a form

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2006
    Location
    Douala
    Posts
    5

    Best way to dim Tab Strip on a form

    I will really appreciate any help about Tab strip usage in a form because i actually succed to do it once but after a computer change i experience bugs...

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Best way to dim Tab Strip on a form

    Welcome to the forums.

    What do you have that isn't working?

  3. #3

    Thread Starter
    New Member
    Join Date
    Sep 2006
    Location
    Douala
    Posts
    5

    Re: Best way to dim Tab Strip on a form

    This is my code (compilation error highligth tabs)
    Code:
    Option Explicit
    Dim Ongl_1, Ongl_2, Ongl_3 As Object
    Dim Message0, AFile, AExten, CExten, String_1, String_2, String_3, String_4, RawLine, RawDate, RawLabel, RawUnit, RawData, ConvertLine, ConvertDate, ConvertLabel, ConvertUnit, ConvertData, ConvertData_0 As String
    Dim Line_1, Line_1_0, Line_1_1, Line_2, Line_2_0, Line_2_1, e_0, e_1, er, e As Integer
    Dim F0_Unit, F1_Unit As Double
    '---- Initializations
    Private Sub Form_Load()
        With frm1
            '----Form settings
    '        .Move 0, 0, 1260 * ScaleWidth / 1000, 1340 * ScaleHeight / 1000
            .Move 0, 0, 1005 * ScaleWidth / 1000, 1001 * ScaleHeight / 1000
            .Caption = "Multiphase Flowmeter Vx Technology"
            .WindowState = 2
        End With
        With TabStrip1
            '----TabStrip settings
            Set Ongl_1 = .Tabs.Add(2, "Ongl_1", "ASCII File Conversion")
            Set Ongl_2 = .Tabs.Add(3, "Ongl_2", "Job Preparation")
            Set Ongl_3 = .Tabs.Add(4, "Ongl_3", "Maintenance")
            .Tabs(1) = "About"
            .Top = 10 * frm1.Height / 1000
            .Left = 10 * frm1.Width / 1000
            .Height = 1430 * frm1.Height / 1000
            .Width = 1550 * frm1.Width / 1000
        End With
            
        '----Tab1 settings "About"
        With fra0
            .BorderStyle = 1
            .Caption = ""
            .Visible = True
            .Top = 45 * TabStrip1.Height / 1000
            .Left = 10 * TabStrip1.Width / 1000
            .Height = 955 * TabStrip1.Height / 1000
            .Width = 990 * TabStrip1.Width / 1000
        End With
    
        '----Tab2 settings "ASCII File Conversion"
        With fra1
            .BorderStyle = 1
            .Caption = ""
            .Visible = False
            .Top = 45 * TabStrip1.Height / 1000
            .Left = 10 * TabStrip1.Width / 1000
            .Height = 955 * TabStrip1.Height / 1000
            .Width = 990 * TabStrip1.Width / 1000
        End With
        '----Tab3 settings "Job Preparation"
        With fra2
            .Move 10 * ScaleWidth / 1000, 55 * ScaleHeight / 1000, 990 * ScaleWidth / 1000, 945 * ScaleHeight / 1000
            .BorderStyle = 1
            .Caption = ""
            .Visible = False
            .Top = 45 * TabStrip1.Height / 1000
            .Left = 10 * TabStrip1.Width / 1000
            .Height = 955 * TabStrip1.Height / 1000
            .Width = 990 * TabStrip1.Width / 1000
        End With
        '----Tab4 settings "Maintenance"
        With fra3
            .Move 10 * ScaleWidth / 1000, 55 * ScaleHeight / 1000, 990 * ScaleWidth / 1000, 945 * ScaleHeight / 1000
            .BorderStyle = 1
            .Caption = ""
            .Visible = False
            .Top = 45 * TabStrip1.Height / 1000
            .Left = 10 * TabStrip1.Width / 1000
            .Height = 955 * TabStrip1.Height / 1000
            .Width = 990 * TabStrip1.Width / 1000
        End With
    End Sub
    Last edited by Hack; Aug 14th, 2007 at 11:54 AM. Reason: Added Code Tags

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Best way to dim Tab Strip on a form

    Where is the compile error?

    One thing, though. Your declares need to be redone. You have
    Code:
    Dim Ongl_1, Ongl_2, Ongl_3 As Object
    Dim Message0, AFile, AExten, CExten, String_1, String_2, String_3, String_4, RawLine, RawDate, RawLabel, RawUnit, RawData, ConvertLine, ConvertDate, ConvertLabel, ConvertUnit, ConvertData, ConvertData_0 As String
    Dim Line_1, Line_1_0, Line_1_1, Line_2, Line_2_0, Line_2_1, e_0, e_1, er, e As Integer
    Dim F0_Unit, F1_Unit As Double
    For objects, you have one: Ongl_3 - all the rest are variants
    For strings, you have one: ConvertData_0 - all the rest are variants
    For integers, you have one: e - all the rest are variants

    To property declared these, As Type MUST follow each one. In other words
    Code:
    Dim Ongl_1 As Object, Ongl_2 As Object, Ongl_3 As Object
    The same is true for all your strings and integers as well.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width