home *** CD-ROM | disk | FTP | other *** search
/ Delphi Anthology / aDELPHI.iso / ActiveX / THBResize.ActiveX.v2.0.Win9xNT.Incl.Keymaker-CORE / data1.cab / Example_Files / VbDemo1 / frmNewToVersion2.frm < prev    next >
Text File  |  1999-10-24  |  10KB  |  304 lines

  1. VERSION 5.00
  2. Object = "{5F697190-7457-11D3-930E-0000B4BDB148}#2.0#0"; "THBRes20.dll"
  3. Begin VB.Form frmNewToVersion2 
  4.    Caption         =   "New to Version 2.0"
  5.    ClientHeight    =   4764
  6.    ClientLeft      =   48
  7.    ClientTop       =   324
  8.    ClientWidth     =   4152
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   4764
  11.    ScaleWidth      =   4152
  12.    StartUpPosition =   3  'Windows Default
  13.    Begin VB.TextBox txtAfterResizeHeight 
  14.       BeginProperty Font 
  15.          Name            =   "Tahoma"
  16.          Size            =   9
  17.          Charset         =   0
  18.          Weight          =   400
  19.          Underline       =   0   'False
  20.          Italic          =   0   'False
  21.          Strikethrough   =   0   'False
  22.       EndProperty
  23.       Height          =   288
  24.       Left            =   2760
  25.       TabIndex        =   7
  26.       Top             =   2760
  27.       Width           =   972
  28.    End
  29.    Begin VB.TextBox txtBeforeResizeHeight 
  30.       BeginProperty Font 
  31.          Name            =   "Tahoma"
  32.          Size            =   9
  33.          Charset         =   0
  34.          Weight          =   400
  35.          Underline       =   0   'False
  36.          Italic          =   0   'False
  37.          Strikethrough   =   0   'False
  38.       EndProperty
  39.       Height          =   288
  40.       Left            =   2760
  41.       TabIndex        =   6
  42.       Top             =   2400
  43.       Width           =   972
  44.    End
  45.    Begin VB.TextBox txtAfterResizeWidth 
  46.       BeginProperty Font 
  47.          Name            =   "Tahoma"
  48.          Size            =   9
  49.          Charset         =   0
  50.          Weight          =   400
  51.          Underline       =   0   'False
  52.          Italic          =   0   'False
  53.          Strikethrough   =   0   'False
  54.       EndProperty
  55.       Height          =   288
  56.       Left            =   1560
  57.       TabIndex        =   5
  58.       Top             =   2760
  59.       Width           =   972
  60.    End
  61.    Begin VB.TextBox txtBeforeResizeWidth 
  62.       BeginProperty Font 
  63.          Name            =   "Tahoma"
  64.          Size            =   9
  65.          Charset         =   0
  66.          Weight          =   400
  67.          Underline       =   0   'False
  68.          Italic          =   0   'False
  69.          Strikethrough   =   0   'False
  70.       EndProperty
  71.       Height          =   288
  72.       Left            =   1560
  73.       TabIndex        =   3
  74.       Top             =   2400
  75.       Width           =   972
  76.    End
  77.    Begin VB.Label Label7 
  78.       Caption         =   "The property FontSizeRelativeToWidthAndHeight alters the Font Resize behavior."
  79.       BeginProperty Font 
  80.          Name            =   "Tahoma"
  81.          Size            =   9
  82.          Charset         =   0
  83.          Weight          =   400
  84.          Underline       =   0   'False
  85.          Italic          =   0   'False
  86.          Strikethrough   =   0   'False
  87.       EndProperty
  88.       Height          =   852
  89.       Left            =   120
  90.       TabIndex        =   11
  91.       Top             =   3360
  92.       Width           =   3852
  93.    End
  94.    Begin THBResizeLibCtl.THBResize THBResize1 
  95.       Height          =   372
  96.       Left            =   120
  97.       TabIndex        =   10
  98.       Top             =   4320
  99.       Width           =   372
  100.       _cx             =   656
  101.       _cy             =   656
  102.       NoFontResizeAll =   0   'False
  103.       ResizeOnlyDirectChilds=   -1  'True
  104.       LimitFormWidthMin=   0
  105.       LimitFormWidthMax=   0
  106.       LimitFormHeightMin=   0
  107.       LimitFormHeightMax=   0
  108.       HideControlsSmallerThanWidth=   0
  109.       HideControlsSmallerThanHeight=   0
  110.       FontSizeRelativeToWidthAndHeight=   -1  'True
  111.       NumSpecialObjects=   0
  112.    End
  113.    Begin VB.Line Line8 
  114.       BorderColor     =   &H008080FF&
  115.       BorderWidth     =   2
  116.       X1              =   1440
  117.       X2              =   3840
  118.       Y1              =   3120
  119.       Y2              =   3120
  120.    End
  121.    Begin VB.Line Line7 
  122.       BorderColor     =   &H008080FF&
  123.       BorderWidth     =   2
  124.       X1              =   1440
  125.       X2              =   3840
  126.       Y1              =   2040
  127.       Y2              =   2040
  128.    End
  129.    Begin VB.Line Line6 
  130.       BorderColor     =   &H008080FF&
  131.       BorderWidth     =   2
  132.       X1              =   1440
  133.       X2              =   3840
  134.       Y1              =   2280
  135.       Y2              =   2280
  136.    End
  137.    Begin VB.Line Line5 
  138.       BorderColor     =   &H008080FF&
  139.       BorderWidth     =   2
  140.       X1              =   3840
  141.       X2              =   3840
  142.       Y1              =   3120
  143.       Y2              =   2040
  144.    End
  145.    Begin VB.Line Line4 
  146.       BorderColor     =   &H008080FF&
  147.       BorderWidth     =   2
  148.       X1              =   2640
  149.       X2              =   2640
  150.       Y1              =   3120
  151.       Y2              =   2040
  152.    End
  153.    Begin VB.Line Line3 
  154.       BorderColor     =   &H008080FF&
  155.       BorderWidth     =   2
  156.       X1              =   1440
  157.       X2              =   1440
  158.       Y1              =   3120
  159.       Y2              =   2040
  160.    End
  161.    Begin VB.Label Label6 
  162.       Alignment       =   2  'Center
  163.       Caption         =   "Height"
  164.       BeginProperty Font 
  165.          Name            =   "Tahoma"
  166.          Size            =   9
  167.          Charset         =   0
  168.          Weight          =   400
  169.          Underline       =   0   'False
  170.          Italic          =   0   'False
  171.          Strikethrough   =   0   'False
  172.       EndProperty
  173.       Height          =   252
  174.       Left            =   2760
  175.       TabIndex        =   9
  176.       Top             =   2040
  177.       Width           =   732
  178.    End
  179.    Begin VB.Label Label5 
  180.       Alignment       =   2  'Center
  181.       Caption         =   "Width"
  182.       BeginProperty Font 
  183.          Name            =   "Tahoma"
  184.          Size            =   9
  185.          Charset         =   0
  186.          Weight          =   400
  187.          Underline       =   0   'False
  188.          Italic          =   0   'False
  189.          Strikethrough   =   0   'False
  190.       EndProperty
  191.       Height          =   252
  192.       Left            =   1560
  193.       TabIndex        =   8
  194.       Top             =   2040
  195.       Width           =   972
  196.    End
  197.    Begin VB.Label Label4 
  198.       Caption         =   "AfterResize"
  199.       BeginProperty Font 
  200.          Name            =   "Tahoma"
  201.          Size            =   9
  202.          Charset         =   0
  203.          Weight          =   400
  204.          Underline       =   0   'False
  205.          Italic          =   0   'False
  206.          Strikethrough   =   0   'False
  207.       EndProperty
  208.       Height          =   252
  209.       Left            =   120
  210.       TabIndex        =   4
  211.       Top             =   2760
  212.       Width           =   1332
  213.    End
  214.    Begin VB.Label Label3 
  215.       Caption         =   "BeforeResize"
  216.       BeginProperty Font 
  217.          Name            =   "Tahoma"
  218.          Size            =   9
  219.          Charset         =   0
  220.          Weight          =   400
  221.          Underline       =   0   'False
  222.          Italic          =   0   'False
  223.          Strikethrough   =   0   'False
  224.       EndProperty
  225.       Height          =   252
  226.       Left            =   120
  227.       TabIndex        =   2
  228.       Top             =   2400
  229.       Width           =   1332
  230.    End
  231.    Begin VB.Label Label2 
  232.       Caption         =   "Two new events help you to manually resize whatever you want"
  233.       BeginProperty Font 
  234.          Name            =   "Tahoma"
  235.          Size            =   9
  236.          Charset         =   0
  237.          Weight          =   400
  238.          Underline       =   0   'False
  239.          Italic          =   0   'False
  240.          Strikethrough   =   0   'False
  241.       EndProperty
  242.       Height          =   492
  243.       Left            =   120
  244.       TabIndex        =   1
  245.       Top             =   1440
  246.       Width           =   3852
  247.    End
  248.    Begin VB.Label Label1 
  249.       Caption         =   "Supports Lines"
  250.       BeginProperty Font 
  251.          Name            =   "Tahoma"
  252.          Size            =   9
  253.          Charset         =   0
  254.          Weight          =   400
  255.          Underline       =   0   'False
  256.          Italic          =   0   'False
  257.          Strikethrough   =   0   'False
  258.       EndProperty
  259.       Height          =   372
  260.       Left            =   1320
  261.       TabIndex        =   0
  262.       Top             =   480
  263.       Width           =   1932
  264.    End
  265.    Begin VB.Line Line2 
  266.       BorderColor     =   &H000000FF&
  267.       BorderWidth     =   3
  268.       X1              =   720
  269.       X2              =   960
  270.       Y1              =   360
  271.       Y2              =   840
  272.    End
  273.    Begin VB.Line Line1 
  274.       BorderColor     =   &H0000FF00&
  275.       BorderWidth     =   3
  276.       X1              =   240
  277.       X2              =   600
  278.       Y1              =   840
  279.       Y2              =   360
  280.    End
  281. End
  282. Attribute VB_Name = "frmNewToVersion2"
  283. Attribute VB_GlobalNameSpace = False
  284. Attribute VB_Creatable = False
  285. Attribute VB_PredeclaredId = True
  286. Attribute VB_Exposed = False
  287. Option Explicit
  288.  
  289. Private Sub Form_Load()
  290.     THBResize1.hWnd = Me.hWnd
  291. End Sub
  292.  
  293. Private Sub THBResize1_AfterResize(ByVal ContainerWidthOrig As Long, ByVal ContainerWidthNew As Long, ByVal ContainerWidthPerc As Double, ByVal ContainerHeightOrig As Long, ByVal ContainerHeightNew As Long, ByVal ContainerHeightPerc As Double)
  294.     txtAfterResizeWidth = Format(ContainerWidthPerc, "###0.00") & "%"
  295.     txtAfterResizeHeight = Format(ContainerHeightPerc, "###0.00") & "%"
  296. End Sub
  297.  
  298. Private Sub THBResize1_BeforeResize(ByVal ContainerWidthOrig As Long, ByVal ContainerWidthNew As Long, ByVal ContainerWidthPerc As Double, ByVal ContainerHeightOrig As Long, ByVal ContainerHeightNew As Long, ByVal ContainerHeightPerc As Double)
  299.     txtBeforeResizeWidth = Format(ContainerWidthPerc, "###0.00") & "%"
  300.     txtBeforeResizeHeight = Format(ContainerHeightPerc, "###0.00") & "%"
  301. End Sub
  302.  
  303.  
  304.