home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 23 / IOPROG_23.ISO / SOFT / RPRINT.ZIP / MsFlexSample.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-09-19  |  11.3 KB  |  359 lines

  1. VERSION 5.00
  2. Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
  3. Object = "{C932BA88-4374-101B-A56C-00AA003668DC}#1.1#0"; "MSMASK32.OCX"
  4. Begin VB.Form MsFlexSample 
  5.    BackColor       =   &H00FFFFFF&
  6.    Caption         =   "MsFlexSample"
  7.    ClientHeight    =   6960
  8.    ClientLeft      =   -210
  9.    ClientTop       =   1365
  10.    ClientWidth     =   11865
  11.    LinkTopic       =   "Form1"
  12.    MDIChild        =   -1  'True
  13.    ScaleHeight     =   6960
  14.    ScaleWidth      =   11865
  15.    WindowState     =   2  'Maximized
  16.    Begin VB.TextBox Text1 
  17.       BeginProperty Font 
  18.          Name            =   "MS Sans Serif"
  19.          Size            =   9.75
  20.          Charset         =   177
  21.          Weight          =   700
  22.          Underline       =   0   'False
  23.          Italic          =   0   'False
  24.          Strikethrough   =   0   'False
  25.       EndProperty
  26.       Height          =   495
  27.       Left            =   120
  28.       MultiLine       =   -1  'True
  29.       TabIndex        =   0
  30.       Text            =   "MsFlexSample.frx":0000
  31.       Top             =   2640
  32.       Visible         =   0   'False
  33.       Width           =   9555
  34.    End
  35.    Begin VB.CommandButton Command2 
  36.       BackColor       =   &H00FFFFFF&
  37.       Caption         =   "Close"
  38.       Height          =   345
  39.       Left            =   8445
  40.       Style           =   1  'Graphical
  41.       TabIndex        =   11
  42.       Top             =   180
  43.       Width           =   810
  44.    End
  45.    Begin MSMask.MaskEdBox MaskEd 
  46.       Height          =   315
  47.       Left            =   7800
  48.       TabIndex        =   10
  49.       Top             =   960
  50.       Width           =   1755
  51.       _ExtentX        =   3096
  52.       _ExtentY        =   556
  53.       _Version        =   327681
  54.       BorderStyle     =   0
  55.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  56.          Name            =   "MS Sans Serif"
  57.          Size            =   9.75
  58.          Charset         =   177
  59.          Weight          =   700
  60.          Underline       =   0   'False
  61.          Italic          =   0   'False
  62.          Strikethrough   =   0   'False
  63.       EndProperty
  64.       Format          =   "dd/mm/yy"
  65.       PromptChar      =   "_"
  66.    End
  67.    Begin VB.Frame Frame1 
  68.       BackColor       =   &H00FFFFFF&
  69.       Height          =   735
  70.       Left            =   1080
  71.       TabIndex        =   4
  72.       Tag             =   "noprint"
  73.       Top             =   5880
  74.       Width           =   6072
  75.       Begin VB.Label Label3 
  76.          BackColor       =   &H8000000E&
  77.          Caption         =   "Quantity"
  78.          BeginProperty Font 
  79.             Name            =   "MS Sans Serif"
  80.             Size            =   12
  81.             Charset         =   177
  82.             Weight          =   700
  83.             Underline       =   0   'False
  84.             Italic          =   0   'False
  85.             Strikethrough   =   0   'False
  86.          EndProperty
  87.          ForeColor       =   &H00800080&
  88.          Height          =   360
  89.          Left            =   90
  90.          TabIndex        =   8
  91.          Top             =   240
  92.          Width           =   1305
  93.       End
  94.       Begin VB.Label Label1 
  95.          BackColor       =   &H00FFFFFF&
  96.          Caption         =   "Amount"
  97.          BeginProperty Font 
  98.             Name            =   "MS Sans Serif"
  99.             Size            =   12
  100.             Charset         =   177
  101.             Weight          =   700
  102.             Underline       =   0   'False
  103.             Italic          =   0   'False
  104.             Strikethrough   =   0   'False
  105.          EndProperty
  106.          ForeColor       =   &H000000C0&
  107.          Height          =   390
  108.          Left            =   3030
  109.          TabIndex        =   7
  110.          Top             =   240
  111.          Width           =   1005
  112.       End
  113.       Begin VB.Label Label2 
  114.          Alignment       =   2  'Center
  115.          BackColor       =   &H00FF0000&
  116.          Caption         =   "$ 0.00"
  117.          BeginProperty Font 
  118.             Name            =   "MS Sans Serif"
  119.             Size            =   12
  120.             Charset         =   177
  121.             Weight          =   700
  122.             Underline       =   -1  'True
  123.             Italic          =   0   'False
  124.             Strikethrough   =   0   'False
  125.          EndProperty
  126.          ForeColor       =   &H00FFFFFF&
  127.          Height          =   375
  128.          Left            =   4200
  129.          TabIndex        =   6
  130.          Top             =   240
  131.          Width           =   1335
  132.       End
  133.       Begin VB.Label Label4 
  134.          Alignment       =   2  'Center
  135.          Appearance      =   0  'Flat
  136.          BackColor       =   &H80000005&
  137.          BorderStyle     =   1  'Fixed Single
  138.          Caption         =   "6"
  139.          BeginProperty Font 
  140.             Name            =   "MS Sans Serif"
  141.             Size            =   12
  142.             Charset         =   177
  143.             Weight          =   700
  144.             Underline       =   0   'False
  145.             Italic          =   0   'False
  146.             Strikethrough   =   0   'False
  147.          EndProperty
  148.          ForeColor       =   &H80000008&
  149.          Height          =   375
  150.          Left            =   1425
  151.          TabIndex        =   5
  152.          Top             =   240
  153.          Width           =   1335
  154.       End
  155.    End
  156.    Begin VB.CommandButton Command1 
  157.       BackColor       =   &H00FFFFFF&
  158.       Caption         =   "Click to Invoice Style"
  159.       BeginProperty Font 
  160.          Name            =   "MS Sans Serif"
  161.          Size            =   9.75
  162.          Charset         =   177
  163.          Weight          =   700
  164.          Underline       =   0   'False
  165.          Italic          =   0   'False
  166.          Strikethrough   =   0   'False
  167.       EndProperty
  168.       Height          =   408
  169.       Left            =   3840
  170.       Style           =   1  'Graphical
  171.       TabIndex        =   3
  172.       Top             =   975
  173.       Width           =   3180
  174.    End
  175.    Begin MSFlexGridLib.MSFlexGrid MSFlex 
  176.       Bindings        =   "MsFlexSample.frx":0541
  177.       Height          =   2775
  178.       Left            =   480
  179.       TabIndex        =   1
  180.       Top             =   3090
  181.       Width           =   7995
  182.       _ExtentX        =   14102
  183.       _ExtentY        =   4895
  184.       _Version        =   65541
  185.       Rows            =   15
  186.       Cols            =   4
  187.       FixedCols       =   0
  188.       ForeColorFixed  =   16711680
  189.       BackColorBkg    =   16777215
  190.       AllowUserResizing=   3
  191.    End
  192.    Begin VB.Data Data1 
  193.       Caption         =   "Data1"
  194.       Connect         =   "Access"
  195.       DatabaseName    =   "Publish.mdb"
  196.       DefaultCursorType=   0  'DefaultCursor
  197.       DefaultType     =   2  'UseODBC
  198.       Exclusive       =   0   'False
  199.       Height          =   345
  200.       Left            =   4290
  201.       Options         =   0
  202.       ReadOnly        =   0   'False
  203.       RecordsetType   =   1  'Dynaset
  204.       RecordSource    =   "Customers"
  205.       Top             =   4920
  206.       Width           =   1692
  207.    End
  208.    Begin VB.PictureBox Picture1 
  209.       Appearance      =   0  'Flat
  210.       BackColor       =   &H80000005&
  211.       BorderStyle     =   0  'None
  212.       ForeColor       =   &H80000008&
  213.       Height          =   1290
  214.       Left            =   360
  215.       Picture         =   "MsFlexSample.frx":0551
  216.       ScaleHeight     =   1290
  217.       ScaleWidth      =   3465
  218.       TabIndex        =   2
  219.       Top             =   120
  220.       Width           =   3465
  221.    End
  222.    Begin VB.Image Image1 
  223.       Height          =   855
  224.       Left            =   360
  225.       Picture         =   "MsFlexSample.frx":10B6
  226.       Stretch         =   -1  'True
  227.       Top             =   1320
  228.       Width           =   2925
  229.    End
  230.    Begin VB.Label Label5 
  231.       Alignment       =   2  'Center
  232.       BackColor       =   &H00FFFFFF&
  233.       Caption         =   "Printing MSFlexGrid with RoboPrint"
  234.       BeginProperty Font 
  235.          Name            =   "MS Sans Serif"
  236.          Size            =   13.5
  237.          Charset         =   177
  238.          Weight          =   700
  239.          Underline       =   0   'False
  240.          Italic          =   0   'False
  241.          Strikethrough   =   0   'False
  242.       EndProperty
  243.       ForeColor       =   &H000000C0&
  244.       Height          =   345
  245.       Left            =   480
  246.       TabIndex        =   9
  247.       Top             =   2715
  248.       Width           =   6810
  249.    End
  250.    Begin VB.Shape Shape2 
  251.       BackColor       =   &H000000FF&
  252.       BackStyle       =   1  'Opaque
  253.       FillStyle       =   5  'Downward Diagonal
  254.       Height          =   240
  255.       Left            =   8235
  256.       Shape           =   2  'Oval
  257.       Top             =   6630
  258.       Width           =   210
  259.    End
  260.    Begin VB.Shape Shape1 
  261.       BackColor       =   &H000000FF&
  262.       BackStyle       =   1  'Opaque
  263.       FillStyle       =   4  'Upward Diagonal
  264.       Height          =   270
  265.       Left            =   480
  266.       Shape           =   2  'Oval
  267.       Top             =   6600
  268.       Width           =   210
  269.    End
  270.    Begin VB.Line Line1 
  271.       BorderWidth     =   3
  272.       X1              =   795
  273.       X2              =   8010
  274.       Y1              =   6750
  275.       Y2              =   6750
  276.    End
  277. Attribute VB_Name = "MsFlexSample"
  278. Attribute VB_GlobalNameSpace = False
  279. Attribute VB_Creatable = False
  280. Attribute VB_PredeclaredId = True
  281. Attribute VB_Exposed = False
  282. Private Sub Command1_Click()
  283. Static Style As Boolean
  284. Style = Not Style
  285. If Style Then
  286. Command1.Caption = "Click to Recordset Style"
  287. Invoice
  288. Frame1.Tag = ""
  289. Text1.Visible = True
  290. Label5.Visible = False
  291. MSFlex.WordWrap = True
  292. Command1.Caption = "Click to Invoice Style"
  293. DTSource
  294. Frame1.Tag = "noprint"
  295. Text1.Visible = False
  296. Label5.Visible = True
  297. MSFlex.WordWrap = False
  298. End If
  299. End Sub
  300. Private Sub Command2_Click()
  301. Unload Me
  302. End Sub
  303. Private Sub Form_Load()
  304. 'MaskEd = Format(Now, "dd/mm/yy")
  305. Data1.DatabaseName = App.Path & "\Publish.mdb"
  306. Invoice
  307. End Sub
  308. Private Sub DTSource()
  309. MSFlex.Redraw = True
  310. Data1.Refresh
  311. MSFlex.Refresh
  312. End Sub
  313. Public Sub Invoice()
  314. MSFlex.Clear
  315. MSFlex.Rows = 10
  316. MSFlex.Cols = 4
  317. MSFlex.ColWidth(0) = 2100
  318. MSFlex.TextMatrix(0, 0) = "Product"
  319. MSFlex.ColAlignment(0) = 1
  320. MSFlex.ColWidth(1) = 1600
  321. MSFlex.ColAlignment(1) = 6
  322. MSFlex.TextMatrix(0, 1) = "Units"
  323. MSFlex.ColAlignment(2) = 6
  324. MSFlex.ColWidth(2) = 1700
  325. MSFlex.TextMatrix(0, 2) = "Price"
  326. MSFlex.ColAlignment(3) = 6
  327. MSFlex.ColWidth(1) = 1100
  328. MSFlex.TextMatrix(0, 3) = "Total"
  329. MSFlex.RowHeight(2) = 400
  330. MSFlex.RowHeight(1) = 1100
  331. MSFlex.TextMatrix(1, 0) = "RobOPrintVB5.Ocx Demo"
  332. MSFlex.Col = 0
  333. MSFlex.Row = 1
  334. MSFlex.CellBackColor = &HFFFF&
  335. MSFlex.CellFontSize = 12
  336. MSFlex.TextMatrix(2, 0) = "Sample Project"
  337. MSFlex.TextMatrix(3, 0) = "MsFlexSample Form"
  338. MSFlex.TextMatrix(4, 0) = "Sample Project"
  339. MSFlex.TextMatrix(1, 1) = "1.00"
  340. MSFlex.TextMatrix(1, 2) = "0.00"
  341. MSFlex.TextMatrix(1, 3) = "0.00"
  342. MSFlex.TextMatrix(2, 1) = "1.00"
  343. MSFlex.TextMatrix(2, 2) = "0.00"
  344. MSFlex.TextMatrix(2, 3) = "0.00"
  345. MSFlex.TextMatrix(3, 1) = "1.00"
  346. MSFlex.TextMatrix(3, 2) = "0.00"
  347. MSFlex.TextMatrix(3, 3) = "0.00"
  348. MSFlex.TextMatrix(4, 1) = "1.00"
  349. MSFlex.TextMatrix(4, 2) = "0.00"
  350. MSFlex.TextMatrix(4, 3) = "0.00"
  351. MSFlex.TextMatrix(5, 0) = "Sample MdiForm"
  352. MSFlex.TextMatrix(5, 1) = "1.00"
  353. MSFlex.TextMatrix(5, 2) = "0.00"
  354. MSFlex.TextMatrix(5, 3) = "0.00"
  355. End Sub
  356. Private Sub Picture1_Click()
  357. Invoice
  358. End Sub
  359.