' Collection of code snippets by Arne Vajhøj 
' (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
Imports System
Imports System.Data
Imports System.Drawing
Imports System.Windows.Forms

Namespace E
    Public Class MainForm
    Inherits Form
        Private dataGrid1 As DataGrid

        Public Sub New()
            InitializeComponent
        End Sub

        <STAThread()> _
        Public Shared Sub Main(ByVal args As String())
            Application.Run(New MainForm)
        End Sub

        Private Sub InitializeComponent()
            dataGrid1 = New DataGrid
            CType((dataGrid1), System.ComponentModel.ISupportInitialize).BeginInit
            SuspendLayout
            Dim ds As DataSet = New DataSet
            ds.ReadXml("http://www.nationalbanken.dk/dndk/valuta.nsf/valuta.xml")
            dataGrid1.DataSource = ds.Tables("currency")
            dataGrid1.HeaderForeColor = SystemColors.ControlText
            dataGrid1.Location = New Point(50, 50)
            dataGrid1.Size = New Size(400, 600)
            ClientSize = New Size(500, 700)
            Controls.Add(dataGrid1)
            Text = "Demo"
            CType((dataGrid1), System.ComponentModel.ISupportInitialize).EndInit
            ResumeLayout(False)
        End Sub
    End Class 
End Namespace
