Click here to Skip to main content
15,893,814 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: test compile mode versus production compile mode Pin
Richard MacCutchan7-Jan-19 9:50
mveRichard MacCutchan7-Jan-19 9:50 
GeneralRe: test compile mode versus production compile mode Pin
dcof8-Jan-19 6:17
dcof8-Jan-19 6:17 
Questioncall a Sub with a dynamic type parameter. Pin
desanti2-Jan-19 11:03
desanti2-Jan-19 11:03 
AnswerRe: call a Sub with a dynamic type parameter. Pin
Richard MacCutchan2-Jan-19 22:10
mveRichard MacCutchan2-Jan-19 22:10 
GeneralRe: call a Sub with a dynamic type parameter. Pin
desanti3-Jan-19 4:35
desanti3-Jan-19 4:35 
GeneralRe: call a Sub with a dynamic type parameter. Pin
Richard MacCutchan3-Jan-19 6:33
mveRichard MacCutchan3-Jan-19 6:33 
GeneralRe: call a Sub with a dynamic type parameter. Pin
Dave Kreskowiak3-Jan-19 6:36
mveDave Kreskowiak3-Jan-19 6:36 
AnswerRe: call a Sub with a dynamic type parameter. Pin
Eddy Vluggen2-Jan-19 22:14
professionalEddy Vluggen2-Jan-19 22:14 
Easy way is to put those details in their own class, and make that new class part of type1 and type2.
VB
Public Class McBoatFace
    Property Num As Integer
    Property vl As String
End Class
Public Class Type1
    Property Boat As McBoatFace
End Class
Public Class Type2
    Property Boat As McBoatFace
End Class

Sub Marine(Boat As McBoatFace)
    ' access to Boat.Num and Boat.vl
End Sub
A less easy, but cleaner way would be implementing the McBoatface-class as an interface, and to pass the interface to the sub. Another way to make it cleaner is by putting the Boat-property into a new Type0-class, and inherit Type1 and Type2 from it; makes the property appear in both classes.
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.

GeneralRe: call a Sub with a dynamic type parameter. Pin
desanti3-Jan-19 4:35
desanti3-Jan-19 4:35 
GeneralRe: call a Sub with a dynamic type parameter. Pin
Ralf Meier17-Jan-19 0:34
mveRalf Meier17-Jan-19 0:34 
QuestionDirecotoryServices - Find all Windows 7 and Windows 10 Computers in Domain Pin
Member 1186689325-Dec-18 6:43
Member 1186689325-Dec-18 6:43 
AnswerRe: DirecotoryServices - Find all Windows 7 and Windows 10 Computers in Domain Pin
Eddy Vluggen2-Jan-19 23:02
professionalEddy Vluggen2-Jan-19 23:02 
QuestionThreading, Invoke, Delegate and MethodInvoker... Pin
Member 1111281423-Dec-18 3:03
Member 1111281423-Dec-18 3:03 
AnswerRe: Threading, Invoke, Delegate and MethodInvoker... Pin
Eddy Vluggen23-Dec-18 10:52
professionalEddy Vluggen23-Dec-18 10:52 
GeneralRe: Threading, Invoke, Delegate and MethodInvoker... Pin
Member 1111281423-Dec-18 11:09
Member 1111281423-Dec-18 11:09 
GeneralRe: Threading, Invoke, Delegate and MethodInvoker... Pin
Eddy Vluggen23-Dec-18 11:14
professionalEddy Vluggen23-Dec-18 11:14 
QuestionVB Client server with timer Pin
Member 1409761321-Dec-18 21:49
Member 1409761321-Dec-18 21:49 
AnswerRe: VB Client server with timer Pin
Richard MacCutchan21-Dec-18 22:00
mveRichard MacCutchan21-Dec-18 22:00 
GeneralRe: VB Client server with timer Pin
Member 1409761321-Dec-18 22:16
Member 1409761321-Dec-18 22:16 
AnswerRe: VB Client server with timer Pin
Dave Kreskowiak22-Dec-18 4:12
mveDave Kreskowiak22-Dec-18 4:12 
QuestionHow to get a list of installed applications and uninstall them ? Pin
Lucifer Morningstar19-Dec-18 22:59
Lucifer Morningstar19-Dec-18 22:59 
SuggestionRe: How to get a list of installed applications and uninstall them ? Pin
CHill6019-Dec-18 23:07
mveCHill6019-Dec-18 23:07 
AnswerRe: How to get a list of installed applications and uninstall them ? Pin
Richard MacCutchan19-Dec-18 23:22
mveRichard MacCutchan19-Dec-18 23:22 
AnswerRe: How to get a list of installed applications and uninstall them ? Pin
Eddy Vluggen20-Dec-18 0:39
professionalEddy Vluggen20-Dec-18 0:39 
QuestionTrying to create a search query that will bring the results searched in access database. It is bringing up an error runtime error '3075' Pin
Member 1409033914-Dec-18 22:07
Member 1409033914-Dec-18 22:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.