Advertisement
Advertisement
There are currently no qualifying experts in Game Programming UI
| 01.24.2008 at 07:56PM PST, ID: 23110124 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: |
Public Class FrmMain
Private Const intNumSpaces As Int16 = 9
Private Const intSpacePerRow As Int16 = 3
Private Const intxHeight As Int16 = 122
Private Const intxWidth As Int16 = 115
Private Const intMargin As Int16 = 20
Private Const intLabelHeight As Int16 = 23
Private titleBarHeight As Int16
Private Sub FrmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim intBorderWidth As Int16 = (Me.Width - Me.ClientSize.Width) / 2
titleBarHeight = Me.Height - Me.ClientSize.Height - 2 * intBorderWidth
'set height and width of form
Me.Height = Math.Ceiling(intNumSpaces / intSpacePerRow) * (intxHeight _
+ intLabelHeight) + intMargin + titleBarHeight + 2 * intBorderWidth
Me.Width = intSpacePerRow * (intxWidth + intLabelHeight) + intMargin + 2 * intBorderWidth
'center form
Me.Left = (My.Computer.Screen.WorkingArea.Width - Me.Width) / 2
Me.Top = (My.Computer.Screen.WorkingArea.Height - Me.Height) / 2
Dim i As Int16
'loop through chairs
For i = 0 To intNumSpaces - 1
Dim seat As New PictureBox
seat.Parent = Me
seat.Left = (i Mod intSpacePerRow) * (intxWidth + intLabelHeight) + intMargin
seat.Top = (i \ intSpacePerRow) * (intxHeight + intLabelHeight) + intMargin
seat.Height = intxHeight
seat.Width = intxWidth
seat.Image = Image.FromFile("..\..\images\x.jpg")
seat.Name = (i + 1).ToString
seat.Tag = ""
Next
End Sub
Private Sub XO_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim p As PictureBox
p = CType(sender, PictureBox)
End Sub
End Class
|