Community of MapPoint and Virtual Earth Users and Developers
This is a discussion on Alignment of the control on my form within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi all, if the user maximizes the form, the mapcontrol stays the same size. I want to align the control ...
| |||||||
| Today's Posts | Twitter Feed | Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Alignment of the control on my form if the user maximizes the form, the mapcontrol stays the same size. I want to align the control on the form. How to do this. In Delphi this would be Alignment Client. How to do this in VB with the MapPoint Control? Thanks Peter |
| |||
| Alignment of the control on my form
Assuming that you have a Mappoint Control MPCtl1 on your form and you want the control to fill the entire screen, you could do the following with Visual Basic: Code: Private Sub Form_Resize()
Dim reEntered as Boolean
'Prevent error message when resizing to negative value
If reEntered or Me.WindowState = vbMinimized Then Exit Sub
reEntered = true
MPCtl1.Width = Me.ScaleWidth
MPCtl1.Left = Me.ScaleLeft
MPCtl1.Height = Me.ScaleHeight
MPCtl1.Top = Me.ScaleTop
End Sub
Code: Dim vPad as Long vPad = 40 'vertical padding between controls MPCtl1.Top = Combo1.Top + Combo1.Height + vPad MPCtl1.Left = Me.ScaleLeft MPCtl1.Width = Me.ScaleWidth . . . |
| |||
| Sorry, forgot to post
Hi all, hi Guest, yep, that's what I did. Forgot to post the solution.Sorry for that . I found it in a vb forum, of course. Here's exactly my code for Form_resize: Form_Main.MappointControl1.Width = Me.ScaleWidth Form_Main.MappointControl1.Height = Me.ScaleHeight Thanks, Peter |
![]() |
| Tags |
| alignment, control, form |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| summary to access form help please | nmilne | MapPoint 2006/2009 Discussion | 3 | 01-15-2006 03:22 PM |
| How can I use the Symbols (i.e. car) on a VB form? | Anonymous | MapPoint 2006/2009 Discussion | 1 | 03-01-2005 01:23 PM |
| the map is empty after Show/Hide form with MapPoint control | Anonymous | MapPoint 2006/2009 Discussion | 1 | 03-25-2004 03:24 PM |
| MapPoint Control align in Form | blackmap | MapPoint 2006/2009 Discussion | 0 | 02-06-2003 10:26 AM |
| MapPoint OCX control does not work on a .Net MDI form. | clackclack | MapPoint 2006/2009 Discussion | 5 | 12-05-2002 11:17 PM |
Costa Brava Holiday
Beautiful kilometres of sandy beaches await you should you choose a Costa Brava holiday through UlookUbook!