Make a DLL in Visual Basic 2008 Express Edition
Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
So, Can you use a DLL in visual basic like drag and drop it in the toolbar?
and if you can, can you make it to where it would be a button that displays a message box? (Example)
and if you can, can you make it to where it would be a button that displays a message box? (Example)
yes it would be easy
-make a new project
-make a new class
-under the first line (Class class1 or something), put
-put the code you want(msgbox)
-make a new project
-make a new class
-under the first line (Class class1 or something), put
Code: Select all
-go to button_click event of your classInherits Button
-put the code you want(msgbox)
OR you can do this:
Code: Select all
Public Class btn
Inherits Button
Public Sub New()
Me.Size = New Size(123, 89)
End Sub
Protected Overrides Sub OnMouseClick(ByVal e As System.Windows.Forms.MouseEventArgs)
MyBase.OnMouseClick(e)
MsgBox("Clicked!")
End Sub
End Class
Agust1337 wrote:OR you can do this:thats what I explained
Code: Select allPublic Class btn Inherits Button Public Sub New() Me.Size = New Size(123, 89) End Sub Protected Overrides Sub OnMouseClick(ByVal e As System.Windows.Forms.MouseEventArgs) MyBase.OnMouseClick(e) MsgBox("Clicked!") End Sub End Class
Making it simple for him if he didn't understand
Someone here knows how i can Add a Event in a DLL like this
i wonna call it (IsPlaying) and i wonna use it like this
If DLL.IsPlaying = True then
something here...
End If
???!
How to do such Event ?!
i wonna call it (IsPlaying) and i wonna use it like this
If DLL.IsPlaying = True then
something here...
End If
???!
How to do such Event ?!
I hate events they require too much work(in VB that may be easier but in C# its damn hard)
I wonna have it in VB.NET Language
Events are simple to use in both VB.Net and C#.
In VB.Net you could do it this way:
In VB.Net you could do it this way:
Code: Select all
Event event_test(ByVal test As String)
Sub test(ByVal input As String)
MsgBox(input)
End Sub
Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
AddHandler event_test, AddressOf test
'Note: you may add as many handlers as you want.
End Sub
Private Sub btnRaise_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRaise.Click
RaiseEvent event_test("testing")
End Sub
Copyright Information
Copyright © Codenstuff.com 2020 - 2023