what control is my mouse over?
กระทู้เก่าบอร์ด อ.สุภาพ ไชยา

 210   1
URL.หัวข้อ / URL
what control is my mouse over?

what control is my mouse over ?

Is there any way to identify (using code) the name of the control that the mouse is currently hovering over using the mouse move up/down events ? (a97)

[posted once before but not much response !]

Nick
คุณนิคถามว่า จะทำอย่างไรให้ทราบว่า mouse กำลังอยู่เหนือ control ตัวไหนใน Form ที่กำลังเปิดอยู่
ถามไว้ที่
http://www.helptalk.net/forums/access/messages/110358.html

David เข้ามาตอบว่า
You could always put the control name in the ControlTip Text.

ผมเลยลองทำเป็น code ออกมาได้ดังนี้

Private Sub Form_Load()

Dim ctl As Control

For Each ctl In Me.Controls
ctl.ControlTipText = ctl.Name
Next ctl

End Sub

ลองนำไปประยุกต์ใช้ดูนะครับ



1 Reply in this Topic. Dispaly 1 pages and you are on page number 1

1 @R06488
   
@ ประกาศใช้งานเว็บบอร์ดใหม่ => บอร์ดเรียนรู้ Access สำหรับคนไทย
แล้วจะใส่ลิ้งอ้างอิงมาที่โพสต์เก่านี้หรือไม่ก็ตามสะดวกครับ
Time: 0.0438s