Click here to Skip to main content
15,890,438 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionDot Net Installer Pin
Ageesh17-Aug-09 0:44
Ageesh17-Aug-09 0:44 
AnswerRe: Dot Net Installer Pin
Adam R Harris17-Aug-09 11:44
Adam R Harris17-Aug-09 11:44 
QuestionImporting Dll Problem Pin
shaina223116-Aug-09 17:42
shaina223116-Aug-09 17:42 
AnswerRe: Importing Dll Problem Pin
Adam Maras16-Aug-09 18:09
Adam Maras16-Aug-09 18:09 
AnswerRe: Importing Dll Problem Pin
Pete O'Hanlon16-Aug-09 22:48
mvePete O'Hanlon16-Aug-09 22:48 
AnswerRe: Importing Dll Problem Pin
Luc Pattyn17-Aug-09 0:16
sitebuilderLuc Pattyn17-Aug-09 0:16 
GeneralRe: Importing Dll Problem Pin
Adam Maras17-Aug-09 10:12
Adam Maras17-Aug-09 10:12 
QuestionClass Problem Pin
JEFFERY!16-Aug-09 13:27
JEFFERY!16-Aug-09 13:27 
Hello!

I am writing a button generator application in where you type in a number within a text box and click the generate button in where it will randomly create buttons in different locations within the application.

I am also trying to make it so that an action is performed when i click these buttons, but i cant figure out how to do it. Here is my code so far.

FORM CODE:
Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim newInstance As New myButton
    End Sub

End Class





BUTTON CODE:
Public Class myButton

    Public Sub New()
        Dim newButton As New Windows.Forms.Button
        Form1.Controls.Add(newButton)
    End Sub

    Friend WithEvents newButton As Windows.Forms.Button
    Public Sub mouseHover(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles newButton.Click
        MsgBox("hi")
    End Sub

End Class





As you can see from the code, it should show a message box when each instance of a button gets clicked, but its not working. I'm not sure if im doing this the right way or not, can someone please help me with this because i cannot find anything on the internet about it.

Thankyou.
AnswerRe: Class Problem Pin
Luc Pattyn16-Aug-09 14:52
sitebuilderLuc Pattyn16-Aug-09 14:52 
GeneralRe: Class Problem Pin
JEFFERY!16-Aug-09 15:01
JEFFERY!16-Aug-09 15:01 
GeneralRe: Class Problem Pin
Luc Pattyn16-Aug-09 15:02
sitebuilderLuc Pattyn16-Aug-09 15:02 
QuestionUnwanted and junk file cleaner Pin
agyzone@gmail.com16-Aug-09 5:26
agyzone@gmail.com16-Aug-09 5:26 
AnswerRe: Unwanted and junk file cleaner Pin
Not Active16-Aug-09 5:33
mentorNot Active16-Aug-09 5:33 
AnswerRe: Unwanted and junk file cleaner Pin
Luc Pattyn16-Aug-09 9:08
sitebuilderLuc Pattyn16-Aug-09 9:08 
GeneralRe: Unwanted and junk file cleaner Pin
Pete O'Hanlon16-Aug-09 9:44
mvePete O'Hanlon16-Aug-09 9:44 
GeneralRe: Unwanted and junk file cleaner Pin
Luc Pattyn16-Aug-09 10:22
sitebuilderLuc Pattyn16-Aug-09 10:22 
GeneralRe: Unwanted and junk file cleaner Pin
Pete O'Hanlon16-Aug-09 10:27
mvePete O'Hanlon16-Aug-09 10:27 
QuestionJoin math variables Pin
pimb215-Aug-09 7:14
pimb215-Aug-09 7:14 
AnswerRe: Join math variables Pin
0x3c015-Aug-09 7:33
0x3c015-Aug-09 7:33 
GeneralRe: Join math variables Pin
pimb215-Aug-09 8:02
pimb215-Aug-09 8:02 
GeneralRe: Join math variables Pin
0x3c015-Aug-09 9:08
0x3c015-Aug-09 9:08 
GeneralRe: Join math variables Pin
pimb215-Aug-09 9:11
pimb215-Aug-09 9:11 
QuestionHelp with NotifyIcon on Windows 7 Pin
Soumya9215-Aug-09 3:11
Soumya9215-Aug-09 3:11 
AnswerRe: Help with NotifyIcon on Windows 7 Pin
Adam Maras15-Aug-09 7:29
Adam Maras15-Aug-09 7:29 
GeneralRe: Help with NotifyIcon on Windows 7 Pin
Soumya9217-Aug-09 1:43
Soumya9217-Aug-09 1:43 

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.