Click here to Skip to main content
15,928,281 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Permutations in Excel's Visual Basic Pin
tanstaafl2824-Jun-04 9:21
tanstaafl2824-Jun-04 9:21 
GeneralSave the value of a control Pin
Brad Fackrell23-Jun-04 10:53
Brad Fackrell23-Jun-04 10:53 
GeneralRe: Save the value of a control Pin
sivilian24-Jun-04 5:13
sivilian24-Jun-04 5:13 
GeneralVBA/Excel - Execute macro if comment inserted Pin
Jon G23-Jun-04 5:37
Jon G23-Jun-04 5:37 
GeneralRe: VBA/Excel - Execute macro if comment inserted Pin
Jon G23-Jun-04 6:33
Jon G23-Jun-04 6:33 
GeneralRe: VBA/Excel - Execute macro if comment inserted Pin
Mike Ellison23-Jun-04 6:56
Mike Ellison23-Jun-04 6:56 
GeneralNew Problem Pin
MarcMicalizzi23-Jun-04 5:08
MarcMicalizzi23-Jun-04 5:08 
GeneralRe: New Problem Pin
Dave Kreskowiak23-Jun-04 5:50
mveDave Kreskowiak23-Jun-04 5:50 
Currently, VB.NET doesn't support Operator Overloading (support for this will show up in VB.NET 2005!) So, you'll have to write a method into your class that takes an instance of itself as a parameter and returns a True or False value based on the result of the combined comparisons of all the properties involved:
Public Class PtBounds
    Public Left As Integer
    Public Right As Integer
    Public Top As Integer
    Public Bottom As Integer
    Public Width As Integer
    Public Height As Integer
    Public hoffset As Integer
    Public woffset As Integer

    Public Function op_Compare(ByRef operand As PtBounds) As Boolean
        Return (Me.Left = operand.Left) And _
               (Me.Right = operand.Right) And _
               (Me.Top = operand.Top) And _
               (Me.Bottom = operand.Bottom) And _
               (Me.Width = operand.Width) And _
               (Me.Height = operand.Height) And _
               (Me.hOffset = operand.hOffset) And _
               (Me.wOffset = operand.wOffset)
    End Function
End Class
<code>Me</code> refers to the current instance of the class, while <code>operand</code> refers to the instance that is passed to the method:
<pre>    Dim myObject1 As New PtBounds
    Dim myObject2 As New PtBounds
    '  Setup both objects with appropriate values...
    If myObject1.op_Compare(myObject2) Then
        '  Both objects are equal!
    Else
        '  The objects are not equal!
    End If



RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

GeneralRe: New Problem Pin
Steven Campbell23-Jun-04 7:27
Steven Campbell23-Jun-04 7:27 
GeneralRe: New Problem Pin
Dave Kreskowiak23-Jun-04 8:37
mveDave Kreskowiak23-Jun-04 8:37 
GeneralDrag and drop between 2 listboxes Pin
Member 62023523-Jun-04 3:26
Member 62023523-Jun-04 3:26 
GeneralDrag and drop between 2 listboxes Pin
Member 62023523-Jun-04 3:26
Member 62023523-Jun-04 3:26 
Generalinterfacing scanner Pin
Saud AKhter22-Jun-04 23:37
Saud AKhter22-Jun-04 23:37 
GeneralRe: interfacing scanner Pin
Dave Kreskowiak23-Jun-04 3:36
mveDave Kreskowiak23-Jun-04 3:36 
GeneralVB6 to .Net User Controls Pin
mckly22-Jun-04 22:09
mckly22-Jun-04 22:09 
GeneralRe: VB6 to .Net User Controls Pin
Dave Kreskowiak23-Jun-04 3:30
mveDave Kreskowiak23-Jun-04 3:30 
GeneralFiles per folder in Windows 2000 Pin
steff kamush22-Jun-04 20:07
steff kamush22-Jun-04 20:07 
GeneralRe: Files per folder in Windows 2000 Pin
Dave Kreskowiak23-Jun-04 3:19
mveDave Kreskowiak23-Jun-04 3:19 
GeneralControl Arrays Pin
TimKiwi22-Jun-04 18:44
TimKiwi22-Jun-04 18:44 
GeneralRe: Control Arrays Pin
Dave Kreskowiak23-Jun-04 3:08
mveDave Kreskowiak23-Jun-04 3:08 
GeneralRe: Control Arrays Pin
TimKiwi23-Jun-04 16:11
TimKiwi23-Jun-04 16:11 
GeneralRe: Control Arrays Pin
Dave Kreskowiak24-Jun-04 4:57
mveDave Kreskowiak24-Jun-04 4:57 
Generalerror in sending mail Pin
Anonymous22-Jun-04 18:31
Anonymous22-Jun-04 18:31 
GeneralRe: error in sending mail Pin
Dave Kreskowiak23-Jun-04 2:59
mveDave Kreskowiak23-Jun-04 2:59 
Generalsend mail Pin
sondos22-Jun-04 18:07
sondos22-Jun-04 18:07 

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.