Click here to Skip to main content
16,005,141 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: data gride question Pin
Rupesh Kumar Swami27-Jun-07 21:46
Rupesh Kumar Swami27-Jun-07 21:46 
Questionhow to use VSprinter????? Pin
ShuklaGirish27-Jun-07 0:34
ShuklaGirish27-Jun-07 0:34 
Questionimage from server to image box ? Pin
porsti27-Jun-07 0:28
porsti27-Jun-07 0:28 
AnswerRe: image from server to image box ? Pin
Dave Kreskowiak27-Jun-07 5:02
mveDave Kreskowiak27-Jun-07 5:02 
QuestionTyped Dataset Pin
ShuklaGirish26-Jun-07 23:36
ShuklaGirish26-Jun-07 23:36 
Questionbutton and combobox in a Component Pin
anujose26-Jun-07 23:13
anujose26-Jun-07 23:13 
AnswerRe: button and combobox in a Component Pin
Tamimi - Code26-Jun-07 23:36
Tamimi - Code26-Jun-07 23:36 
GeneralRe: button and combobox in a Component Pin
anujose26-Jun-07 23:39
anujose26-Jun-07 23:39 
GeneralRe: button and combobox in a Component Pin
Tamimi - Code26-Jun-07 23:51
Tamimi - Code26-Jun-07 23:51 
AnswerRe: button and combobox in a Component Pin
Craster26-Jun-07 23:47
Craster26-Jun-07 23:47 
AnswerRe: button and combobox in a Component Pin
Dave Kreskowiak27-Jun-07 3:50
mveDave Kreskowiak27-Jun-07 3:50 
QuestionThere must be a better way to enter lots of strongly typed properties in a class Pin
MartyK200726-Jun-07 22:41
MartyK200726-Jun-07 22:41 
AnswerRe: There must be a better way to enter lots of strongly typed properties in a class Pin
MohammadAmiry27-Jun-07 0:41
MohammadAmiry27-Jun-07 0:41 
GeneralRe: There must be a better way to enter lots of strongly typed properties in a class Pin
MartyK200727-Jun-07 1:06
MartyK200727-Jun-07 1:06 
GeneralRe: There must be a better way to enter lots of strongly typed properties in a class Pin
Taylor Kobani27-Jun-07 1:55
Taylor Kobani27-Jun-07 1:55 
GeneralRe: There must be a better way to enter lots of strongly typed properties in a class Pin
MartyK200727-Jun-07 2:04
MartyK200727-Jun-07 2:04 
GeneralRe: There must be a better way to enter lots of strongly typed properties in a class Pin
Dave Kreskowiak27-Jun-07 3:49
mveDave Kreskowiak27-Jun-07 3:49 
GeneralRe: There must be a better way to enter lots of strongly typed properties in a class Pin
MartyK200727-Jun-07 3:53
MartyK200727-Jun-07 3:53 
GeneralRe: There must be a better way to enter lots of strongly typed properties in a class Pin
Dave Kreskowiak27-Jun-07 4:10
mveDave Kreskowiak27-Jun-07 4:10 
GeneralRe: There must be a better way to enter lots of strongly typed properties in a class Pin
MartyK200727-Jun-07 4:31
MartyK200727-Jun-07 4:31 
GeneralRe: There must be a better way to enter lots of strongly typed properties in a class Pin
Dave Kreskowiak27-Jun-07 5:01
mveDave Kreskowiak27-Jun-07 5:01 
GeneralRe: There must be a better way to enter lots of strongly typed properties in a class [modified] Pin
Taylor Kobani27-Jun-07 6:46
Taylor Kobani27-Jun-07 6:46 
Write another program that gets the name of the properties ,adds them to a list and finally makes the code for you to add to your class.


The function below may help you

Function Generate(ByVal mc As Collection) As String
        Dim str As String
        For i As Integer = 1 To mc.Count

            str &= "Public Property " & mc(i) & "() As String" * vbCrLf & _
"Get" & vbCrLf & "Return MyDataCol(""" & mc(i) & """)" & vbCrLf & _
"End Get" & vbCrLf & "Set(ByVal value As String)" & vbCrLf & _
"MyDataCol.Remove(""" & mc(i) & """)" & vbCrLf & "MyDataCol.Add(value, """ & mc(i) & """)" & _
vbCrLf & "End Set" & vbCrLf & "End Property" & vbCrLf
        Next

        Return str
    End Function


where mc is a collection of property names



A.E.K

GeneralRe: There must be a better way to enter lots of strongly typed properties in a class Pin
Dave Kreskowiak27-Jun-07 7:09
mveDave Kreskowiak27-Jun-07 7:09 
GeneralRe: There must be a better way to enter lots of strongly typed properties in a class Pin
MartyK200727-Jun-07 21:11
MartyK200727-Jun-07 21:11 
GeneralRe: There must be a better way to enter lots of strongly typed properties in a class Pin
Dave Kreskowiak28-Jun-07 2:40
mveDave Kreskowiak28-Jun-07 2:40 

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.