Hey Guys,

I am currently making a VB.net version of the Classic Ski Free at the moment. (which is going really well)

But I got a issue where I got a panel on the main form (the player movement area) and when I full screen the application obviously the panel stays in its original position. I would like to position it central to what the current resolution is.

Here is the basic code I am currently using to make the form Full Screen

Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
        Me.Size = SystemInformation.PrimaryMonitorSize
        Me.Location = New Point(0, 0)
        Me.TopMost = True

Can anyone help?

Thanks

Try this:

Panel1.Location = New Point((Me.ClientRectangle.Width - Panel1.Width) / 2, (Me.ClientRectangle.Height - Panel1.Height) / 2)

Hey Sorry for the late reply, been doing university work and been really busy, But thanks this code worked, thanks alot :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.