Professional Documents
Culture Documents
" # $
!" ## $ % # & ' "( ) "
## % ' ' "( )
* & + '' , & - '' !"
+ ## ". ' / "( ) 0# 1 2
$ ' . ' 3& & & ". '" 4 .
3& & & "$- " 4 '' # ' !" # %
## & + '' $ " 5' # -
'- ' ' & ' ## "( ) -
# - $ "
5 #* + " '' + # #
## # - "6 7 ## 8' - & $ '
+ $ ' & "( ) ' - # & "( ) ' "6
+ ' ' - ' # "( ) $
# & ' ## " + # $ ' ' #
- !" "( ) ## $
$ # ' ' ## 8- # # "
• 5 #0 - "( ) -
!" ' "
• + & ## !" # ' 3 54 ' -
5 #0 "
• # ' - ## # "
# : -% 3 : 4 # ' # -
3 ;4 '' " : # - & :
# & "5 - ; 7# -%
: # "0 !" & -%
- ; & "( ) ". ' + & : - & ##
3 14 ' ' : $
!" ## $ - + "
. $ # 1 - # - )7#
3 - 7#" 7 4" # ' 1 ' 7# #
' !" # "< & $ # 7 $ $
"( ) & - $ 7# & & !"
"5 # ' - '
# ' ' # - $ ' :
# $ "
. !" $ # ' # - + #
!" & " $ # ' # !"
$ # $ 35 )4 & " ' 5 /
7# ' # # 8# # $
!" "
=
& & # % # 3* 4"
# ' & 5 #* 5 #0
' ## # $ # & # "
@
5' # ' +
# % "6 + 5 ## % '
## # % # $ - +
& 5 ## % 9
! "# $ %
" !5 #0 # % $ # - # " 7
' " # ' ' 1 = / $ # # '
' 1 & '& $ # + 3 C4" 5' ' #
>
- # + + * @"
5 #* !" # % # $ # 9
" !5
#* - # % "
" ' !" # % & "
=" "( ) 5 ## % & : # "
@" ; ' & # ' !" # % "
>" 0 5 #* !" # % "
! " #$ %
& "( ) # % - !5 #* - # " # %
' "6
' & + $ - !" - !5 #*
# "
& ' ( $ % )
' 5 # - # % "( ) ' $ -
"( ) " 7# ' !" $
$ # # $ & ## # -
3 ) ' * #
+ 4" ' & 7 # 3F5 #* 3)> _
!
Me.Text = title
End Sub
<InteropFormProperty()> _
Public WriteOnly Property ShowToday() As Boolean
Set(ByVal value As Boolean)
calendar.ShowToday = value
End Set
End Property
<InteropFormMethod()> _
Public Sub SetCalendar(ByVal month As Integer, _
ByVal year As Integer)
calendar.SetDate(New Date(year, month, 1))
End Sub
<InteropFormEvent()> _
Public Event DateChanged As DateChangedEventHandler
Public Delegate Sub DateChangedEventHandler _
(ByVal StartDate As String, ByVal EndDate As String)
4 ' - "
<InteropForm()> _
Public Class InteropForm1
<InteropFormInitializer()> _
Public Sub New(ByVal title As String)
InitializeComponent()
Me.Text = title
End Sub
<InteropFormProperty()> _
Public WriteOnly Property ShowToday() As Boolean
Set(ByVal value As Boolean)
calendar.ShowToday = value
End Set
End Property
<InteropFormMethod()> _
Public Sub SetCalendar(ByVal month As Integer, _
ByVal year As Integer)
calendar.SetDate(New Date(year, month, 1))
End Sub
<InteropFormEvent()> _
Public Event DateChanged As DateChangedEventHandler
Public Delegate Sub DateChangedEventHandler _
(ByVal StartDate As String, ByVal EndDate As String)
G
(ByVal sender As System.Object, _
ByVal e As System.Windows.Forms.DateRangeEventArgs) _
Handles calendar.DateChanged
RaiseEvent DateChanged(e.Start.ToShortDateString(), _
e.End.ToShortDateString())
End Sub
End Class
, - . +"
* # + ## - ' # # # ' 5 #
- " 9
• / ! 0
•
• .
• 1$
+ $ ## # # #
$ 3* >4"
$2" $ 5 $ +
3 2" $ 5 +
2" $ 5 ' +
2" $ 5
2" $ 5 $ '
4
*+ $ %
' - # % 5 #* & ## " +
# ' + 3* !4"
5 6
, - * . - ( $ %
' 5 #* !" '
5 #* - # "( ) # % 3* G4"
7 - . 58 3
/ ( $ %
.' $ ' !" 5 #
& 5 #* 3* 4"
B
Private WithEvents frm As _
InteropFormDemo.InteropForm1
frm.SetCalendar 7, 2009
frm.ShowToday = False
frm.Show vbModeless
End Sub
) *
# ' - & ' ' 5 #* 9
/
6 5 #0 '5 #* - # '
# # '' ' - - 5
' "< & $ 5 #0 % 5 #* 9
" !5 #0 # % "
" $ !" ' & "
=" "( ) 5 ## % " & : # "
@" . & # !" - 7"
>" 0 5 #0 # !" ' "
/ $ %
0 !5 #0 # & "( ) # % " # %
$ D # E ' ' "
& ' / ( 0
' ' 5 #0 & & '
"( ) $ " !5 #0 # # $
' ' + & + !" " #
' $ & 7 # & ' & #
# # $ ". # - # # $ & - $ -
!" " ( ' -
$ & 7# 3 =4"
#End Region
#End Region
*+ $ %
6 # !" - 7-
5 #0 "- # ' # % " 5' ' "- # '
& $ 5 #0 " ' "
# - 5 #0 # % " 5' -
& & : # "
5' ## $ - $ $
* 3 " ' ' # % # "* # % -
' ' * # '
. $ ? < # "$- ' "
, - * . - ( $ %
' 5 #0 !" &
"( ) # % !" - 7 3* B4"
: # " $ %
/ / (
. & !" ' "6 & &
"( ) # # $ 3 @4"
) *
• 6 5 #0 !" 5 ' "
• - # - 9
o . & # # $ - ' "
o .$ ' - "
• & "( ) ' ' 5 #0 "
• 6 , $ "( ) " 0 + ,
$ "
• 6 '5 #0 "
• 6 "( ) * 8 & ; , 5' "
• 6 5 #0 !" ' , #
. $ ? # ' 3' 7 # G ' : ''
4"
1 . ' /
- ## & 7 - & "
+ '' ## ' & 9 ## $ $ -
" ' ## & & 7 ' '
' "
8 3 # * 3 " $
=
3 # " < ,$
Sub Main()
Set g_InteropToolbox = New InteropToolbox
g_InteropToolbox.Initialize
g_InteropToolbox.EventMessenger.RaiseApplicationStartedupEvent
g_InteropToolbox.EventMessenger.RaiseApplicationShutdownEvent
End Sub
, 4 " $ % )
g_InteropToolbox.EventMessenger.RaiseApplicationEvent _
"Connecting", "NorthwindDB"
g_InteropToolbox.Globals.Add "Username", "JohnD"
, 5 - . 58 # " $ %
@
End If
End Sub
, 7 - . +" #
' & 7 #
3My.InteropToolbox.EventMessenger.RaiseApplicationEvent("SEVERE_ERROR", _
"Connection Lost.")
4 & ## $
"
My.InteropToolbox.EventMessenger.RaiseApplicationEvent("SEVERE_ERROR", _
"Connection Lost.")
, 9
1 "
$ & # $ # $ ' -
- " ## - - & - &
- # 2 - ' # A
- "6 & - ' "( )
& - - - +# - 9
>
" "( ) - # & * & #
!")?) # # !" # %
> $ 3
5 # - !" $ & #
"( ) - " ' + $ !"
"
1 #
# - ## &
' - ## " $ ' 9
!" I + # 1 2 "( ) ## % +:
# ; ' 3; ' 4 : ". # + '
$ ' "
2
$ # - ## - "( ) ## % "
## 5 #* "
* # # ' # 9
!
" "( ) # ' ## "( ) * & + ="> $ I + 3 I 4"
' & + # 8 # "
& #I % "( ) -
5 #* " & $ # - & 7 '
# A 3* 4"
! '
6 + - 5 #* : #
# # # ' ' 1* "
G
& "# # ' ? $ %
' - #I % A + # -
* ) "
* ' - 1 & 5 # # +
#' ' D1 & 5 # E"
$ # - ## 5 #0 "5 ; '
: # "( ) 5 # - # ' !" #
# 1 2 # + "
* # # ' # 9
<!-- You don't need to worry about anything in this file unless you're
using registration-free COM.
There should be an appropriate <clrclass> section for every InteropUserControl
defined in the project -->
<assembly xmlns="urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0">
<assemblyIdentity
type="win32"
name="InteropUserControlDemo"
version="1.0.0.0" />
<clrClass
clsid="{9acd49fc-5e4c-4791-9961-289cc8bafee2}"
progid="InteropUserControlDemo.InteropUserControl"
threadingModel="Both"
name="InteropUserControlDemo.InteropUserControl" >
</clrClass>
</assembly>
, 8 $ 3
B
4" # ' ' !" " 7 ' +
' & $ 9 ' ' !" " 7 ' * %
' ' ' - * % 3 "
, 3
5 7 #
- $ * ' !" " 7 ' >
' "( ) - 3" 4 ' " $ - $ -
' " 7 ' - "
6 - ' !" I + # 1 2
# 3* 4"
3
$ # - ## 5 #0 "5 +:
# ## ' "( ) * & +"
* # # ' # 9
" # 1 & ?I 1 & "
; ' : " +: # ## : "
!" # "
" # $ "( ) * & + ="> I " +: &
# A "
5 <1
6 ' # % - # % 8 +% # "
' $ - # " "$-
!" " 7 ' 3 4"
Module Launcher
Sub Main()
Process.Start("Project1.exe")
End Sub
End Module
, - . +" , #
6 +: # ' - ' $ # - # % 8# #
"< + & - # ' 3* 4 + +:
& # A & # ' "
7 <1 $ #
* ' - # - ## - +: #
#' ' D +: E"
#
0 5 #* + " 7 # 7 !"
## "( ) " 6 ' ' "( ) * & + - $
## & $ # - $ $
# - "6 + ## # # '
"( ) # ' "* + ## ' # +
# - ## 8 + #"
1 # - 5 #0 ' 5 #* " ##
'' # ' ' 7 # ## !" 5
## ". 5 #0 '' ' 7- - & + -
' $ & ## ' " 5 #0 ## # #
# ' # ## - ; ' : +: "
,
D # .## & 5 #* " + E
#9 - " " $- $ G ! @
# ## & #' + " #7
D5 #* C 3 .# 4E
D 5 # 0# E
(*
#9 " " '" * 0 $- #
!" ;
#9 " '" - $- ' " #7
D< & 5E J
#9 " '" - $- --@!! !" #7
DK $ # & E
30C - - $ # & 4
#9 - " "
0# # ' . '
#9 & & & " '"
I ' .
#9 & & & "$- " ' " #7