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.Runtime.InteropServices;//实现窗体效果的命名空间
using System.Collections;
using System.IO;
using System.Data.OracleClient;
using System.Text.RegularExpressions;
namespace webcam
{
public partial class NewLogin : Form
{
public NewLogin()
{
InitializeComponent();
}
[DllImport("user32.dll")]
private static extern bool AnimateWindow(IntPtr hwnd, int dwTime, int dwFlags);
private const int AW_HOR_POSITIVE = 0x0001;//从左到右打开窗口
private const int AW_HOR_NEGATIVE = 0x0002;//从右到左打开窗口
private const int AW_VER_POSITIVE = 0x0004;//从上到下打开窗口
private const int AW_VER_NEGATIVE = 0x0008;//从下到上打开窗口
private const int AW_CENTER = 0x0010;//从中央打开
private const int AW_HIDE = 0x10000;//隐藏窗体
private const int AW_ACTIVATE = 0x20000;//显示窗体
private const int AW_SLIDE = 0x40000;
private const int AW_BLEND = 0x80000;//淡入淡出效果
if (listBox1.SelectedIndex == 0)
{ this.Hide(); new webcam.AConsoleForm().ShowDialog(); }
if (listBox1.SelectedIndex == 1)
{ this.Hide(); new webcam.BConsoleForm().ShowDialog(); }
if (listBox1.SelectedIndex == 2)
{ this.Hide(); new webcam.CConsoleForm().ShowDialog(); }
if (listBox1.SelectedIndex == 3)
{ this.Hide(); new webcam.DConsoleForm().ShowDialog(); }
listBox1.Focus();
}
private void listBox1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
if (listBox1.SelectedIndex == 0)
{ this.Hide(); new webcam.AConsoleForm().ShowDialog(); }
if (listBox1.SelectedIndex == 1)
{ this.Hide(); new webcam.BConsoleForm().ShowDialog(); }
if (listBox1.SelectedIndex == 2)
{ this.Hide(); new webcam.CConsoleForm().ShowDialog(); }
if (listBox1.SelectedIndex == 3)
{ this.Hide(); new webcam.DConsoleForm().ShowDialog(); }
}
}