library_vb » Revisions »
Differences
This shows you the differences between the selected revisions of the page.
2017-01-12 | 2017-06-25 | ||
event_handlers explicit anchor (martin) | updating link (martin) (hidden) | ||
Line 22: | Line 22: | ||
* Implement your interactions with WinSCP .NET assembly in a class module; | * Implement your interactions with WinSCP .NET assembly in a class module; | ||
* Declare private variable in your class module referring to ''[[library_session|Session]]'' class; | * Declare private variable in your class module referring to ''[[library_session|Session]]'' class; | ||
- | * Use ''[[msdn>gg251653|WithEvents]]'' keyword, when declaring the private variable; | + | * Use ''[[https://msdn.microsoft.com/VBA/Language-Reference-VBA/articles/on-error-statement|WithEvents]]'' keyword, when declaring the private variable; |
* Define private function (method) with name ''<variablename>_<event>'' and two arguments (e.g. ''sender'' and ''e'') for every event you need to handle. | * Define private function (method) with name ''<variablename>_<event>'' and two arguments (e.g. ''sender'' and ''e'') for every event you need to handle. | ||