Form1.frm
上传用户:zqemid3000
上传日期:2007-01-04
资源大小:158k
文件大小:3k
源码类别:

多显示器编程

开发平台:

Visual C++

  1. VERSION 5.00
  2. Object = "{223DE665-E7D7-11D2-8572-00001A0169AC}#1.0#0"; "MSCREE~1.OCX"
  3. Begin VB.Form Form1 
  4.    Caption         =   "Form1"
  5.    ClientHeight    =   3195
  6.    ClientLeft      =   60
  7.    ClientTop       =   345
  8.    ClientWidth     =   4680
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   213
  11.    ScaleMode       =   3  'Pixel
  12.    ScaleWidth      =   312
  13.    StartUpPosition =   3  'Windows Default
  14.    Begin VB.CommandButton Command2 
  15.       Caption         =   "Command2"
  16.       Height          =   375
  17.       Left            =   1680
  18.       TabIndex        =   4
  19.       Top             =   2760
  20.       Width           =   1335
  21.    End
  22.    Begin VB.CommandButton Command1 
  23.       Caption         =   "Command1"
  24.       Height          =   375
  25.       Left            =   0
  26.       TabIndex        =   1
  27.       Top             =   2760
  28.       Width           =   1575
  29.    End
  30.    Begin MSCREENINFOLib.MScreenInfo MScreenInfo1 
  31.       Left            =   3720
  32.       Top             =   1560
  33.       _Version        =   65536
  34.       _ExtentX        =   1296
  35.       _ExtentY        =   1085
  36.       _StockProps     =   0
  37.    End
  38.    Begin VB.Label Label3 
  39.       Caption         =   "Label3"
  40.       Height          =   255
  41.       Left            =   0
  42.       TabIndex        =   3
  43.       Top             =   840
  44.       Width           =   4575
  45.    End
  46.    Begin VB.Label Label2 
  47.       Caption         =   "Label2"
  48.       Height          =   255
  49.       Left            =   0
  50.       TabIndex        =   2
  51.       Top             =   480
  52.       Width           =   4575
  53.    End
  54.    Begin VB.Label Label1 
  55.       Caption         =   "Label1"
  56.       Height          =   255
  57.       Left            =   0
  58.       TabIndex        =   0
  59.       Top             =   120
  60.       Width           =   4575
  61.    End
  62. End
  63. Attribute VB_Name = "Form1"
  64. Attribute VB_GlobalNameSpace = False
  65. Attribute VB_Creatable = False
  66. Attribute VB_PredeclaredId = True
  67. Attribute VB_Exposed = False
  68. Private Sub Command1_Click()
  69.     Label1.Caption = "Screen Number = " & Str(MScreenInfo1.MonitorNum) & " Primary is " & Str(MScreenInfo1.PrimaryScreen)
  70.     Label2.Caption = "Screen1: Width-" & Str(MScreenInfo1.ScreenWidth(0)) & " Height-" & Str(MScreenInfo1.ScreenHeight(0)) & " Top-" & Str(MScreenInfo1.ScreenTop(0)) & " Left-" & Str(MScreenInfo1.ScreenLeft(0))
  71.     Label3.Caption = "Screen2: Width-" & Str(MScreenInfo1.ScreenWidth(1)) & " Height-" & Str(MScreenInfo1.ScreenHeight(1)) & " Top-" & Str(MScreenInfo1.ScreenTop(1)) & " Left-" & Str(MScreenInfo1.ScreenLeft(1))
  72. End Sub
  73. Private Sub Command2_Click()
  74.     Form2.Show 0, Me
  75.     Form2.Move 1024 * 15, 0, Form2.Width, Form2.Height
  76.     Form2.WindowState = 2
  77. End Sub