Example #1
0
 private void frmMain_Load(object sender, EventArgs e)
 {
     aPBox = new PBoxArray(this); IconExtractor iconex = new IconExtractor();
     Apps  = FileRead("apps.txt").Replace("\r", "").Split('\n');
     Icons = new Icon[Apps.GetUpperBound(0) + 1];
     for (int a = 0; a <= Apps.GetUpperBound(0); a++)
     {
         aPBox.NewPBox();
         try {
             Icons[a] = iconex.Extract(Apps[a], IconSize.Large);
         }
         catch {
             Icons[a] = this.Icon;
         }
         aPBox[a].BackgroundImage       = Icons[a].ToBitmap() as Image;
         aPBox[a].BackgroundImageLayout = ImageLayout.Zoom;
         aPBox[a].Size    = new Size(64, 64);
         aPBox[a].Visible = true;
         TTip.SetToolTip(aPBox[a], Apps[a].Split('\\').Last());
     }
     iAppsWd       = (Apps.GetUpperBound(0) + 1) * 66; Cover.BringToFront();
     this.Location = new Point(
         (Screen.PrimaryScreen.Bounds.Width / 2) - (this.Width / 2),
         (-this.Size.Height) + iYOfs);
 }