掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
フォームのタイトル部 (ID:120923)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
VB6で、こういうことかな? Option Explicit Private Type POINTAPI x As Long y As Long End Type Private Type RECT Left As Long Top As Long Right As Long Bottom As Long End Type Private Declare Function GetWindowRect Lib "user32" _ (ByVal hwnd As Long, lpRect As RECT) As Long Private Declare Function ScreenToClient Lib "user32" _ (ByVal hwnd As Long, lpPoint As POINTAPI) As Long Private Sub Form_Load() Dim rc As RECT Dim pt As POINTAPI Call GetWindowRect(Me.hwnd, rc) pt.x = rc.Left pt.y = rc.Top Call ScreenToClient(Me.hwnd, pt) Debug.Print "ClientLeft ="; -pt.x * Screen.TwipsPerPixelX Debug.Print "ClientTop ="; -pt.y * Screen.TwipsPerPixelY End Sub
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2020 Takeshi Okamoto All Rights Reserved.