form1.frm
来自「BEA WebLogic Server 8.1大全 = BEA webLogic」· FRM 代码 · 共 77 行
FRM
77 行
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 'Windows Default
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim mobjHome As itemTLB.ComJcomInventoryitemItemHome
Dim objTemp As Object
Private Sub Form_Load()
Dim objNarrow As New itemTLB.JCOMHelper
'Handle errors
On Error GoTo ErrOut
'Bind the EJB ItemHome object via JNDI
Set objTemp = CreateObject("examplesServer:jndi:jcom-inventoryitem-itemHome")
'Display Items
'Narrow object -- Early bound
Set mobjHome = objNarrow.narrow(objTemp, "com.jcom.inventoryitem.ItemHome")
'Display Items
ListItems
'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 ListItems()
Dim objItem As itemTLB.ComJcomInventoryitemItem
Dim item As String
'Handle errors
On Error GoTo ErrOut
Set objItem = mobjHome.Create()
item = objItem.getItem()
MsgBox ("EJB Accessed:: " + item)
Exit Sub
ErrOut:
'Notify user and end sub
Beep
MsgBox ("An error occurred while accessing items.")
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?