private void frmHCViewDemo_Load(object sender, EventArgs e) { this.Text = "HCViewDemo " + Application.ProductVersion.ToString(); FHCView = new HCView(); //FHCView.OnCaretChange := DoCaretChange; //FHCView.OnVerScroll := DoVerScroll; //FHCView.PopupMenu := pmRichEdit; this.Controls.Add(FHCView); FHCView.Dock = DockStyle.Fill; FHCView.BringToFront(); //this.ResumeLayout(true); }
private void frmHCViewDemo_Load(object sender, EventArgs e) { System.Drawing.Text.InstalledFontCollection fonts = new System.Drawing.Text.InstalledFontCollection(); foreach (System.Drawing.FontFamily family in fonts.Families) { cbbFont.Items.Add(family.Name); } cbbFont.Text = "宋体"; cbbFontSize.Text = "五号"; cbbZoom.SelectedIndex = 3; this.Text = "HCViewDemo " + Application.ProductVersion.ToString(); FHCView = new HCView(); FHCView.OnCaretChange = DoCaretChange; FHCView.OnZoomChanged = DoZoomChanged; FHCView.OnVerScroll = DoVerScroll; FHCView.ContextMenuStrip = pmHCView; this.Controls.Add(FHCView); FHCView.Dock = DockStyle.Fill; FHCView.BringToFront(); //this.ResumeLayout(true); }