Joined: 24 Dec 2007 Posts: 2276 Location: Minnesota
Posted: Fri Jul 10, 2009 10:23 am Post subject: Circle Region Form VB.Net
Ok I am making a library that can change the form's shape and I have been able to do it but for some reason when other people run it the objects wont go to the right location. This is the code I use to make the form circle and move all the objects
What I think the problem is the screen resolutions... how can I make it work on all screens?
Code:
Private Sub Circle_Form_Init()
Me.Location = New System.Drawing.Point(0, 0)
For Each Object1 In Me.Controls
Object1.Location = New System.Drawing.Point(Object1.Location.X + Me.Width - (Object1.width / 1.25), Object1.Location.Y + Me.Height - (Object1.height))
Object1.Location = New System.Drawing.Point(Object1.Location.X * 2, Object1.Location.Y * 2)
For Each Object2 In Object1.controls
Object2.bringtoFront()
Next
Next
Me.Height *= 2
Me.Width *= 2
Dim shape As New System.Drawing.Drawing2D.GraphicsPath
shape.AddEllipse(0, 0, Me.Width, Me.Height)
Me.Region = New System.Drawing.Region(shape)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
End Sub
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum