📄 frmmain.frm
字号:
VERSION 5.00
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "comctl32.ocx"
Begin VB.Form frmMain
BorderStyle = 1 'Fixed Single
Caption = "Inventory Item"
ClientHeight = 3420
ClientLeft = 45
ClientTop = 330
ClientWidth = 6615
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3420
ScaleWidth = 6615
StartUpPosition = 3 'Windows Default
Begin ComctlLib.ListView lvwItems
Height = 3015
Left = 150
TabIndex = 0
Top = 120
Width = 6315
_ExtentX = 11139
_ExtentY = 5318
View = 3
Arrange = 2
LabelEdit = 1
LabelWrap = -1 'True
HideSelection = -1 'True
_Version = 327682
ForeColor = -2147483640
BackColor = -2147483643
BorderStyle = 1
Appearance = 1
NumItems = 1
BeginProperty ColumnHeader(1) {0713E8C7-850A-101B-AFC0-4210102A8DA7}
Key = ""
Object.Tag = ""
Text = "Titles"
Object.Width = 4384
EndProperty
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim mobjHome As Object
Private Sub Form_Load()
'Handle errors
On Error GoTo ErrOut
'Bind the EJB ItemHome object via JNDI
Set mobjHome = CreateObject("examplesServer:jndi:jcom-inventoryitem-itemHome")
'Display Items
ListItem
'Exit before error code
Exit Sub
ErrOut:
'Notify user and end sub
Beep
MsgBox ("An error occurred while binding to EJB objects.")
End Sub
Private Sub ListItem()
Dim objItem As Object
Dim title As String
'Handle errors
On Error GoTo ErrOut
Set objItem = mobjHome.Create()
title = objItem.getItem()
MsgBox ("EJB Accessed:: " + title)
Exit Sub
ErrOut:
'Notify user and end sub
Beep
MsgBox ("An error occurred while accessing items.")
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -