Click here to Skip to main content
15,910,130 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionpaint event problem? Pin
.NetRams13-Feb-07 1:06
.NetRams13-Feb-07 1:06 
AnswerRe: paint event problem? Pin
Dave Kreskowiak13-Feb-07 4:05
mveDave Kreskowiak13-Feb-07 4:05 
GeneralRe: paint event problem? Pin
.NetRams13-Feb-07 19:17
.NetRams13-Feb-07 19:17 
GeneralRe: paint event problem? Pin
Dave Kreskowiak15-Feb-07 4:19
mveDave Kreskowiak15-Feb-07 4:19 
AnswerRe: paint event problem? Pin
Navneet Hegde14-Feb-07 2:54
Navneet Hegde14-Feb-07 2:54 
QuestionCreating enum at runtime and showing it on a property grid Pin
THEMYTH12-Feb-07 23:30
THEMYTH12-Feb-07 23:30 
AnswerRe: Creating enum at runtime and showing it on a property grid Pin
Dave Kreskowiak13-Feb-07 4:02
mveDave Kreskowiak13-Feb-07 4:02 
AnswerRe: Creating enum at runtime and showing it on a property grid Pin
TwoFaced13-Feb-07 9:20
TwoFaced13-Feb-07 9:20 
I think the problem is that your property returns a general object. Take this code for example. You'll see that the property works fine when I specifically declare it as my enumerator. However, things don't work as well if I make a simple change of declaring the property as an object. I'm not sure how to accomplish what you want but I do know this is why your having a problem.
'Requires a propertygrid
Public Class Form1
    Dim test As New TestEnum

    Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        PropertyGrid1.SelectedObject = test
    End Sub
End Class

Public Class TestEnum
    Dim _TestMyEnum As MyEnum

    'This works just fine because we have declared the property as MyEnum
    Public Property TestMyEnum() As MyEnum
        Get
            Return _TestMyEnum
        End Get
        Set(ByVal value As MyEnum)
            _TestMyEnum = value
        End Set
    End Property

    'This returns the exact same enumerator but has been declared as a general object
    'The same problem occurs here as you are seeing in your code
    Public Property TestMyEnumObject() As Object
        Get
            Return _TestMyEnum
        End Get
        Set(ByVal value As Object)
            _TestMyEnum = value
        End Set
    End Property

    Public Enum MyEnum
        Test0
        Test1
        Test2
    End Enum
End Class

QuestionHow to programmatically set Admin privilege for exe (Vista) Pin
sp_ranjan12-Feb-07 22:42
sp_ranjan12-Feb-07 22:42 
AnswerRe: How to programmatically set Admin privilege for exe (Vista) Pin
Colin Angus Mackay13-Feb-07 1:46
Colin Angus Mackay13-Feb-07 1:46 
GeneralRe: How to programmatically set Admin privilege for exe (Vista) Pin
sp_ranjan13-Feb-07 2:25
sp_ranjan13-Feb-07 2:25 
GeneralRe: How to programmatically set Admin privilege for exe (Vista) Pin
Dave Kreskowiak13-Feb-07 2:37
mveDave Kreskowiak13-Feb-07 2:37 
GeneralRe: How to programmatically set Admin privilege for exe (Vista) Pin
sp_ranjan13-Feb-07 2:52
sp_ranjan13-Feb-07 2:52 
GeneralRe: How to programmatically set Admin privilege for exe (Vista) Pin
Dave Kreskowiak13-Feb-07 3:58
mveDave Kreskowiak13-Feb-07 3:58 
GeneralRe: How to programmatically set Admin privilege for exe (Vista) Pin
Colin Angus Mackay13-Feb-07 4:25
Colin Angus Mackay13-Feb-07 4:25 
Questioni need to show the result in COmmand prompt...but i am using Windows Application please help me Pin
pashitech12-Feb-07 19:45
pashitech12-Feb-07 19:45 
AnswerRe: i need to show the result in COmmand prompt...but i am using Windows Application please help me Pin
Christian Graus12-Feb-07 19:47
protectorChristian Graus12-Feb-07 19:47 
GeneralRe: i need to show the result in COmmand prompt...but i am using Windows Application please help me Pin
pashitech12-Feb-07 19:53
pashitech12-Feb-07 19:53 
GeneralRe: i need to show the result in COmmand prompt...but i am using Windows Application please help me Pin
M-Hall12-Feb-07 20:13
M-Hall12-Feb-07 20:13 
GeneralRe: i need to show the result in COmmand prompt...but i am using Windows Application please help me Pin
Christian Graus12-Feb-07 23:49
protectorChristian Graus12-Feb-07 23:49 
QuestionWrit Text File Pin
nawalage12-Feb-07 18:35
nawalage12-Feb-07 18:35 
AnswerRe: Writ Text File Pin
Christian Graus12-Feb-07 18:57
protectorChristian Graus12-Feb-07 18:57 
GeneralRe: Writ Text File Pin
nawalage12-Feb-07 19:37
nawalage12-Feb-07 19:37 
GeneralRe: Writ Text File Pin
Christian Graus12-Feb-07 19:46
protectorChristian Graus12-Feb-07 19:46 
AnswerRe: Writ Text File Pin
M-Hall12-Feb-07 19:30
M-Hall12-Feb-07 19:30 

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.