Aspen Touch Solutions ATM-123R Series Specifikace Strana 23

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 374
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 22
Automation 2-9
2-9
2.3 Automation Syntax
Declaring Objects
An object in Visual Basic is another type of variable and should
be declared. Objects can be declared using the generic type
identifier object. The preferred method however uses the type
library reference to declare the object variables by an explicit
object name.
Once a reference to the type library has been established, the
actual name of the object as it appears in the type library can be
used. This is called early binding. It offers some advantages
over late binding, including speed and access to Microsoft’s
Intellisense
®
functionality when using Visual Basic or VBA.
Set Keyword
Connections or references to object variables are made by using
the Set keyword.
Early Binding:
Dim|Public|Private objectvar As ObjectName as specified in the type library
Late Binding:
Dim|Public|Private objectvar As Object
Example: Late Binding
Public hyCase As Object
Public hyStream As Object
Example: Early Binding
Public hyCase As SimulationCase
Public hyStream As ProcessStream
Syntax:
Set objectvar = object.[object…].object | Nothing
Zobrazit stránku 22
1 2 ... 18 19 20 21 22 23 24 25 26 27 28 ... 373 374

Komentáře k této Příručce

Žádné komentáře