Click here to Skip to main content
15,907,913 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: TAB key To Jump From Textbox To Another Textbox Pin
jeshra27923-Nov-09 18:02
jeshra27923-Nov-09 18:02 
GeneralRe: TAB key To Jump From Textbox To Another Textbox Pin
DaveAuld23-Nov-09 20:52
professionalDaveAuld23-Nov-09 20:52 
QuestionVB.NET Code to store database column value in a local variable Pin
she-Developer23-Nov-09 2:50
she-Developer23-Nov-09 2:50 
AnswerRe: VB.NET Code to store database column value in a local variable Pin
Johan Hakkesteegt23-Nov-09 3:26
Johan Hakkesteegt23-Nov-09 3:26 
AnswerRe: VB.NET Code to store database column value in a local variable Pin
Shameel23-Nov-09 5:03
professionalShameel23-Nov-09 5:03 
QuestionDifferences between with or without WithEvents keyword in VB.NET? Pin
Mc_Topaz22-Nov-09 22:50
Mc_Topaz22-Nov-09 22:50 
AnswerRe: Differences between with or without WithEvents keyword in VB.NET? Pin
JR21222-Nov-09 23:17
JR21222-Nov-09 23:17 
AnswerRe: Differences between with or without WithEvents keyword in VB.NET? Pin
The Man from U.N.C.L.E.23-Nov-09 2:55
The Man from U.N.C.L.E.23-Nov-09 2:55 
WithEvents has one powerful extra feature.

To use your example. Suppose you start with a variable such as
VB
Public Shared theOpcServer As OPCAutomation.OPCServer = Nothing


We also assume you have and event handler somewhere eg.
VB
Public Shared Sub OpcServerEventHandler(sender as Object, e as EventArgs)


With this code every time you assign an object to theOpcServer you need to attach and remove the Event Handlers. eg.
VB
If theOpcServer IsNot Nothing Then
	RemoveHandler theOpcServer.OpcServerEvent, AddressOf OpcServerEventHandler
End If
theOpcServer = New OPCAutomation.OPCServer()
AddHandler theOpcServer.OpcServerEvent, AddressOf OpcServerEventHandler


Alternatively use the WithEvents keyword and a Handles clause on the event handler sub.

Like this .Net does all the event handler maintenance for you without having to write armfuls of code.

If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk

GeneralRe: Differences between with or without WithEvents keyword in VB.NET? Pin
Mc_Topaz23-Nov-09 7:33
Mc_Topaz23-Nov-09 7:33 
QuestionLocking Tabs in TabControl Form. Pin
jeshra27922-Nov-09 19:32
jeshra27922-Nov-09 19:32 
AnswerRe: Locking Tabs in TabControl Form. Pin
dan!sh 22-Nov-09 19:53
professional dan!sh 22-Nov-09 19:53 
GeneralRe: Locking Tabs in TabControl Form. Pin
The Man from U.N.C.L.E.23-Nov-09 3:35
The Man from U.N.C.L.E.23-Nov-09 3:35 
GeneralRe: Locking Tabs in TabControl Form. Pin
dan!sh 23-Nov-09 4:30
professional dan!sh 23-Nov-09 4:30 
AnswerRe: Locking Tabs in TabControl Form. Pin
Shameel23-Nov-09 5:09
professionalShameel23-Nov-09 5:09 
GeneralRe: Locking Tabs in TabControl Form. Pin
The Man from U.N.C.L.E.23-Nov-09 6:14
The Man from U.N.C.L.E.23-Nov-09 6:14 
AnswerRe: Locking Tabs in TabControl Form. Pin
Shameel23-Nov-09 6:39
professionalShameel23-Nov-09 6:39 
QuestionHow do I get back "handle of" created control via CreateWindowEx ? Pin
vmars31621-Nov-09 10:17
vmars31621-Nov-09 10:17 
AnswerRe: How do I get back "handle of" created control via CreateWindowEx ? Pin
Alan N21-Nov-09 10:56
Alan N21-Nov-09 10:56 
AnswerRe: How do I get back "handle of" created control via CreateWindowEx ? Pin
Luc Pattyn21-Nov-09 23:38
sitebuilderLuc Pattyn21-Nov-09 23:38 
QuestionHow can I produce a software license number from PDA's device ID? Pin
JUNEYT21-Nov-09 4:41
JUNEYT21-Nov-09 4:41 
AnswerRe: How can I produce a software license number from PDA's device ID? Pin
DaveAuld21-Nov-09 5:44
professionalDaveAuld21-Nov-09 5:44 
GeneralRe: How can I produce a software license number from PDA's device ID? Pin
JUNEYT21-Nov-09 6:10
JUNEYT21-Nov-09 6:10 
GeneralRe: How can I produce a software license number from PDA's device ID? Pin
DaveAuld21-Nov-09 20:08
professionalDaveAuld21-Nov-09 20:08 
QuestionInsert and fill a table with high-performance [Word] Pin
cherrymotion21-Nov-09 0:00
cherrymotion21-Nov-09 0:00 
AnswerRe: Insert and fill a table with high-performance [Word] Pin
Johan Hakkesteegt21-Nov-09 1:42
Johan Hakkesteegt21-Nov-09 1:42 

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.