window centering
window centering
window centering
window centering
window centering
window centering window centering window centering window centering window centering window centering window centering window centering
window centering window centering
window centering
Go Back  Xtreme Visual Basic Talk > > > window centering


Reply
 
Thread Tools Display Modes
  #1  
Old 06-27-2010, 02:22 PM
daltman1967 daltman1967 is offline
Newcomer
 
Join Date: Jun 2010
Posts: 1
Default window centering


I have a very specific question about a very specific piece of code. I downloaded this Reversi game from the web. I'm modifying it to my own uses. I've found where to put the 'Me.StartPosition = FormStartPosition.CenterScreen' for the two forms in the program. However, I can't figure out how to center the main screen.

The first screen pops up fine, centered. When you go to game-> play, THAT screeen comes up centered. It is when you click 'start' that the game isn't centering. I've no idea how to get this thing centered. Any help?

The .zip file is attached.
Attached Files
File Type: zip Reversi.zip (605.3 KB, 1 views)
Reply With Quote
  #2  
Old 06-27-2010, 09:03 PM
vb5prgrmrwindow centering vb5prgrmr is offline
Senior Contributor

* Expert *
 
Join Date: Mar 2009
Posts: 1,087
Default

Two ways, in design mode goto startup position in properties and select center owner or in form load...
Code:
Me.Left = (Screen.Width / 2) - (Me.Width / 2)
Me.Top = (Screen.Height / 2) - (Me.Height / 2)


Good Luck
__________________
Just because I'm an expert does not mean I know it all and just because I know it all does not mean I'm an expert
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
window centering
window centering
window centering window centering
window centering
window centering
window centering window centering window centering window centering window centering window centering window centering
window centering
window centering
 
window centering
window centering
 
-->