Sub ConvertStringCoordinate(Container As Panel, Value As String) As Int
Dim Result As Float
Value = Value.ToLowerCase
If Value.Contains("%x") Then
Result = Value.SubString2(0, Value.IndexOf("%x"))
Result = Container.Width * (Result / 100)
Else If Value.Contains("%y") Then
Result = Value.SubString2(0, Value.IndexOf("%y"))
Result = Container.Height * (Result / 100)
Else
Result = Value
End If
Return Result
End Sub