Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - How can i get the position of buttom
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How can i get the position of buttom

 Post Reply Post Reply
Author
Message
csfishy View Drop Down
Newbie
Newbie


Joined: 06 November 2013
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote csfishy Quote  Post ReplyReply Direct Link To This Post Topic: How can i get the position of buttom
    Posted: 06 November 2013 at 2:48am
hello, i would like to ask a question, anybody can help me?

i can use ToolBar.GetWindowRect(... to get the toolbar position relative to screen,
but how can i get the position of single button control?

e.g.
Set Control = ToolBar.Controls.Find(xtpControlButton, ID_Tool_help, False, -1  )
how to get the "Control" position?
Back to Top
Micca View Drop Down
Groupie
Groupie


Joined: 26 November 2008
Status: Offline
Points: 22
Post Options Post Options   Thanks (1) Thanks(1)   Quote Micca Quote  Post ReplyReply Direct Link To This Post Posted: 23 April 2015 at 6:19am
How to get the absolute screen position of a toolbar control:

Dim L1 As Long, R1 As Long, T1 As Long, B1 As Long
Dim L2 As Long, R2 As Long, T2 As Long, B2 As Long
Dim ControlLeft as Long, ControlTop as Long

Control.Parent.GetWindowRect L1, T1, R1, B1
Control.GetRect L2, T2, R2, B2

ControlLeft = L1 + L2
ControlTop= T1 + T2
Micca

---------------------

Product: Xtreme Commandbars (ActiveX) Version 17.2

Platform: Win7 64bit

Language: Visual Basic 6.0 SP6
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.