Here are the examples of the csharp api class System.Windows.Forms.Control.CreateControl() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
22 Examples
0
1. Example
Project: XSharp
Source File: WinFormsPropertyPageUI.cs
Source File: WinFormsPropertyPageUI.cs
public Task ActivateAsync(IntPtr hWndParent, Rectangle rect, bool modal) { CreateControl(); Win32Methods.SetParent(Handle, hWndParent); return TplExtensions.CompletedTask; }
0
2. Example
Project: CM3D2.MaidFiddler
Source File: MaidFiddlerGUI.cs
Source File: MaidFiddlerGUI.cs
private void OnVisibleChanged(object sender, EventArgs eventArgs) { Debugger.Assert( () => { if (!initialized && Visible && !IsHandleCreated) { Debugger.WriteLine(LogLevel.Info, "No handle! Creating one..."); CreateControl(); initialized = true; } if (!Visible) return; UpdateMaids(GameMain.Instance.CharacterMgr.GetStockMaidList().ToList()); Player.UpdateAll(); }, $"Failed to {(Visible ? "restore" : "hide")} the Maid Fiddler window"); }
0
3. Example
Project: BCFier
Source File: AppMain.cs
Source File: AppMain.cs
public override Control CreateControlPane() { //create an ElementHost ElementHost eh = new ElementHost(); //assign the control //eh.Anchor = AnchorStyles.Top; eh.Dock = DockStyle.Top; eh.Anchor = AnchorStyles.Top; ns = new NavisWindow(); eh.Child = ns; eh.HandleCreated += eh_HandleCreated; eh.CreateControl(); //return the ElementHost return eh; }
0
4. Example
Project: issue-tracker
Source File: Plugin.cs
Source File: Plugin.cs
public override Control CreateControlPane() { //create an ElementHost ElementHost eh = new ElementHost(); //assign the control //eh.Anchor = AnchorStyles.Top; eh.Dock = DockStyle.Top; eh.Anchor = AnchorStyles.Top; ns = new NavisWindow(); eh.Child = ns; eh.HandleCreated += eh_HandleCreated; eh.CreateControl(); //return the ElementHost return eh; }
0
5. Example
Project: TaskScheduler
Source File: TaskPropertiesControl.cs
Source File: TaskPropertiesControl.cs
private void InsertTab(int idx) { var tab = tabPages[idx]; if (tabControl.TabPages.IndexOf(tab) != -1) return; var h = tabControl.Handle; if (!tab.IsHandleCreated) tab.CreateControl(); tabControl.TabPages.Insert(FindFirstVisibleTab(idx), tab); }
0
6. Example
Project: samschanneledit
Source File: UCSingleEdit.cs
Source File: UCSingleEdit.cs
private void EditListViewItem(ListViewHitTestInfo item) { if (item == null || item.SubItem == null) { return; } TextBox tbxEdit = new TextBox(); tbxEdit.Parent = listView1; tbxEdit.Tag = item; // Store clicked item tbxEdit.Location = new Point(item.SubItem.Bounds.Location.X, item.SubItem.Bounds.Location.Y - 1); tbxEdit.AutoSize = false; tbxEdit.Height = item.Item.Bounds.Height + 1; tbxEdit.Width = item.SubItem.Bounds.Width + 1; tbxEdit.BorderStyle = BorderStyle.FixedSingle; tbxEdit.KeyDown += new KeyEventHandler(tbxEdit_KeyDown); tbxEdit.LostFocus += new EventHandler(tbxEdit_LostFocus); tbxEdit.Text = item.SubItem.Text; tbxEdit.CreateControl(); tbxEdit.Focus(); }
0
7. Example
Project: BloomDesktop
Source File: HtmlThumbNailer.cs
Source File: HtmlThumbNailer.cs
private GeckoWebBrowser MakeNewBrowser() { if (Program.ApplicationExiting) return null; Debug.WriteLine("making browser ({0})", Thread.CurrentThread.ManagedThreadId); #if !__MonoCS__ var browser = new GeckoWebBrowser(); #else var browser = new OffScreenGeckoWebBrowser(); #endif browser.CreateControl(); browser.DocumentCompleted += _browser_OnDocumentCompleted; return browser; }
0
8. Example
Project: LilyPath
Source File: GLControl.cs
Source File: GLControl.cs
void ValidateState() { if (IsDisposed) throw new ObjectDisposedException(GetType().Name); if (!IsHandleCreated) CreateControl(); if (implementation == null || context == null || context.IsDisposed) RecreateHandle(); }
0
9. Example
Project: scallion
Source File: GLControl.cs
Source File: GLControl.cs
void ValidateState() { if (IsDisposed) throw new ObjectDisposedException(GetType().Name); if (!IsHandleCreated) CreateControl(); if (implementation == null || context == null || context.IsDisposed) RecreateHandle(); }
0
10. Example
Project: roslyn
Source File: InteractiveHost.Service.cs
Source File: InteractiveHost.Service.cs
private static void UIThread() { s_ui = new Control(); s_ui.CreateControl(); s_uiReady.Set(); Application.Run(); }
0
11. Example
Project: Wolven-kit
Source File: frmJournalEditor.cs
Source File: frmJournalEditor.cs
public void RenderDescription(string text) { var webBrowser = new WebBrowser(); webBrowser.CreateControl(); // only if needed webBrowser.DocumentText = ($"<html><body>{text}</body></html>"); Application.DoEvents(); webBrowser.Document.ExecCommand("SelectAll", false, null); webBrowser.Document.ExecCommand("Copy", false, null); textRender.Paste(); }
0
12. Example
Project: SharpFlame
Source File: WinGLUserControl.cs
Source File: WinGLUserControl.cs
private void EnsureValidHandle() { if( IsDisposed ) throw new ObjectDisposedException(GetType().Name); if( !IsHandleCreated ) CreateControl(); if( windowInfo == null || context == null || context.IsDisposed ) RecreateHandle(); }
0
13. Example
Project: NuBuild
Source File: SettingsPage.cs
Source File: SettingsPage.cs
public virtual void Activate(IntPtr parent, RECT[] pRect, int bModal) { if(this.panel == null) { if (pRect == null) { throw new ArgumentNullException("pRect"); } this.panel = new Panel(); this.panel.Size = new Size(pRect[0].right - pRect[0].left, pRect[0].bottom - pRect[0].top); this.panel.Text = SR.GetString(SR.Settings, CultureInfo.CurrentUICulture); this.panel.Visible = false; this.panel.Size = new Size(550, 300); this.panel.CreateControl(); NativeMethods.SetParent(this.panel.Handle, parent); } if(this.grid == null && this.project != null && this.project.Site != null) { IVSMDPropertyBrowser pb = this.project.Site.GetService(typeof(IVSMDPropertyBrowser)) as IVSMDPropertyBrowser; this.grid = pb.CreatePropertyGrid(); } if(this.grid != null) { this.active = true; Control cGrid = Control.FromHandle(new IntPtr(this.grid.Handle)); cGrid.Parent = Control.FromHandle(parent);//this.panel; cGrid.Size = new Size(544, 294); cGrid.Location = new Point(3, 3); cGrid.Visible = true; this.grid.SetOption(_PROPERTYGRIDOPTION.PGOPT_TOOLBAR, false); this.grid.GridSort = _PROPERTYGRIDSORT.PGSORT_CATEGORIZED | _PROPERTYGRIDSORT.PGSORT_ALPHABETICAL; NativeMethods.SetParent(new IntPtr(this.grid.Handle), this.panel.Handle); UpdateObjects(); } }
0
14. Example
Project: MultiversePlatform
Source File: BrowserCodec.cs
Source File: BrowserCodec.cs
public bool Open(string u) { Controls.Add(b); b.CreateControl(); CreateControl(); Show(); url = u; loaded = false; loadpct = 0; b.Navigate(url); return true; }
0
15. Example
Project: MultiversePlatform
Source File: Browser.cs
Source File: Browser.cs
public void SetupBrowser() { RenderWindow rw = (Root.Instance.RenderSystem as D3D9RenderSystem).PrimaryWindow; Control c = (Control)rw.GetCustomAttribute("HWND"); // dummy label used to 'unfocus' the browser dummy = new Label(); dummy.Size = new Size(1, 1); dummy.Location = new Point(1, 1); Controls.Add(dummy); dummy.CreateControl(); b = new WebBrowser(); PositionBrowser(); Controls.Add(b); b.CreateControl(); b.BringToFront(); c.Controls.Add(this); CreateControl(); }
0
16. Example
Project: OpenLiveWriter
Source File: BrowserOperationInvoker.cs
Source File: BrowserOperationInvoker.cs
private void BackgroundMain() { try { using (form = new Form()) { form.Size = new Size(browserWidth, browserHeight); browser = new ExplorerBrowserControl(); browser.Dock = DockStyle.Fill; browser.Silent = true; browser.DocumentComplete += Handler; form.Controls.Add(browser); form.CreateControl(); browser.Navigate(url); Application.Run(); } } catch (Exception e) { Trace.Fail(e.ToString()); } }
0
17. Example
Project: Neo
Source File: TexturingViewModel.cs
Source File: TexturingViewModel.cs
private void SetSelectedTileTextures(Control panel, IEnumerable<string> textures) { /n ..... /n //View Source file for more details /n }
0
18. Example
Project: OpenLiveWriter
Source File: ContentEditorProxy.cs
Source File: ContentEditorProxy.cs
private void ContentEditorProxyCore(ContentEditorFactory factory, IContentEditorSite contentEditorSi/n ..... /n //View Source file for more details /n }
0
19. Example
Project: managed-lzma
Source File: Server.cs
Source File: Server.cs
[STAThread] public static void Main(params string[] args) { if (Array.In/n ..... /n //View Source file for more details /n }
0
20. Example
Project: roslyn
Source File: InteractiveHost.Service.cs
Source File: InteractiveHost.Service.cs
private static void RunServer(string serverPort, string semaphoreName, int clientProcessId) /n ..... /n //View Source file for more details /n }
0
21. Example
Project: mRemoteNG
Source File: RdpProtocol.cs
Source File: RdpProtocol.cs
public override bool Initialize() { base.Initialize(); try { Control.CreateControl();/n ..... /n //View Source file for more details /n }
0
22. Example
Project: Avalonia
Source File: AvaloniaAppHost.cs
Source File: AvaloniaAppHost.cs
private void DoInit(string targetExe, StringBuilder logger) { _appDir = Path.Get/n ..... /n //View Source file for more details /n }