open System
open System.Windows.Forms
open System.Data
open System.Data.SqlClient
open System.Drawing
let constring = @"Data Source=MCNDESKTOP34;Initial Catalog=ImageManipulation;User ID=; Password="
let dataadpter = new SqlDataAdapter("Select * from ImageData", constring)
let ffont=new Font("Arial", 9.75F,FontStyle.Regular, GraphicsUnit.Point)
let ds = new DataSet()
dataadpter.Fill(ds,"ImageData")|>ignore
let imageform = new Form(Text="Display Image")
let lblappname=new Label(Top=20,Left=10,Width=120)
lblappname.Text<-"WebsiteName"
let lblicon=new Label(Top=60,Left=10)
lblicon.Text<-"ImageLogo"
let webnamelbl=new Label(Top=20,Left=140,BorderStyle=BorderStyle.FixedSingle)
let webimage=new PictureBox(SizeMode=PictureBoxSizeMode.Zoom,Top=60,Left=120)
imageform.Font<-ffont
imageform.Controls.Add(lblappname)
imageform.Controls.Add(lblicon)
imageform.Controls.Add(webnamelbl)
imageform.Controls.Add(webimage)
webnamelbl.DataBindings.Add(new Binding("Text",ds,"ImageData.Name"))
webimage.DataBindings.Add(new Binding("Image",ds,"ImageData.ImageLogo",true))
imageform.Show()
Application.Run(imageform)