Click here to Skip to main content
15,886,963 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Copy selected listview item to a textbox VB.NET Pin
Eddy Vluggen3-Sep-14 7:14
professionalEddy Vluggen3-Sep-14 7:14 
QuestionRe: Copy selected listview item to a textbox VB.NET Pin
Pete_1234-Sep-14 7:01
Pete_1234-Sep-14 7:01 
AnswerRe: Copy selected listview item to a textbox VB.NET Pin
Eddy Vluggen4-Sep-14 8:15
professionalEddy Vluggen4-Sep-14 8:15 
AnswerRe: Copy selected listview item to a textbox VB.NET Pin
Tino Fourie24-Sep-14 6:49
Tino Fourie24-Sep-14 6:49 
Questionstring to byte, having trouble with line feed characters Pin
jkirkerx1-Sep-14 10:15
professionaljkirkerx1-Sep-14 10:15 
AnswerRe: string to byte, having trouble with line feed characters Pin
Dave Kreskowiak1-Sep-14 11:19
mveDave Kreskowiak1-Sep-14 11:19 
GeneralRe: string to byte, having trouble with line feed characters Pin
jkirkerx1-Sep-14 12:09
professionaljkirkerx1-Sep-14 12:09 
QuestionHow to use own collections in application settings in VB.NET? Pin
ponchofiesta31-Aug-14 21:35
ponchofiesta31-Aug-14 21:35 
I'm writing a program in VB.NET and try to save different profiles via the application settings (project settings -> settings tab).

I created a Profile class and a collection class of that. If I choose this collection as settings type, I can add multiple objects with type System.Object, but I need to add my Profile object.

How can I add a collection of my Profile objects with the settings editor? Whats wrong with my code?

Profile.vb

VB
Imports System.Configuration

<SettingsSerializeAs(Configuration.SettingsSerializeAs.Xml)> _
Public Class Profile
    Public Property Name As String
    Public Property ViewerCommand As String
    Public Property ViewerPath As String
    Public Property StartService As Boolean
    Public Property StopService As Boolean
End Class

<SettingsSerializeAs(Configuration.SettingsSerializeAs.Xml)> _
Public Class ProfileCollection
    Inherits CollectionBase

    Public Shadows Function Add(ByVal ProfileObject As Profile) As Profile
        MyBase.List.Add(ProfileObject)
        Return ProfileObject
    End Function

    Public Shadows Sub Remove(ByVal ProfileObject As Profile)
        MyBase.List.Remove(ProfileObject)
    End Sub

End Class


A screenshot of the current behavior

The type is VNC_Manager.ProfileCollection for the setting called "Profiles".

http://i.stack.imgur.com/4Oaf8.png[^]

On the right side there should be Name, ViewerCommand, ...

If I use VNC_Manager.Profile for type, I also can't see Name, ViewerCommand... So there seems to be a problem with the Profile class(?)
AnswerRe: How to use own collections in application settings in VB.NET? Pin
Eddy Vluggen1-Sep-14 0:27
professionalEddy Vluggen1-Sep-14 0:27 
Questionwav to mp3 Pin
Ali Asgar29-Aug-14 4:52
Ali Asgar29-Aug-14 4:52 
AnswerRe: wav to mp3 Pin
Dave Kreskowiak29-Aug-14 5:05
mveDave Kreskowiak29-Aug-14 5:05 
GeneralRe: wav to mp3 Pin
Tim Carmichael29-Aug-14 6:28
Tim Carmichael29-Aug-14 6:28 
QuestionRe: wav to mp3 Pin
ZurdoDev29-Aug-14 5:38
professionalZurdoDev29-Aug-14 5:38 
QuestionVB6: error- report writer does not support multidimensional hierarchy Pin
Member 1102617826-Aug-14 3:20
Member 1102617826-Aug-14 3:20 
AnswerRe: VB6: error- report writer does not support multidimensional hierarchy Pin
Chris Quinn26-Aug-14 22:12
Chris Quinn26-Aug-14 22:12 
QuestionMessage Closed Pin
25-Aug-14 1:15
Jashan12325-Aug-14 1:15 
SuggestionRe: Algorithms to Visual Basic Code Pin
Tim Carmichael25-Aug-14 1:58
Tim Carmichael25-Aug-14 1:58 
QuestionRe: Algorithms to Visual Basic Code Pin
ZurdoDev25-Aug-14 2:07
professionalZurdoDev25-Aug-14 2:07 
AnswerRe: Algorithms to Visual Basic Code Pin
Mycroft Holmes25-Aug-14 12:29
professionalMycroft Holmes25-Aug-14 12:29 
GeneralMessage Closed Pin
26-Aug-14 2:52
Jashan12326-Aug-14 2:52 
GeneralRe: Algorithms to Visual Basic Code Pin
Tim Carmichael26-Aug-14 3:05
Tim Carmichael26-Aug-14 3:05 
GeneralMessage Closed Pin
26-Aug-14 3:15
Jashan12326-Aug-14 3:15 
GeneralRe: Algorithms to Visual Basic Code Pin
Dave Kreskowiak26-Aug-14 3:17
mveDave Kreskowiak26-Aug-14 3:17 
GeneralRe: Algorithms to Visual Basic Code Pin
Jashan12326-Aug-14 3:19
Jashan12326-Aug-14 3:19 
GeneralRe: Algorithms to Visual Basic Code Pin
Dave Kreskowiak26-Aug-14 3:24
mveDave Kreskowiak26-Aug-14 3:24 

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.