Click here to Skip to main content
15,897,518 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Iterate through Array Pin
Larry White12-Feb-07 4:33
Larry White12-Feb-07 4:33 
AnswerRe: Iterate through Array Pin
Guffa12-Feb-07 4:57
Guffa12-Feb-07 4:57 
GeneralRe: Iterate through Array Pin
Larry White12-Feb-07 5:21
Larry White12-Feb-07 5:21 
AnswerRe: Iterate through Array Pin
Guffa13-Feb-07 11:34
Guffa13-Feb-07 11:34 
GeneralRe: Iterate through Array Pin
Larry White15-Feb-07 4:29
Larry White15-Feb-07 4:29 
QuestionXML Serialisation Pin
Sebastian T Xavier9-Feb-07 6:45
Sebastian T Xavier9-Feb-07 6:45 
AnswerRe: XML Serialisation Pin
TwoFaced9-Feb-07 17:26
TwoFaced9-Feb-07 17:26 
GeneralRe: XML Serialisation Pin
Sebastian T Xavier11-Feb-07 23:26
Sebastian T Xavier11-Feb-07 23:26 
Thank you so much Friend!!!

It is working well with the changes you have suggested.

I also have made the following changes:


<br />
<br />
'Class Definition<br />
<br />
<Serializable() , Xml.Serialization.XmlInclude(GetType(Photos))> _<br />
Public Class SitePhotos<br />
    Private _Outdoordesc As String<br />
    Public Property Outdoordesc() As String<br />
        Get<br />
            Return _Outdoordesc<br />
        End Get<br />
        Set(ByVal value As String)<br />
            _Outdoordesc = value<br />
        End Set<br />
    End Property<br />
<br />
    Private _ShelterEntrance As String<br />
    Public Property ShelterEntrance() As String<br />
        Get<br />
            Return _ShelterEntrance<br />
        End Get<br />
        Set(ByVal value As String)<br />
            _ShelterEntrance = value<br />
        End Set<br />
    End Property<br />
    <br />
'Arraylist to store photo descriptions<br />
<br />
    Public PhotoList As New System.Collections.ArrayList<br />
<br />
    Public Sub AddPhoto(ByVal photoObj As Photos)<br />
        PhotoList.Add(photoObj)<br />
    End Sub<br />
<br />
    Public Sub RemovePhoto(ByVal range As String)<br />
        Dim _pht As Photos<br />
        'Dim i As Integer<br />
<br />
<br />
        For Each _pht In _PhotoList<br />
<br />
            If _pht.posRange = range Then<br />
                PhotoList.RemoveAt(PhotoList.IndexOf(_pht))<br />
            End If<br />
<br />
        Next<br />
<br />
    End Sub<br />
<br />
   <br />
End Class<br />
<br />
'Structure of each photo description<br />
Public Structure Photos<br />
    Public Pos As Integer<br />
    Public Desc As String<br />
    Public posRange As String<br />
End Structure<br />
<br />
<br />
<br />
'Code for serialization<br />
<br />
        Dim extraTypes(0) As Type<br />
<br />
        extraTypes(0) = GetType(SitePhotos)<br />
<br />
        Dim xSerializer As XmlSerializer = New<br />
XmlSerializer(GetType(GeneralSiteInfo.SitePhotos), extraTypes)<br />
       <br />
        Dim xWriter As StringWriter = New StringWriter()<br />
      <br />
        ' Since the serialization can exception, we'll encase it in a try/catch<br />
        ' mechanism, so we can report the error properly<br />
<br />
        Try<br />
            xSerializer.Serialize(xWriter, objPhotos)<br />
<br />
  'xmlSitePhotos is a hidden control to which i can store value. <br />
<br />
            _xmlSitePhotos.Value = xWriter.ToString()<br />
<br />
        Catch ex As Exception<br />
<br />
            MsgBox(ex.ToString())<br />
            'MsgBox("Could not serialize Site Photos", MsgBoxStyle.Critical, "Error<br />
Saving Site Photos")<br />
<br />
        End Try<br />
<br />
        xWriter.Close()<br />
<br />
<br />

Questionopen sound file button Pin
comicsuperfan19-Feb-07 5:26
comicsuperfan19-Feb-07 5:26 
QuestionReconnaître un répertoire en lecture seul Pin
prady929-Feb-07 4:23
prady929-Feb-07 4:23 
AnswerRe: Reconnaître un répertoire en lecture seul Pin
Dave Kreskowiak9-Feb-07 5:24
mveDave Kreskowiak9-Feb-07 5:24 
AnswerRe: Reconna&amp;#238;tre un r&amp;#233;pertoire en lecture seul Pin
Garth J Lancaster9-Feb-07 13:29
professionalGarth J Lancaster9-Feb-07 13:29 
QuestionData Report of vb 6 Not refresh help required Pin
amjad ali shah9-Feb-07 3:06
amjad ali shah9-Feb-07 3:06 
Questionclass library Pin
dalbhide bipin9-Feb-07 1:35
dalbhide bipin9-Feb-07 1:35 
AnswerRe: class library Pin
Bassam Saoud9-Feb-07 2:42
Bassam Saoud9-Feb-07 2:42 
QuestionHow to get combobox value in a textbox Pin
rrrriiizz9-Feb-07 0:31
rrrriiizz9-Feb-07 0:31 
AnswerRe: How to get combobox value in a textbox Pin
amjad ali shah9-Feb-07 1:05
amjad ali shah9-Feb-07 1:05 
GeneralRe: How to get combobox value in a textbox Pin
rrrriiizz9-Feb-07 17:32
rrrriiizz9-Feb-07 17:32 
GeneralRe: How to get combobox value in a textbox [modified] Pin
The ANZAC9-Feb-07 19:05
The ANZAC9-Feb-07 19:05 
GeneralRe: How to get combobox value in a textbox Pin
amjad ali shah9-Feb-07 19:17
amjad ali shah9-Feb-07 19:17 
GeneralRe: How to get combobox value in a textbox Pin
TwoFaced9-Feb-07 21:22
TwoFaced9-Feb-07 21:22 
GeneralRe: How to get combobox value in a textbox Pin
rrrriiizz12-Feb-07 21:35
rrrriiizz12-Feb-07 21:35 
QuestionHow to Add excel file data into oracle database using VB 6.0? Pin
KhadijaYaseen8-Feb-07 21:16
KhadijaYaseen8-Feb-07 21:16 
AnswerRe: How to Add excel file data into oracle database using VB 6.0? Pin
amjad ali shah9-Feb-07 1:12
amjad ali shah9-Feb-07 1:12 
QuestionSystem Up Time Pin
WestSideRailways8-Feb-07 20:47
WestSideRailways8-Feb-07 20:47 

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.