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 retVal As Boolean = False
Dim xTR As New System.Xml.XmlTextReader(path)
Dim intLoop As Integer
Dim y As Integer = 15
Dim x As Integer = 0
Try
With xTR
Do While .Read()
If .NodeType = Xml.XmlNodeType.Text Then
Dim fInfo As System.IO.FileInfo = New System.IO.FileInfo(.Value)
For intLoop = 0 To 1
' Create button and set its width
Dim newbutton As New Button
newbutton.Width = 80
newbutton.Height = 20
' If we have hit 4 buttons, adjust the y value by adding 10 onto the controls height
' Reset x back to 0
If intLoop Mod 4 = 0 Then
' This gives us a 10 pixel buffer below each row of buttons
y += newbutton.Height + 10
x = 0
End If
' Set the text and set its top and left based on its dimensions and count
newbutton.Text = fInfo.FullName
newbutton.Top = y
newbutton.AutoSize = True
' This gives us a 5 pixel right buffer between buttons
newbutton.Left = 26 + (x * (newbutton.Width + 5))
x += 2
Me.Controls.Add(newbutton)
AddHandler newbutton.Click, AddressOf OpenFile
Next
For Each b In buttons
Me.Controls.Remove(b)
Next
buttons = New List(Of Button)
Dim _File As XElement = XElement.Load("log/log.xml")
Dim _Element = From c In _File.Elements("File") Select c
Dim strings = New List(Of String)
For Each e In _Element
strings.Add(e.Value)
Next
Dim counter = 1
Dim x = 10 + o
Dim y = 10
For Each s In strings
If counter Mod 6 = 0 Then
counter = 1
x = 10 + o
y += 150
End If
Dim b As New Button()
b.Text = System.IO.Path.GetFileName(s)
b.Tag = s
b.Width = 130 '100
b.Height = 130 '30
b.Top = x
b.Left = y
b.BackColor = Color.GreenYellow
x += 150
counter += 1
AddHandler b.Click, AddressOf OpenFile
buttons.add(b)
Me.Controls.Add(b)
Next
o += 5
We gebruiken essentiële cookies om deze site te laten werken, en optionele cookies om de ervaring te verbeteren.