浏览代码

嵌入窗口成功(但是有些窗口并不能嵌入到程序中)

yuzhengyang 8 年之前
父节点
当前提交
562b840bd8
共有 2 个文件被更改,包括 7 次插入6 次删除
  1. 5 4
      Fork.Net/Y.Test/Form1.Designer.cs
  2. 2 2
      Fork.Net/Y.Test/Form1.cs

+ 5 - 4
Fork.Net/Y.Test/Form1.Designer.cs

@@ -39,12 +39,13 @@
             // 
             // 
             // embedPanel1
             // embedPanel1
             // 
             // 
-            this.embedPanel1.AppFilename = "D:\\Soft\\LogReader\\logreader.exe";
+            this.embedPanel1.AppFilename = "D:\\Soft\\DisplayX.1034260498.exe";
             this.embedPanel1.AppProcess = null;
             this.embedPanel1.AppProcess = null;
             this.embedPanel1.BackColor = System.Drawing.SystemColors.ActiveCaption;
             this.embedPanel1.BackColor = System.Drawing.SystemColors.ActiveCaption;
-            this.embedPanel1.Location = new System.Drawing.Point(205, 15);
+            this.embedPanel1.Dock = System.Windows.Forms.DockStyle.Right;
+            this.embedPanel1.Location = new System.Drawing.Point(314, 0);
             this.embedPanel1.Name = "embedPanel1";
             this.embedPanel1.Name = "embedPanel1";
-            this.embedPanel1.Size = new System.Drawing.Size(222, 157);
+            this.embedPanel1.Size = new System.Drawing.Size(466, 413);
             this.embedPanel1.TabIndex = 2;
             this.embedPanel1.TabIndex = 2;
             // 
             // 
             // flexiblePanel1
             // flexiblePanel1
@@ -92,7 +93,7 @@
             this.Controls.Add(this.embedPanel1);
             this.Controls.Add(this.embedPanel1);
             this.Controls.Add(this.flexiblePanel1);
             this.Controls.Add(this.flexiblePanel1);
             this.Name = "Form1";
             this.Name = "Form1";
-            this.Text = "D:\\Soft\\LogReader\\logreader.exe";
+            this.Text = "Test";
             this.Load += new System.EventHandler(this.Form1_Load);
             this.Load += new System.EventHandler(this.Form1_Load);
             this.flexiblePanel1.ResumeLayout(false);
             this.flexiblePanel1.ResumeLayout(false);
             this.flexiblePanel1.PerformLayout();
             this.flexiblePanel1.PerformLayout();

+ 2 - 2
Fork.Net/Y.Test/Form1.cs

@@ -12,8 +12,8 @@ namespace Y.Test
         }
         }
         void Application_Idle(object sender, EventArgs e)
         void Application_Idle(object sender, EventArgs e)
         {
         {
-            if (embedPanel1.IsStarted)
-                MessageBox.Show(string.Format("{0}", embedPanel1.AppProcess.MainWindowHandle));
+            //if (embedPanel1.IsStarted)
+            //    MessageBox.Show(string.Format("{0}", embedPanel1.AppProcess.MainWindowHandle));
         }
         }
         private void Form1_Load(object sender, EventArgs e)
         private void Form1_Load(object sender, EventArgs e)
         {
         {