Click here to Skip to main content
16,006,013 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Generalwww.DNNCS.com for sale Pin
Anonymous2-Mar-04 0:04
Anonymous2-Mar-04 0:04 
GeneralNokia Infrared (8210 ,8310) or Siemens Pin
CamboMedia1-Mar-04 17:54
CamboMedia1-Mar-04 17:54 
General(nulls) display problem in datagrid new row Pin
Danny van der Walt1-Mar-04 9:34
Danny van der Walt1-Mar-04 9:34 
GeneralRe: (nulls) display problem in datagrid new row Pin
gpa20001-Mar-04 20:03
gpa20001-Mar-04 20:03 
GeneralContext Menu Pin
KEITHSTER1-Mar-04 7:57
KEITHSTER1-Mar-04 7:57 
GeneralRe: Context Menu Pin
yangchengmin1-Mar-04 18:43
yangchengmin1-Mar-04 18:43 
Generalabsolute memory access Pin
Allan P. Krings1-Mar-04 4:08
Allan P. Krings1-Mar-04 4:08 
Generalcan't modify property in property window Pin
scott987uk1-Mar-04 3:24
scott987uk1-Mar-04 3:24 
iv created a UserControl with in it iv made a Property with a get and set. If i create it with a return type and input type of an Integer i can modify the property from the property window . . however this is a problem becuase the value that could be inputed could be eather a string or an integer.

Thefore i made it so that the value to be input and returned would be an object. Hoever when i came to look at the property window i was unable to change the value becuase it is now an object i assume. is there any way around this plz, apart from creating 2 propertys. the code below is what iv done.

Thanks for any help that any one can give

Scott

<br />
<br />
    Public Property NumberToDisplay() As Object<br />
<br />
        Set(ByVal Number As Object)<br />
<br />
            If TypeOf Number Is Integer Then<br />
<br />
                If (Number < 0) Or (Number > 9) Then<br />
<br />
                    sErrormessage = "Recived number out side of range of 0 to 9"<br />
                    RaiseEvent ErrorOccourd(sErrormessage)<br />
<br />
                Else<br />
<br />
                    iNumberToBeDisplayed = Number<br />
                    Me.Invalidate()<br />
<br />
                End If<br />
<br />
            ElseIf TypeOf Number Is String Then<br />
<br />
                'if Number can not be converted to a string an error will occour<br />
                'e.g. inputing a "."<br />
                Try<br />
<br />
                    Dim iNumber As Integer<br />
                    iNumber = Int32.Parse(Number)<br />
<br />
                    If (iNumber < 0) Or (iNumber > 9) Then<br />
<br />
                        sErrormessage = "Recived number out side of range of 0 to 9"<br />
                        RaiseEvent ErrorOccourd(sErrormessage)<br />
<br />
                    Else<br />
<br />
                        iNumberToBeDisplayed = iNumber<br />
                        Me.Invalidate()<br />
<br />
                    End If<br />
<br />
                Catch ex As Exception<br />
<br />
                    sErrormessage = "The input value from the string could not be converted to a number"<br />
                    RaiseEvent ErrorOccourd(sErrormessage)<br />
<br />
                End Try<br />
<br />
            End If<br />
<br />
<br />
<br />
        End Set<br />
<br />
        Get<br />
            Return iNumberToBeDisplayed<br />
        End Get<br />
<br />
    End Property<br />

GeneralRe: can't modify property in property window Pin
Dave Kreskowiak1-Mar-04 6:28
mveDave Kreskowiak1-Mar-04 6:28 
GeneralHelp Document Pin
Manimee1-Mar-04 0:37
Manimee1-Mar-04 0:37 
QuestionHow can I capture the New Mail Event Handle? Pin
KiranGrover29-Feb-04 23:51
KiranGrover29-Feb-04 23:51 
AnswerRe: How can I capture the New Mail Event Handle? Pin
bhartik2-Mar-04 18:53
bhartik2-Mar-04 18:53 
GeneralRe: How can I capture the New Mail Event Handle? Pin
bhartik9-Mar-04 22:15
bhartik9-Mar-04 22:15 
GeneralHelp me in generating data reports Pin
DurgaGaneshKalam29-Feb-04 23:33
DurgaGaneshKalam29-Feb-04 23:33 
GeneralRe: Help me in generating data reports Pin
BlackDice4-Mar-04 9:58
BlackDice4-Mar-04 9:58 
GeneralYour suggestion Pin
len_ems29-Feb-04 20:24
len_ems29-Feb-04 20:24 
Generalover/under flow question Pin
justmeTW29-Feb-04 20:14
justmeTW29-Feb-04 20:14 
GeneralRe: over/under flow question Pin
apferreira1-Mar-04 14:36
apferreira1-Mar-04 14:36 
GeneralRe: over/under flow question Pin
justmeTW1-Mar-04 18:37
justmeTW1-Mar-04 18:37 
GeneralRe: over/under flow question Pin
apferreira2-Mar-04 2:24
apferreira2-Mar-04 2:24 
GeneralHelp with a simple VB project Pin
yessi29-Feb-04 9:52
yessi29-Feb-04 9:52 
GeneralRe: Help with a simple VB project Pin
Nadroj29-Feb-04 11:42
Nadroj29-Feb-04 11:42 
QuestionCreating &quot;Hot Spots&quot; on an image.. ? Pin
coopsqc29-Feb-04 8:53
coopsqc29-Feb-04 8:53 
AnswerRe: Creating &quot;Hot Spots&quot; on an image.. ? Pin
Dave Kreskowiak29-Feb-04 11:03
mveDave Kreskowiak29-Feb-04 11:03 
GeneralRe: Creating &quot;Hot Spots&quot; on an image.. ? Pin
coopsqc29-Feb-04 23:33
coopsqc29-Feb-04 23:33 

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.