Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form Location not working
Message
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
00812222
Message ID:
00812233
Views:
13
Hi Jim,

In addition to setting the Location property of the form, make sure you also set the StartPosition property of the form to FormStartPosition.Manual.


>I want to create a form at a specific location.
>Here is the code I am using, but the form does not show at the location I spoecified?
>
>
Dim xBalloon As Integer
>Dim yBalloon As Integer
>xBalloon = 0
>yBalloon = 192
>
>' create a form
>Dim frm As Form
>frm = New Form()
>frm.Size = New Size(200, 100)
>frm.Location = New Point(xBalloon, yBalloon)
>
>' create a label for the form
>Dim lbl As Label
>lbl = New Label()
>lbl.Text = Field.HelpText
>lbl.Location = New Point(10, 10)
>
>' add the label to the forms control collection
>frm.Controls.Add(lbl)
>frm.ShowDialog()
>
>But it does not seem to take the frm.location settings.
>What am I doing wrong?
>thanks in advance.
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform