Bekijk de onderstaande video om te zien hoe je onze site als een web app op je startscherm installeert.
Opmerking: Deze functie is mogelijk niet beschikbaar in sommige browsers.
Dim logFile As String = System.IO.Path.Combine(My.Application.Info.DirectoryPath, "log/log.xml")
Try
Dim dk As New XmlDocument
dk.Load(logFile)
Dim topp As XmlNode
topp = dk.SelectSingleNode("/Files/File [name = '" & _
TextBox1.Text & "']")
If topp Is Nothing Then
topp.ParentNode.RemoveChild(topp)
dk.Save(logFile)
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
<?xml version="1.0" encoding="utf-8"?>
<Files>
<File name="namegoeshere">G:\DOCUMENTEN WORD FROM DOWNLOAD\DATE notes.docx</File>
<File name="Hi My Friend">G:\ALLES VAN HARDE SCHIJF\IAN Fox Logo.png</File>
<File name="Hi Danni Boy">G:\ALLES VAN HARDE SCHIJF\IAN Fox Logo.png</File>
<File name="111">G:\ALLES VAN HARDE SCHIJF\IAN Fox Logo.png</File>
<File name="1111">G:\ALLES VAN HARDE SCHIJF\IAN Fox Logo.png</File>
</Files>
For Each e In _Element
If e.Attributes.Count > 0 Then
strings.Add(New FileName(e.Attribute("name"), e.Value))
strings.Add(New FileName(e.Attribute("Pic"), e.Value))
Else
strings.Add(New FileName(e.Value, e.Value))
End If
Next
Dim _File As XElement = XElement.Load(logFile)
_File.Add(New XElement("File", fBrowser.FileName.ToString, New XAttribute("name", TextBox1.Text), New XAttribute("Pic", "c:\test.png")))
_File.Save(logFile)
For Each s In strings
If counter Mod 6 = 0 Then
counter = 1
x = 50 + o
y += 150
End If
Dim b As New Button()
b.Text = s.Name
b.Image = Image.FromFile(s.pic)
Public Class FileName
Private _Name As String
Private _Path As String
Private _Pic As String
Public Sub New(ByVal Name As String, ByVal Path As String)
_Name = Name
_Pic = Pic
_Path = Path
End Sub
Public Property Name() As String
Get
Return _Name
End Get
Set(ByVal value As String)
_Name = value
End Set
End Property
Public Property Path() As String
Get
Return _Path
End Get
Set(ByVal value As String)
_Path = value
End Set
End Property
Public Property Pic() As String
Get
Return _Pic
End Get
Set(ByVal value As String)
_Pic = value
End Set
End Property
End Class
<File name="PP" Pic="c:\test.png">G:\ALLES VAN HARDE SCHIJF\IAN Fox Logo.png</File>
If e.Attributes.Count > 0 Then
strings.Add(New FileName(e.Attribute("name"), e.Value, e.Value))
strings.Add(New FileName(e.Attribute("Pic"), e.Value, e.Value))
Else
strings.Add(New FileName(e.Value, e.Value, e.Value))
End If
For Each s In strings
If counter Mod 6 = 0 Then
counter = 1
x = 50 + o
y += 150
End If
Dim b As New Button()
b.Text = s.Name
b.Tag = s.Path
MsgBox(s.Pic) 'hier krijg ik de file te zien
Public Sub New(ByVal Name As String, ByVal Path As String, ByVal Pic As String)
End Sub
We gebruiken essentiële cookies om deze site te laten werken, en optionele cookies om de ervaring te verbeteren.