 |
|
ทำโปรแกรมแบบ Express เปิดฟอร์มซ้อนกัน เขาทำกันยังไงครับ |
|
 |
|
|
 |
 |
|
Bootstrap/jQuery หาพวก UI เป็นแบบ Modal ครับ มีเยอะแยะ 
|
 |
 |
 |
 |
Date :
2017-08-17 16:52:29 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
เป็นโปรแกรมเสริม หรอ ครับ
|
 |
 |
 |
 |
Date :
2017-08-17 18:47:14 |
By :
chokzass2016 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ใช่เปิดโปรแกรมอื่นใน Form เราอีกทีใช่หรือเปล่าครับถ้าใช่ก็ตามด้านล่างครับ..ถ้าไม่ใช่ก็ขออภัยด้วยครับ

Form1.cs
Code (C#)
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Threading;
using Microsoft.Win32;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
[DllImport("user32.dll")]
static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent);
[DllImport("user32.dll")]
static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong);
[DllImport("user32.dll")]
static extern bool MoveWindow(IntPtr Handle, int x, int y, int w, int h, bool repaint);
private void Form1_Load(object sender, EventArgs e)
{
Process p = Process.Start(@"C:\\Windows\\notepad.exe");
p.WaitForInputIdle();
SetParent(p.MainWindowHandle, panel1.Handle);
}
}
}
Program.cs
Code (C#)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}
|
 |
 |
 |
 |
Date :
2017-08-20 19:29:05 |
By :
pebble |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
โทษทีครับสงสัยรีบอ่านไปหน่อย " VB.NET เปิดฟอร์มซ้อนกัน " น่าจะใช้แบบนี้ครับ

Code (VB.NET)
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
MDIchild1.MdiParent = Me
MDIchild1.Show()
MDIchild2.MdiParent = Me
MDIchild2.Show()
End Sub
|
 |
 |
 |
 |
Date :
2017-08-20 19:44:56 |
By :
pebble |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ใช่ครับ ขอบคุณครับ
|
 |
 |
 |
 |
Date :
2017-08-21 11:37:31 |
By :
chokzass2016 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
สงสัยผมจะลืมดู Tag 
|
 |
 |
 |
 |
Date :
2017-08-21 16:12:28 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ใช้ Form ปกติ แล้ว OpenDialog ครับ
|
 |
 |
 |
 |
Date :
2017-08-21 16:12:59 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|