Click here to Skip to main content
15,919,898 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionHow to create a SPARSE file in VB.NET Pin
WESHILL14-Feb-04 7:23
WESHILL14-Feb-04 7:23 
AnswerRe: How to create a SPARSE file in VB.NET Pin
Dave Kreskowiak14-Feb-04 9:25
mveDave Kreskowiak14-Feb-04 9:25 
GeneralRe: How to create a SPARSE file in VB.NET Pin
WESHILL14-Feb-04 9:41
WESHILL14-Feb-04 9:41 
GeneralRe: How to create a SPARSE file in VB.NET Pin
Dave Kreskowiak16-Feb-04 8:51
mveDave Kreskowiak16-Feb-04 8:51 
GeneralRe: How to create a SPARSE file in VB.NET Pin
WESHILL24-Feb-04 5:54
WESHILL24-Feb-04 5:54 
GeneralRe: How to create a SPARSE file in VB.NET Pin
WESHILL9-Mar-04 2:03
WESHILL9-Mar-04 2:03 
Questionmousehover? Pin
Nadroj14-Feb-04 6:42
Nadroj14-Feb-04 6:42 
AnswerRe: mousehover? Pin
Matthew Hazlett14-Feb-04 7:13
Matthew Hazlett14-Feb-04 7:13 
If you are using the VS.NET IDE then in the code view there are two dropdowns. Set the first dropdown to the object you want to set the event for and set the second dropdown to the event you want to hook into. It will generate the Subs for you, you just fill in the details.

-OR-

If you are not using the IDE then you can use addHandler to hook into the events.
ex. addhandler Panel1.Click, addressof clickResponse
(addrssof sets clickResponse as the callback sub)

the advantage to doing this is you can do somthing like

addhandler Panel1.Click, addressof clickResponse
addhandler Panel2.Click, addressof clickResponse
addhandler Panel3.Click, addressof clickResponse

and in clickResponse just do a sender.name to get the object that called the sub

-or (the easiest way) -

You can declare it like this:

Private Sub Panel1_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles Panel1.Click

The handles on the end specifies whats tied to this sub

you can also specify multiple events this way like so:

Private Sub Panel1_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles Panel1.Click, Panel2.Click, Panel3.Click

as you can see the name of the sub is not important using this method it could be anything you want like..

Private Sub eatAtJoes(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles Panel1.Click, Panel2.Click, Panel3.Click

GeneralRe: mousehover? Pin
Nadroj14-Feb-04 7:21
Nadroj14-Feb-04 7:21 
GeneralRe: mousehover? Pin
Matthew Hazlett14-Feb-04 7:37
Matthew Hazlett14-Feb-04 7:37 
GeneralRe: mousehover? Pin
Nadroj14-Feb-04 7:44
Nadroj14-Feb-04 7:44 
GeneralNew to VB.Net from VB6 Pin
Gaz@UK14-Feb-04 5:33
Gaz@UK14-Feb-04 5:33 
GeneralRe: New to VB.Net from VB6 Pin
Michael P Butler14-Feb-04 6:07
Michael P Butler14-Feb-04 6:07 
GeneralRe: New to VB.Net from VB6 Pin
Gaz@UK14-Feb-04 21:12
Gaz@UK14-Feb-04 21:12 
QuestionVisual Basic 6.0 Skinning?? Pin
erikkloeze14-Feb-04 3:20
erikkloeze14-Feb-04 3:20 
AnswerRe: Visual Basic 6.0 Skinning?? Pin
r i s h a b h s16-Feb-04 19:45
r i s h a b h s16-Feb-04 19:45 
GeneralRe: Visual Basic 6.0 Skinning?? Pin
erikkloeze17-Feb-04 3:22
erikkloeze17-Feb-04 3:22 
GeneralRe: Visual Basic 6.0 Skinning?? Pin
Wilbur J. Pereira18-Feb-04 7:54
Wilbur J. Pereira18-Feb-04 7:54 
GeneralVB.NET for SQL Server problem Pin
bensoncd14-Feb-04 2:56
bensoncd14-Feb-04 2:56 
GeneralRe: VB.NET for SQL Server problem Pin
Ian Darling14-Feb-04 3:36
Ian Darling14-Feb-04 3:36 
GeneralOK: VB.NET for SQL Server Pin
bensoncd16-Feb-04 11:12
bensoncd16-Feb-04 11:12 
Generaltabpage seting foucs Pin
aynka200014-Feb-04 2:49
aynka200014-Feb-04 2:49 
GeneralRe: tabpage seting foucs Pin
Matthew Hazlett14-Feb-04 4:36
Matthew Hazlett14-Feb-04 4:36 
GeneralFSO FileSystemObject Pin
djbugzy13-Feb-04 20:43
djbugzy13-Feb-04 20:43 
GeneralRe: FSO FileSystemObject Pin
Hesham Amin13-Feb-04 22:57
Hesham Amin13-Feb-04 22:57 

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.