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

.NET (Core and Framework)

 
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 
AnswerRe: Class Problem Pin
Luc Pattyn16-Aug-09 14:52
sitebuilderLuc Pattyn16-Aug-09 14:52 
Hi,

in your code
[1] Public Class myButton

[2]     Public Sub New()
[3]         Dim newButton As New Windows.Forms.Button
[4]         Form1.Controls.Add(newButton)
[5]     End Sub

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

[10] End Class


Class myButton represents a button, i.e. ONE button, however I see two declarations: lines [3] and [6].
The "Handles newButton.Click" in [7] refers to the newButton in [6] which is and remains Nothing.
The New Button in [3] ends up in the local variable newButton, which you add to the Form, but which is unrelated to the one in [6].

The solution should be obvious.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.

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 
Questionhelp with .net clr hosting error Pin
foxymop14-Aug-09 8:54
foxymop14-Aug-09 8:54 

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.