"MyLibApp.vb" - Call VB Class from Library
How to call a function from a VB class provided in a library?
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:
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 220.127.116.11624 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, 387👍, 0💬
How To Loop through an Array without Using "foreach" in PHP? PHP offers the following functions to a...
How To Sort an Array by Keys in PHP? Sorting an array by keys can be done by using the ksort() funct...
How To Find a Specific Value in an Array in PHP? There are two functions can be used to test if a va...
How To Create a Directory in PHP? You can use the mkdir() function to create a directory. Here is a ...
How To Upload Files into Database in PHP? To store uploaded files to MySQL database, you can use the...