下载频道> 资源分类> 编程语言> VB源码> 制作屏幕放大镜VB源码程序

标题:制作屏幕放大镜VB源码程序
分享到:

所属分类: VB源码 资源类型: 文件大小: 3.21 KB 上传时间: 2016-01-20 23:08:44 下载次数: 6 资源积分:1分 提 供 者: vb源码代做 制作屏幕放大镜VB源码程序
内容:
制作屏幕放大镜VB源码程序,程序员在编程的过程中可以参考学习使用,希望对IT程序员有用,此源码程序简单易懂、方便阅读,有很好的学习价值!
部分代码如下:
VERSION 5.00
Begin VB.Form Form1 
   BackColor       =   &H00C0C0C0&
   BorderStyle     =   4  'Fixed ToolWindow
   Caption         =   "Form1"
   ClientHeight    =   2355
   ClientLeft      =   45
   ClientTop       =   270
   ClientWidth     =   2790
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   157
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   186
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  '窗口缺省
   Begin VB.Timer Timer1 
      Interval        =   10
      Left            =   0
      Top             =   0
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
 
Private Type POINTAPI
x As Long
y As Long
End Type
 
Const Srccopy = &HCC0020
Const Swp_nomove = &H2
Const Swp_nosize = &H1
Const Flags = Swp_nomove Or Swp_nosize
Const hwnd_topmost = -1
 
Private Declare Function SetWindowPos Lib "user32" (ByVal hWnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Declare Function GetDC Lib "user32" (ByVal hWnd As Long) As Long
Private Declare Function StretchBlt Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal nSrcWidth As Long, ByVal nSrcHeight As Long, ByVal dwRop As Long) As Long
Dim pos As POINTAPI
 
 
Private Declare Function CreateEllipticRgn Lib "gdi32" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Private Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Long) As Long
 
 
Private Sub Form_Load()
SetWindowPos hWnd, hwnd_topmost, 0, 0, 0, 0, Flags
Dim hr&, dl&
Dim usew&, useh&
usew& = Me.Width / Screen.TwipsPerPixelX
useh& = Me.Height / Screen.TwipsPerPixelY
hr& = CreateEllipticRgn(0, 0, usew, useh)
dl& = SetWindowRgn(Me.hWnd, hr, True)
End Sub
Private Sub start()
Dim sx As Integer
Dim sy As Integer
GetCursorPos pos
sx = IIf(pos.x < 50 Or pos.x > 590, IIf(pos.x < 50, 0, 540), pos.x - 50)
sy = IIf(pos.y < 50 Or pos.y > 430, IIf(pos.y < 50, 0, 380), pos.y - 50)
Caption = "    坐标" & sx & "," & sy & " 放大镜"
StretchBlt hdc, 0, 0, 200, 200, GetDC(0), sx, sy, 100, 100, Srccopy
End Sub
 
Private Sub Timer1_Timer()
start
End Sub
 
 
 
Private Sub Form_DblClick()
Unload Me
End Sub
 
 

文件列表(点击上边下载按钮,如果是垃圾文件请在下面评价差评或者投诉):

制作屏幕放大镜VB源码程序/
制作屏幕放大镜VB源码程序/Form1.frm
制作屏幕放大镜VB源码程序/MSSCCPRJ.SCC
制作屏幕放大镜VB源码程序/Project1.vbp
制作屏幕放大镜VB源码程序/Project1.vbw
制作屏幕放大镜VB源码程序/谷速说明.txt

关键词: 放大镜 源码 屏幕

编程语言下载排行

Top_arrow
回到顶部
联系方式| 版权声明| 招聘信息| 广告服务| 银行汇款| 法律顾问| 兼职技术| 付款方式| 关于我们|
网站客服网站客服 程序员兼职招聘 程序员兼职招聘
沪ICP备19040327号-3
公安备案号:沪公网安备 31011802003874号
库纳格流体控制系统(上海)有限公司 版权所有
Copyright © 1999-2014, GUSUCODE.COM, All Rights Reserved