home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 5_2007-2008.ISO / data / Zips / Ribbon_20020383512192006.psc / Form1.frm < prev    next >
Text File  |  2006-12-19  |  8KB  |  248 lines

  1. VERSION 5.00
  2. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
  3. Begin VB.Form Form1 
  4.    BackColor       =   &H00C0C0C0&
  5.    Caption         =   "Test Application"
  6.    ClientHeight    =   4515
  7.    ClientLeft      =   15
  8.    ClientTop       =   15
  9.    ClientWidth     =   8655
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   4515
  12.    ScaleWidth      =   8655
  13.    StartUpPosition =   2  'CenterScreen
  14.    Begin Project1.ACPRibbon ACPRibbon1 
  15.       Align           =   1  'Align Top
  16.       Height          =   1740
  17.       Left            =   0
  18.       TabIndex        =   4
  19.       Top             =   0
  20.       Width           =   8655
  21.       _ExtentX        =   15266
  22.       _ExtentY        =   3069
  23.       BackColor       =   4210752
  24.       ForeColor       =   -2147483630
  25.    End
  26.    Begin MSComctlLib.ImageList ImageList1 
  27.       Left            =   960
  28.       Top             =   2760
  29.       _ExtentX        =   1005
  30.       _ExtentY        =   1005
  31.       BackColor       =   -2147483643
  32.       ImageWidth      =   24
  33.       ImageHeight     =   23
  34.       MaskColor       =   12632256
  35.       _Version        =   393216
  36.       BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  37.          NumListImages   =   5
  38.          BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  39.             Picture         =   "Form1.frx":0000
  40.             Key             =   ""
  41.          EndProperty
  42.          BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  43.             Picture         =   "Form1.frx":05B5
  44.             Key             =   ""
  45.          EndProperty
  46.          BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  47.             Picture         =   "Form1.frx":0BD9
  48.             Key             =   ""
  49.          EndProperty
  50.          BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  51.             Picture         =   "Form1.frx":119F
  52.             Key             =   ""
  53.          EndProperty
  54.          BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  55.             Picture         =   "Form1.frx":1752
  56.             Key             =   ""
  57.          EndProperty
  58.       EndProperty
  59.    End
  60.    Begin VB.Label Label4 
  61.       BackStyle       =   0  'Transparent
  62.       Caption         =   "For last, insert in Form_Load all code to create Tabs, Categories and Buttons."
  63.       Height          =   255
  64.       Left            =   1680
  65.       TabIndex        =   3
  66.       Top             =   3840
  67.       Width           =   5775
  68.    End
  69.    Begin VB.Label Label3 
  70.       BackStyle       =   0  'Transparent
  71.       Caption         =   "To create the image of the button with transparency, saves as GIF with tranparency."
  72.       Height          =   495
  73.       Left            =   1680
  74.       TabIndex        =   2
  75.       Top             =   3000
  76.       Width           =   5775
  77.    End
  78.    Begin VB.Label Label2 
  79.       BackStyle       =   0  'Transparent
  80.       Caption         =   "Insert in ImageList All button images."
  81.       Height          =   255
  82.       Left            =   1680
  83.       TabIndex        =   1
  84.       Top             =   2760
  85.       Width           =   5775
  86.    End
  87.    Begin VB.Label Label1 
  88.       BackStyle       =   0  'Transparent
  89.       Caption         =   "Insert the ACPRibbon and a ImageList to your form."
  90.       Height          =   255
  91.       Left            =   1680
  92.       TabIndex        =   0
  93.       Top             =   2040
  94.       Width           =   5775
  95.    End
  96.    Begin VB.Image Image1 
  97.       Height          =   495
  98.       Left            =   120
  99.       Top             =   1920
  100.       Width           =   615
  101.    End
  102. End
  103. Attribute VB_Name = "Form1"
  104. Attribute VB_GlobalNameSpace = False
  105. Attribute VB_Creatable = False
  106. Attribute VB_PredeclaredId = True
  107. Attribute VB_Exposed = False
  108. '#######################################
  109. '#                                     #
  110. '#           ACP Ribbon 2007           #
  111. '#            (Ribbon Only)            #
  112. '#                  by                 #
  113. '#      adrianopaladini@gmail.com      #
  114. '#                                     #
  115. '#                                     #
  116. '#  Visual from Office 2007 Beta 2 TR  #
  117. '#                                     #
  118. '#   Please Don┤t Remove Author Info!  #
  119. '#                                     #
  120. '#######################################
  121.  
  122. '------------------------------------------------
  123. ' Bugs:
  124. '
  125. ' Please report to:
  126. '
  127. '         adrianopaladini@gmail.com
  128. '
  129. '------------------------------------------------
  130.  
  131. Dim Theme As Integer
  132.  
  133. Private Sub Form_Load()
  134.  
  135. Theme = 0
  136.  
  137. '# SET Theme
  138. ACPRibbon1.Theme = Theme    ' 0 - Black
  139.                             ' 1 - Blue
  140.                             ' 2 - Silver
  141.                         
  142.  
  143. '# OPTIONAL - Load Background for Form.
  144. Image1.Left = 0
  145. Image1.Top = ACPRibbon1.Height
  146. Image1.Picture = ACPRibbon1.LoadBackground
  147.  
  148. '# OPTIONAL - Load Background for Form
  149. Form1.BackColor = ACPRibbon1.BackColor
  150.  
  151. '# OPTIONAL - Load Forecolor for Labels
  152. Label1.ForeColor = ACPRibbon1.ForeColor
  153. Label2.ForeColor = ACPRibbon1.ForeColor
  154. Label3.ForeColor = ACPRibbon1.ForeColor
  155. Label4.ForeColor = ACPRibbon1.ForeColor
  156.  
  157.  
  158. '# Set ImageList to use for icons
  159. ACPRibbon1.ImageList = ImageList1
  160.  
  161. '# Set Buttons on Center verticaly    (True = Center, False(Default) = Align on Top)
  162. ACPRibbon1.ButtonCenter = False
  163.  
  164. '# Add Tabs ---   ID - Caption
  165. ACPRibbon1.AddTab "1", "Tab 1"
  166. ACPRibbon1.AddTab "2", "Tab 2"
  167. ACPRibbon1.AddTab "3", "Sample Tab"
  168. ACPRibbon1.AddTab "4", "New Tab"
  169. ACPRibbon1.AddTab "5", "WOW"
  170.  
  171. '# Add Cats ---   ID - Tab - Caption - ShowDialogButton
  172. ACPRibbon1.AddCat "1", "1", "Group 1", False
  173. ACPRibbon1.AddCat "2", "1", "One very large group", True
  174. ACPRibbon1.AddCat "3", "1", "Test", True
  175. ACPRibbon1.AddCat "4", "2", "More one group", True
  176. ACPRibbon1.AddCat "5", "2", "Hi!", False
  177. ACPRibbon1.AddCat "6", "3", "Hello World!", False
  178.  
  179. '# Add Button ---    ID - Cat - Capt. - Icons -   More Arrow   - ToolTip
  180. ACPRibbon1.AddButton "0", "1", "CHANGE" & vbNewLine & "THEME", 4
  181. ACPRibbon1.AddButton "1", "1", "Table", 1, False, "Insert a new Table"
  182. ACPRibbon1.AddButton "2", "1", "Insert Picture", 2
  183. ACPRibbon1.AddButton "3", "1", "Insert" & vbNewLine & "Picture", 2
  184. ACPRibbon1.AddButton "4", "2", "Graph", 3
  185. ACPRibbon1.AddButton "5", "2", "Graph", 3, True
  186. ACPRibbon1.AddButton "6", "3", "Clip Art", 4
  187. ACPRibbon1.AddButton "7", "4", "SmartDraw", 5
  188.  
  189. '# Repaint Ribbon
  190. ACPRibbon1.Refresh
  191.  
  192. End Sub
  193.  
  194. Private Sub Form_Resize()
  195.  
  196. '# this procedure will resize the ribbon
  197. ACPRibbon1.Resize
  198.  
  199. End Sub
  200.  
  201. Private Sub ACPRibbon1_TabClick(ByVal ID As String, ByVal Caption As String)
  202.  
  203. '# This Event occurs when click on each tab
  204. MsgBox "TabSelected: " & ID & "--" & Caption
  205.  
  206. End Sub
  207.  
  208. Private Sub ACPRibbon1_CatClick(ByVal ID As String, ByVal Caption As String)
  209.  
  210. '# This Event occurs when click on each ShowDialogButton for each Categorie
  211. MsgBox "ShowDialogClick: " & ID & "--" & Caption
  212.  
  213. End Sub
  214.  
  215. Private Sub ACPRibbon1_ButtonClick(ByVal ID As String, ByVal Caption As String)
  216.  
  217.  
  218. '# This Event occurs when click on each Button
  219. MsgBox "ButtonClick: " & ID & "--" & Caption
  220.  
  221.  
  222.  
  223. '# CHANGE THEME
  224. If ID = 0 Then
  225.     Theme = Theme + 1
  226.     If Theme = 3 Then Theme = 0
  227.     '# Set Theme
  228.     ACPRibbon1.Theme = Theme
  229.     '# Refresh control
  230.     ACPRibbon1.Refresh
  231.     
  232.     '# OPTIONAL - Load Background for Form.
  233.     Image1.Picture = ACPRibbon1.LoadBackground
  234.     
  235.     '# OPTIONAL - Load Background for Form
  236.     Form1.BackColor = ACPRibbon1.BackColor
  237.     
  238.     '# OPTIONAL - Load Forecolor for Labels
  239.     Label1.ForeColor = ACPRibbon1.ForeColor
  240.     Label2.ForeColor = ACPRibbon1.ForeColor
  241.     Label3.ForeColor = ACPRibbon1.ForeColor
  242.     Label4.ForeColor = ACPRibbon1.ForeColor
  243. End If
  244.  
  245.  
  246. End Sub
  247.  
  248.