Tools, FAQ, Tutorials:
"MyLibApp.vb" - Call VB Class from Library
How to call a function from a VB class provided in a library?
✍: FYIcenter.com
If you want to call a function from a VB class provided in a library,
you can follow this tutorial:
1. Reference the shared function with the class name prefix:
MyLib.PrintHello();
2. See the following full source code example, MyLibApp.vb:
' MyLibApp.vb ' Copyright (c) FYIcenter.com Module MyLibApp Sub Main() MyLib.PrintHello() End Sub End Module
3. Compile the code with the "vbc /reference" command:
>vbc /reference:MyLib.dll MyLibApp.vb Microsoft (R) Visual Basic Compiler version 2.2.0.61624 Copyright (C) Microsoft Corporation. All rights reserved. >dir MyLibApp.* 09:55 AM 6,656 MyLibApp.exe 09:53 AM 134 MyLibApp.vb
4. Run the executable code:
C:\fyicenter>MyLibApp.exe Hello world! - From MyLib
2017-08-13, 1097👍, 0💬
Popular Posts:
How to build a test service operation to dump everything from the "context.Request" object in the re...
How To Read Data from Keyboard (Standard Input) in PHP? If you want to read data from the standard i...
How to add images to my EPUB books Images can be added into book content using the XHTML "img" eleme...
How to see more EPUB 2.0 metadata list with Calibre? You can follow this tutorial to view EPUB 2.0 m...
How to add an API to an API product for internal testing on the Publisher Portal of an Azure API Man...