亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? frmmagnifier.frm

?? VB開(kāi)發(fā)的基于mo控件的例子
?? FRM
字號(hào):
VERSION 5.00
Object = "{9BD6A640-CE75-11D1-AF04-204C4F4F5020}#2.0#0"; "mo20.ocx"
Begin VB.Form frmMagnifier 
   AutoRedraw      =   -1  'True
   BorderStyle     =   4  'Fixed ToolWindow
   Caption         =   "Magnify"
   ClientHeight    =   2520
   ClientLeft      =   45
   ClientTop       =   285
   ClientWidth     =   2520
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2520
   ScaleWidth      =   2520
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  'Windows Default
   Begin MapObjects2.Map mapMagnify 
      Height          =   2400
      Left            =   60
      TabIndex        =   0
      Top             =   60
      Width           =   2400
      _Version        =   131072
      _ExtentX        =   4233
      _ExtentY        =   4233
      _StockProps     =   225
      BackColor       =   16777215
      BorderStyle     =   1
      ScrollBars      =   0   'False
      Contents        =   "frmMagnifier.frx":0000
   End
End
Attribute VB_Name = "frmMagnifier"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'
'  Module Name:  frmMagnifier
'
'  Description:  Magnifier form
'
'     Requires:  (nothing)
'
'      Methods:  SetFormAndMap - sets underlying form and map
'                Update - updates the internal snapshot of the underlying map and
'                   draws on the magnifier whatever is currently underneath the
'                   magnifier
'                StayOnTop - sets the "always on top" mode for this form
'
'      History:  Peter Girard, ESRI - 9/99 - original coding
'
'=============================================================================

Option Explicit

' == Windows API calls and constants

' -- window position and state

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 Const HWND_TOPMOST = -1
Private Const HWND_NOTOPMOST = -2

' -- device contexts

Private Declare Function GetDC Lib "user32" (ByVal hWnd As Long) As Long
Private Declare Function CreateCompatibleDC Lib "gdi32" (ByVal hDC As Long) As Long
Private Declare Function ReleaseDC Lib "user32" (ByVal hWnd As Long, _
    ByVal hDC As Long) As Long
Private Declare Function DeleteDC Lib "gdi32" (ByVal hDC As Long) As Long
Private Declare Function SelectObject Lib "gdi32" (ByVal hDC As Long, _
    ByVal hObject As Long) As Long
Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long

' -- bit map manipulation

Private Declare Function CreateCompatibleBitmap Lib "gdi32" (ByVal hDC As Long, _
    ByVal nWidth As Long, ByVal nHeight As Long) As Long
Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC 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 dwRop As Long) As Long

' -- drawing

Private Declare Function CreatePen Lib "gdi32" (ByVal nPenStyle As Long, _
    ByVal nWidth As Long, ByVal crColor As Long) As Long
Private Declare Function CreateSolidBrush Lib "gdi32" (ByVal crColor As Long) As Long
Private Declare Function MoveToEx Lib "gdi32" (ByVal hDC As Long, _
    ByVal X As Long, ByVal Y As Long, lpPoint As POINTAPI) As Long
Private Declare Function LineTo Lib "gdi32" (ByVal hDC As Long, ByVal X As Long, _
    ByVal Y As Long) As Long
Private Declare Function Rectangle Lib "gdi32" (ByVal hDC As Long, _
    ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long

Private Declare Function GetROP2 Lib "gdi32" (ByVal hDC As Long) As Long
Private Declare Function SetROP2 Lib "gdi32" (ByVal hDC As Long, _
  ByVal nDrawMode As Long) As Long

Private Type POINTAPI
  X As Long
  Y As Long
End Type

' == module variables

Dim mForm As Form
Dim mMap As MapObjects2.Map
Dim mWidth As Long, mHeight As Long

Dim mMagnification As Double

Dim mDC As Long           ' device context for the snapshot
Dim mBitmap As Long       ' bitmap snapshot of the underlying map
Dim mOldBitmap As Long

Private Sub Form_Load()

StayOnTop True
mMagnification = 4

End Sub

Private Sub Form_Unload(Cancel As Integer)

' -- free the memory used by the snapshot and its device context

If mOldBitmap > 0 Then
  SelectObject mDC, mOldBitmap
  DeleteObject mBitmap
  DeleteDC mDC
End If

End Sub

Private Sub mapMagnify_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)

If Button = 1 Then
  MoveMagnifier X, Y
End If

End Sub

Private Sub mapMagnify_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

If Button = 1 Then
  MoveMagnifier X, Y
End If

End Sub

Private Sub mapMagnify_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)

DrawMap

End Sub

Private Sub DrawMap()

Dim sx As Single, sy As Single
Dim p As MapObjects2.Point, e As MapObjects2.Rectangle

' -- draw the magnified map; determine the screen location of mapMagnify
' -- relative to the underlying map

Set e = New MapObjects2.Rectangle
sx = (frmMagnifier.Left + mapMagnify.Left) - (mForm.Left + mMap.Left) - (3 * Screen.TwipsPerPixelX)
sy = (frmMagnifier.Top + mapMagnify.Top) - (mForm.Top + mMap.Top) - (6 * Screen.TwipsPerPixelY)

' -- get the map extent from the underlying map based on the pixel extent
' -- of mapMagnify

Set p = mMap.ToMapPoint(sx, sy)
e.Left = p.X
e.Top = p.Y
Set p = mMap.ToMapPoint(sx + mapMagnify.Width, sy + mapMagnify.Height)
e.Right = p.X
e.Bottom = p.Y

' -- scale mapMagnify to the set magnification and display

e.ScaleRectangle 1 / mMagnification
mapMagnify.Extent = e

End Sub

Private Sub MoveMagnifier(X As Single, Y As Single)

Dim mapDC As Long, tempDC As Long, bitmap As Long, oldBitmap As Long
Dim dx As Single, dy As Single
Dim sx As Long, sy As Long, w As Long, h As Long
Dim tx As Long, ty As Long

Dim mag As Single
Dim oldBrush As Long, hndBrush As Long
Dim oldPen As Long, hndPen As Long, lastPoint As POINTAPI
Dim oldDrawMode As Long

' -- if the specified coordinates do not represent the center of mapMagnify, move
' -- the form to recenter

dx = X - (mapMagnify.Width / 2)
dy = Y - (mapMagnify.Height / 2)
If dx <> 0 Or dy <> 0 Then
  Me.Move Me.Left + dx, Me.Top + dy
End If

' -- determine the screen location of mapMagnify relative to the underlying map

tx = Screen.TwipsPerPixelX
ty = Screen.TwipsPerPixelY

sx = (((frmMagnifier.Left + mapMagnify.Left) - (mForm.Left + mMap.Left)) \ tx) - 3
sy = (((frmMagnifier.Top + mapMagnify.Top) - (mForm.Top + mMap.Top)) \ ty) - 6
w = (mapMagnify.Width / tx) - 2
h = (mapMagnify.Height / ty) - 2

mapDC = GetDC(mapMagnify.hWnd)

' -- if mapMagnify goes beyond the edge of the underlying map ...

If sx < 0 Or sy < 0 Or sx + w > mWidth Or sy + h > mHeight Then

  ' -- create a temporary device context and bitmap that is the same pixel size
  ' -- as mapMagnify
  
  tempDC = CreateCompatibleDC(mapDC)
  bitmap = CreateCompatibleBitmap(mapDC, mapMagnify.Width / tx, mapMagnify.Height / ty)
  oldBitmap = SelectObject(tempDC, bitmap)
  
  ' -- paint the temporary bitmap a medium gray
  
  hndBrush = CreateSolidBrush(RGB(128, 128, 128))
  oldBrush = SelectObject(tempDC, hndBrush)
  Rectangle tempDC, -2, -2, mapMagnify.Width / tx + 2, mapMagnify.Height / ty + 2
  SelectObject mapDC, oldBrush
  DeleteObject hndBrush
  
  ' -- copy the underlying map graphics from the snapshot to the temporary bitmap,
  ' -- then copy the temporary bitmap to mapMagnify's device context; this entire
  ' -- process avoids flicker
  
  BitBlt tempDC, 0, 0, w, h, mDC, sx, sy, vbSrcCopy
  BitBlt mapDC, 0, 0, w, h, tempDC, 0, 0, vbSrcCopy
  
' -- otherwise, copy the underlying map graphics directly from the snapshot to
' -- mapMagnify's device context

Else
  BitBlt mapDC, 0, 0, w, h, mDC, sx, sy, vbSrcCopy
End If

' -- draw the outline of the area to magnify

hndPen = CreatePen(0, 1, RGB(0, 0, 0))
oldPen = SelectObject(mapDC, hndPen)
oldDrawMode = GetROP2(mapDC)
SetROP2 mapDC, vbInvert

mag = mMagnification * 2

MoveToEx mapDC, (w / 2) - (w / mag), (h / 2) - (h / mag), lastPoint
LineTo mapDC, (w / 2) + (w / mag), (h / 2) - (h / mag)
MoveToEx mapDC, (w / 2) + (w / mag), (h / 2) - (h / mag), lastPoint
LineTo mapDC, (w / 2) + (w / mag), (h / 2) + (h / mag)
MoveToEx mapDC, (w / 2) + (w / mag), (h / 2) + (h / mag), lastPoint
LineTo mapDC, (w / 2) - (w / mag), (h / 2) + (h / mag)
MoveToEx mapDC, (w / 2) - (w / mag), (h / 2) + (h / mag), lastPoint
LineTo mapDC, (w / 2) - (w / mag), (h / 2) - (h / mag)

' -- reset device contexts and free memory

If bitmap > 0 Then
  SelectObject tempDC, oldBitmap
  DeleteObject bitmap
  DeleteDC tempDC
End If
SelectObject mapDC, oldPen
DeleteObject hndPen
SetROP2 mapDC, oldDrawMode
ReleaseDC mapMagnify.hWnd, mapDC

End Sub

Private Sub UpdateBitmap()

Dim baseMapDC As Long

' -- create a new snapshot of the underlying map

mWidth = (mMap.Width / Screen.TwipsPerPixelX) - 6
mHeight = (mMap.Height / Screen.TwipsPerPixelY) - 7

baseMapDC = GetDC(mMap.hWnd)
mDC = CreateCompatibleDC(baseMapDC)
mBitmap = CreateCompatibleBitmap(baseMapDC, mWidth, mHeight)
mOldBitmap = SelectObject(mDC, mBitmap)
BitBlt mDC, 0, 0, mWidth, mHeight, baseMapDC, 0, 0, vbSrcCopy
ReleaseDC mMap.hWnd, baseMapDC

End Sub

Public Sub SetFormAndMap(f As Form, m As MapObjects2.Map)

Dim e As MapObjects2.Rectangle, i As Integer

' -- set underlying form and map

Set mForm = f
Set mMap = m

For i = mMap.Layers.Count - 1 To 0 Step -1
  mapMagnify.Layers.Add mMap.Layers(i)
Next i
Set e = mMap.FullExtent
e.ScaleRectangle 3
mapMagnify.FullExtent = e

UpdateBitmap
DrawMap

End Sub

Public Sub Update()

' -- update the snapshot of the underlying map and draw whatever is now
' -- underneath the magnifier

UpdateBitmap
DrawMap

End Sub

Public Sub StayOnTop(onTop As Boolean)

Dim fLeft As Long, fTop As Long, fWidth As Long, fHeight As Long
Dim fState As Long

' -- set the "always on top" mode for this form

fLeft = Me.Left / Screen.TwipsPerPixelX
fTop = Me.Top / Screen.TwipsPerPixelY
fWidth = Me.Width / Screen.TwipsPerPixelX
fHeight = Me.Height / Screen.TwipsPerPixelY

If onTop Then
  fState = HWND_TOPMOST
Else
  fState = HWND_NOTOPMOST
End If

SetWindowPos Me.hWnd, fState, fLeft, fTop, fWidth, fHeight, 0

End Sub

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国产乱码久久久久久浪潮| 91精品国产综合久久婷婷香蕉| 日韩国产欧美在线视频| 日韩三级在线观看| va亚洲va日韩不卡在线观看| 国产精品三级视频| 在线播放一区二区三区| 99热这里都是精品| 精品一区二区三区久久| 亚洲人成7777| 国产精品女人毛片| 欧美精品 日韩| 91美女视频网站| 国产激情视频一区二区三区欧美| 视频精品一区二区| 亚洲午夜三级在线| 亚洲免费三区一区二区| 久久精品视频在线看| 日韩欧美一区二区视频| 欧美日韩一卡二卡| 91看片淫黄大片一级在线观看| 国产风韵犹存在线视精品| 日本成人在线网站| 美美哒免费高清在线观看视频一区二区| 中文字幕av不卡| 国产精品久久网站| 国产精品视频观看| 久久精品人人做| 亚洲欧美日韩一区| 一区二区三区精品在线观看| 亚洲高清不卡在线| 亚洲成人自拍偷拍| 日韩高清欧美激情| 寂寞少妇一区二区三区| www.在线成人| 成人av电影在线| 成人av网址在线| 不卡免费追剧大全电视剧网站| 99久久国产综合色|国产精品| 91碰在线视频| 欧美一区二区免费视频| 久久久久久久综合狠狠综合| 国产精品美女一区二区| 国产精品国产馆在线真实露脸| 亚洲国产岛国毛片在线| 婷婷丁香久久五月婷婷| 成人动漫av在线| 欧美日韩高清一区二区不卡| 久久精品男人的天堂| 亚洲色图一区二区| 亚洲成人免费视| 国精产品一区一区三区mba桃花| 国产iv一区二区三区| 在线观看日产精品| 精品处破学生在线二十三| 亚洲综合在线视频| 国产一区二区在线观看视频| 在线播放亚洲一区| 亚洲视频 欧洲视频| 加勒比av一区二区| 3d动漫精品啪啪一区二区竹菊| 久久精品亚洲国产奇米99| 亚洲影院免费观看| 91玉足脚交白嫩脚丫在线播放| 欧美sm极限捆绑bd| 麻豆成人91精品二区三区| 色94色欧美sute亚洲13| 久久久久国产精品免费免费搜索| 亚洲成人第一页| 91亚洲资源网| 国产天堂亚洲国产碰碰| 久久超碰97人人做人人爱| 一本大道久久a久久精二百| 国产欧美日产一区| 成人一级视频在线观看| 欧美精品一区二区三区视频| 国产一区二区电影| 久久看人人爽人人| 成人一区二区三区| 欧美国产乱子伦| 99久久er热在这里只有精品15| 国产人伦精品一区二区| 国产v日产∨综合v精品视频| 日本一区免费视频| 国产电影一区在线| 国产欧美日本一区二区三区| 精品在线一区二区| 久久久久久麻豆| 一本大道久久a久久综合婷婷| 亚洲欧美日韩国产综合在线| 欧美日韩在线播| 亚洲国产视频一区| 日韩一区二区影院| 91在线观看地址| 亚洲电影激情视频网站| 日韩欧美亚洲一区二区| 国产不卡在线视频| 亚洲欧美日韩系列| 欧美一区二区视频网站| www.久久精品| 午夜国产精品影院在线观看| 久久一日本道色综合| 欧美视频在线一区二区三区 | 成人精品高清在线| 亚洲1区2区3区视频| 中文乱码免费一区二区| 亚洲精品一区二区三区99| 91色乱码一区二区三区| 国产伦理精品不卡| 亚洲成人精品一区二区| 国产色91在线| 日韩欧美一区二区免费| 欧美综合欧美视频| 国产v日产∨综合v精品视频| 日韩精品免费视频人成| 国产精品的网站| 欧美一区二区女人| 91老师国产黑色丝袜在线| 精品一区在线看| 日本va欧美va瓶| 亚洲欧美综合在线精品| 久久久久综合网| 日韩免费视频一区| 日本高清不卡在线观看| 国产伦精品一区二区三区视频青涩| 亚洲色图欧美偷拍| 国产精品久久精品日日| 久久久99久久| 欧美激情一区二区三区不卡| 日韩你懂的在线播放| 欧美一区二区国产| 精品国产91洋老外米糕| 日韩三级在线免费观看| 久久中文字幕电影| 久久蜜臀精品av| 国产精品国产三级国产有无不卡| 欧美国产精品久久| 精品福利一二区| 欧美一三区三区四区免费在线看| 欧美在线免费视屏| 欧美日韩国产综合一区二区| 在线看不卡av| 欧美日韩精品一区二区在线播放 | 国产一区二区三区在线观看免费视频 | 精品欧美一区二区久久| 欧美国产一区二区在线观看| 亚洲色图一区二区三区| 亚洲成人你懂的| 国产999精品久久| 99re6这里只有精品视频在线观看| 91福利社在线观看| 91精品福利在线一区二区三区| 久久久久久夜精品精品免费| 日韩理论片在线| 国内外精品视频| 色婷婷精品大视频在线蜜桃视频| 欧美日本国产一区| 国产精品久久久久久亚洲毛片 | 一区二区三区 在线观看视频| 日日噜噜夜夜狠狠视频欧美人| 粉嫩aⅴ一区二区三区四区| 欧美日韩卡一卡二| 国产欧美一区二区精品仙草咪| 亚洲女同一区二区| 国产曰批免费观看久久久| 在线视频国内自拍亚洲视频| 久久综合999| 热久久一区二区| 欧美日韩国产大片| 亚洲精品免费电影| 成人午夜电影网站| 日韩免费高清电影| 亚洲午夜三级在线| 91电影在线观看| 亚洲视频在线观看一区| 国产成人自拍网| 久久午夜色播影院免费高清| 久久99国产精品久久99果冻传媒| 日韩美女一区二区三区| 国产精品一区二区不卡| 亚洲精品中文在线观看| 精品欧美久久久| 色播五月激情综合网| 激情综合色播激情啊| 亚洲精品免费在线观看| 精品国一区二区三区| 欧美日韩一区在线观看| 高潮精品一区videoshd| 日精品一区二区三区| 亚洲天堂网中文字| 久久久电影一区二区三区| 欧美中文字幕一区| 成人av手机在线观看| 国产日本亚洲高清| 福利一区福利二区| 一区二区国产视频| 这里只有精品电影| 成人黄色a**站在线观看| 一区二区国产视频| 亚洲国产精品成人综合色在线婷婷 |