你到底是要自己编程序中的窗体放到最前面,还是要调用其他程序的窗体啊?
若是将一个窗体提到最前面,可以将那个窗体的TopMost=True然后再TopMost=False,窗体就到最前面了。

解决方案 »

  1.   

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;
    using System.Windows;
    using System.Runtime.InteropServices;namespace findwindow
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
            [DllImport("user32.dll ", EntryPoint = "FindWindow ")] 
            private void Form1_Load(object sender, EventArgs e)
            {
                IntPtr HWND  cc;//在这里会出现"应输入;这个提示"
                ::findwindow(null,"QQ用户登陆");//在findwindow前面的::这里会提示"应输入标识符"
                if(cc|=null)
                {
                    
                }
                
            }        private void button1_Click(object sender, EventArgs e)
            {
                
            }
        }
    }
    我是不明白这个findwindow怎么用?帮下忙呀
      

  2.   

    你到底是要自己编程序中的窗体放到最前面,还是要调用其他程序的窗体啊?
    若是将一个窗体提到最前面,可以将那个窗体的TopMost=True然后再TopMost=False,窗体就到最前面了