Click here to Skip to main content
15,893,564 members
Home / Discussions / C#
   

C#

 
GeneralRe: how to release the COM server? Pin
Stephane Rodriguez.19-Oct-02 21:01
Stephane Rodriguez.19-Oct-02 21:01 
Generalcall a .Net exe from COM client Pin
Anonymous19-Oct-02 4:30
Anonymous19-Oct-02 4:30 
GeneralRe: call a .Net exe from COM client Pin
Stephane Rodriguez.19-Oct-02 5:23
Stephane Rodriguez.19-Oct-02 5:23 
GeneralRe: call a .Net exe from COM client Pin
Anonymous19-Oct-02 7:28
Anonymous19-Oct-02 7:28 
GeneralRe: call a .Net exe from COM client Pin
Stephane Rodriguez.19-Oct-02 7:34
Stephane Rodriguez.19-Oct-02 7:34 
GeneralFonts Pin
Substitute19-Oct-02 0:45
Substitute19-Oct-02 0:45 
GeneralRe: Fonts Pin
Nick Parker19-Oct-02 1:40
protectorNick Parker19-Oct-02 1:40 
GeneralRe: Fonts Pin
Substitute19-Oct-02 3:25
Substitute19-Oct-02 3:25 
using System;
using System.Drawing;
using System.Drawing.Text;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace FontViewer
{
///
/// Summary description for Form1.
///

public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.ListView listView1;
private System.Windows.Forms.MainMenu mainMenu1;
private System.Windows.Forms.MenuItem menuItem1;
private System.Windows.Forms.MenuItem menuItem2;
private System.Windows.Forms.MenuItem menuItem3;
private System.Windows.Forms.ColumnHeader columnHeader1;
private System.Windows.Forms.ColumnHeader columnHeader2;
///
/// Required designer variable.
///

private System.ComponentModel.Container components = null;

public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();

//
// TODO: Add any constructor code after InitializeComponent call
//
}

///
/// Clean up any resources being used.
///

protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///

private void InitializeComponent()
{
System.Configuration.AppSettingsReader configurationAppSettings = new System.Configuration.AppSettingsReader();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.listView1 = new System.Windows.Forms.ListView();
this.columnHeader2 = new System.Windows.Forms.ColumnHeader();
this.mainMenu1 = new System.Windows.Forms.MainMenu();
this.menuItem1 = new System.Windows.Forms.MenuItem();
this.menuItem2 = new System.Windows.Forms.MenuItem();
this.menuItem3 = new System.Windows.Forms.MenuItem();
this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.SuspendLayout();
//
// tabControl1
//
this.tabControl1.Controls.AddRange(new System.Windows.Forms.Control[] {
this.tabPage1});
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(624, 353);
this.tabControl1.TabIndex = 2;
//
// tabPage1
//
this.tabPage1.Controls.AddRange(new System.Windows.Forms.Control[] {
this.listView1});
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Size = new System.Drawing.Size(616, 327);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "Installed Fonts";
//
// listView1
//
this.listView1.CausesValidation = false;
this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.columnHeader2});
this.listView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.listView1.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.listView1.MultiSelect = false;
this.listView1.Name = "listView1";
this.listView1.Scrollable = ((bool)(configurationAppSettings.GetValue("listView1.Scrollable", typeof(bool))));
this.listView1.Size = new System.Drawing.Size(616, 327);
this.listView1.Sorting = System.Windows.Forms.SortOrder.Ascending;
this.listView1.TabIndex = 1;
this.listView1.View = System.Windows.Forms.View.Details;
//
// columnHeader2
//
this.columnHeader2.Text = "Names";
this.columnHeader2.Width = 595;
//
// mainMenu1
//
this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem1,
this.menuItem3});
//
// menuItem1
//
this.menuItem1.Index = 0;
this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem2});
this.menuItem1.Text = "File";
//
// menuItem2
//
this.menuItem2.Index = 0;
this.menuItem2.Shortcut = System.Windows.Forms.Shortcut.CtrlQ;
this.menuItem2.Text = "Exit";
this.menuItem2.Click += new System.EventHandler(this.menuItem2_Click);
//
// menuItem3
//
this.menuItem3.Index = 1;
this.menuItem3.Text = "About";
this.menuItem3.Click += new System.EventHandler(this.menuItem3_Click);
//
// columnHeader1
//
this.columnHeader1.Width = 612;
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(624, 353);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.tabControl1});
this.Menu = this.mainMenu1;
this.Name = "Form1";
this.Text = "Leons Font Program";
this.Load += new System.EventHandler(this.Form1_Load);
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.ResumeLayout(false);

}
#endregion

///
/// The main entry point for the application.
///

[STAThread]
static void Main()
{
Application.Run(new Form1());

}

private void Form1_Load(object sender, System.EventArgs e)
{
Graphics grfx = CreateGraphics();
Color c = Color.Black;
Brush brush = new SolidBrush(c);
float y = 0;
FontFamily[] aff = FontFamily.Families;


foreach (FontFamily ff in aff)
{
if(ff.IsStyleAvailable(FontStyle.Regular))
{
Font font = new Font(ff, 12);
grfx.DrawString(ff.Name, font, brush, 0, y);
y += font.GetHeight(grfx);
}
}

}

private void menuItem3_Click(object sender, System.EventArgs e)
{
MessageBox.Show("Made By Leon Radley, 2002");
}

private void menuItem2_Click(object sender, System.EventArgs e)
{
Application.Exit();
}
}
}

Here's my program, the problem is that nothing shows when I compile it... what have I done wrong?
GeneralManipulate Access DB Pin
Venet18-Oct-02 23:27
Venet18-Oct-02 23:27 
GeneralRe: Manipulate Access DB Pin
Stephane Rodriguez.19-Oct-02 0:44
Stephane Rodriguez.19-Oct-02 0:44 
GeneralRe: Manipulate Access DB Pin
David Stone19-Oct-02 6:44
sitebuilderDavid Stone19-Oct-02 6:44 
GeneralRe: Manipulate Access DB Pin
Stephane Rodriguez.19-Oct-02 7:25
Stephane Rodriguez.19-Oct-02 7:25 
GeneralRe: Manipulate Access DB Pin
Stephane Rodriguez.19-Oct-02 7:31
Stephane Rodriguez.19-Oct-02 7:31 
GeneralExport C# appz Pin
Anonymous18-Oct-02 8:53
Anonymous18-Oct-02 8:53 
GeneralRe: Export C# appz Pin
Paul Riley18-Oct-02 8:59
Paul Riley18-Oct-02 8:59 
GeneralRe: Export C# appz Pin
Stephane Rodriguez.18-Oct-02 9:58
Stephane Rodriguez.18-Oct-02 9:58 
GeneralRe: Export C# appz Pin
Anonymous18-Oct-02 23:16
Anonymous18-Oct-02 23:16 
Questiongrabbing focus with a Pop-up? Pin
Dave Gustafson18-Oct-02 3:05
Dave Gustafson18-Oct-02 3:05 
AnswerRe: grabbing focus with a Pop-up? Pin
Paul Riley18-Oct-02 3:46
Paul Riley18-Oct-02 3:46 
GeneralRe: grabbing focus with a Pop-up? Pin
Dave Gustafson18-Oct-02 4:36
Dave Gustafson18-Oct-02 4:36 
GeneralRe: grabbing focus with a Pop-up? Pin
Paul Riley18-Oct-02 4:46
Paul Riley18-Oct-02 4:46 
GeneralRe: grabbing focus with a Pop-up? Pin
Dave Gustafson18-Oct-02 12:33
Dave Gustafson18-Oct-02 12:33 
GeneralRe: grabbing focus with a Pop-up? Pin
Paul Riley18-Oct-02 13:20
Paul Riley18-Oct-02 13:20 
GeneralRe: grabbing focus with a Pop-up? Pin
Dave Gustafson18-Oct-02 16:53
Dave Gustafson18-Oct-02 16:53 
GeneralRe: grabbing focus with a Pop-up? Pin
Dave Gustafson20-Oct-02 5:14
Dave Gustafson20-Oct-02 5:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.