| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 819 人关注过本帖
标题:ppc程序启动时自动最小化问题
只看楼主 加入收藏
davidoffice
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2008-8-15
收藏
 问题点数:0 回复次数:0 
ppc程序启动时自动最小化问题
求助:ppc程序启动时自动最小化问题
关于ppc程序启动时自动最小化。
代码如下:

using System;
using System.Collections.Generic;
using
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace hello02
{
    public partial class Form1 : Form
    {
        [DllImport("coredll")]
        private static extern bool ShowWindow(IntPtr hwnd, int nCmdShow);
        private const int SW_MINIMIZE = 6;
        public Form1()
        {
            InitializeComponent();
        }
        private void button1_Click(object sender, EventArgs e)
        {
        }
        private void miniwindows(object sender, EventArgs e)
        {
            MessageBox.Show("start!");
            ShowWindow(this.Handle, SW_MINIMIZE);
        }
        private void button3_Click(object sender, EventArgs e)
        {
            ShowWindow(this.Handle, SW_MINIMIZE);
        }
        private void button2_Click(object sender, EventArgs e)
        {
            try
            {
                this.Close();
            }
            catch
            {
                // MessageBox.Show("系统退出失败!");
            }
        }
    }
}

运行结果:
1、程序启动了,miniwindows函数执行了,但程序没有最小化;
2、点击button3,程序最小化。

求助如何ppc程序启动时程序自动最小化?

谢谢个位!
搜索更多相关主题的帖子: ppc 自动 
2008-08-15 14:26
快速回复:ppc程序启动时自动最小化问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.011677 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved