Home

Setting the Icon of a Form

     

Introduction

open System;
open System.Drawing;
open System.Windows.Forms;

let frmMain = new Form();
frmMain.Text <- "Exercise";

let customIcon = new System.Drawing.Icon("C:\Exercise\something.ico");
frmMain.Icon <- customIcon;

[<STAThread>]
do
    Application.Run(frmMain);

 

 

Home Copyright © 2010 C# Key