View Single Post
  #1 (permalink)  
Old 02-12-2008, 12:40 PM
burd27 burd27 is offline
Junior Member
 
Join Date: Dec 2007
Posts: 27
Default Position TextBox or Button in centre of form

I have an app' that has an elongated screen size that progressively fills up with Text boxes (up to a prescibed limit of course). When the usable form size on the device need to show more that what the screen itself is able to show, then a Vertical scroll bar appears and the user can scroll down/up to the section wanted.

What I want to be able to do is in response to an event is to put a text box and/or button in the middle of the PDA screen, regardless where the form is vertcally. EG. Regardless of where the form is per the vertical scroll bar, a MsgBox alway appears in the centre of the screen. How can I acheive this with a button.

Please note, the mousedown event doesn't appear to be able to be used as the screen/form is covered with text boxes, so there is no form visible to capture the mousedown event.

I have experimented with capturing the position of the textboxes, but as the text box may be at the top or bottom of the screen, I cannot use this value as a reference to position someting in the middle of the screen - or can I?

Where does the MsgBox get its coordinates from to position itself correctly in the middle. Are they accessable and usable?

Thanks in advance.

Burd27
Reply With Quote