Solved

Dll Function is not appearing in vb 2015 project

Posted on 2016-09-08
2
30 Views
Last Modified: 2016-09-08
Using VS 2015 on Server 2012 R2

---------------------------------------------
DLL Code is

Public Class SalDll
    Class SubClass1
        Function AddingNumbers(ByVal Number1 As Integer, ByVal Number2 As Integer)
            Return (Number1 + Number2)
        End Function
    End Class
End Class

---------------------------------------------
Project Code is

Imports Test1.SalDll
Public Class Form1
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        SubClass1.(the problem is here)
    End Sub
End Class

---------------------------------------------
The problem is
By typing (Imports Test1.) then (SalDll) appears and I can select
By typing (SubClass1.) then (AddingNumbers) is not appearing

Any Idea
0
Comment
Question by:saljas
2 Comments
 
LVL 50

Accepted Solution

by:
Ryan Chong earned 500 total points
ID: 41789191
for your DLL Code function, try add Shared in front of your function:

Shared Function AddingNumbers(ByVal Number1 As Integer, ByVal Number2 As Integer)
0
 

Author Closing Comment

by:saljas
ID: 41789205
Very good        Many thanks it works with shared
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question