Samuel
Samuel

Reputation: 18586

Visual Basic : Window size seems wrong

I have an annoying problem: we're supposed to write a small game for university in visual basic, now my gamefield consists of 7x6 circles, so it has six rows. Between every circle there is certain spacing. Now i set the windows size to rows*(circleSize + circleSpacing) - circleSpacing. With a size of 100 and a spacing of 50 this gives me a total size of 850, and when i ask for Me.size.height it says: 850, but the window cuts of about 25-30 pixels on the bottom, why is that? I made a button with a size of 840x840 and location 0x0, and it is not fully displayed although the height of the window is 850...?

I'm very new to VB, so might be doing something wrong, but i can't figure out what. Any help is appreciated

Upvotes: 1

Views: 595

Answers (1)

Mike Caron
Mike Caron

Reputation: 14561

The frame around the window is included in the Size property. Set the ClientSize property instead

Upvotes: 4

Related Questions