• λ我爱Aspx >> Asp.Net >> C#实现控件数组
  • C#实现控件数组

  • :未知  Դ:internet  :2007-5-20 16:43:58  ؼ:c#
  • 下面的代码实现修改显示器分辨率和刷新频率的功能:

    using System;

    using System.Drawing;

    using System.Collections;

    using System.ComponentModel;

    using System.Windows.Forms;

    using System.Data;

    using System.Runtime.InteropServices;

    namespace ScreenResolution

    {

    public class Form1 : System.Windows.Forms.Form

    {

    public enum DMDO

    {

    DEFAULT = 0,

    D90 = 1,

    D180 = 2,

    D270 = 3

    }

    [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)]

    struct DEVMODE

    {

    public const int DM_DISPLAYFREQUENCY = 0x400000;

    public const int DM_PELSWIDTH = 0x80000;

    public const int DM_PELSHEIGHT = 0x100000;

    private const int CCHDEVICENAME = 32;

    private const int CCHFORMNAME = 32;

    [MarshalAs(UnmanagedType.ByValTStr, SizeConst=CCHDEVICENAME)]

    Ҷƪл˵?
  • һƪ在类中获取当前页面Page对象的引用
    һƪweb.config文件详解