none
Seperate form control RRS feed

  • Question

  • Hello I am using visual basic language within Windows Application Form. I have a form that leads me to my very basic game, the game itself and then i have another form which i want to display the computers score and humans score. My question is simply how can i make it so when my third form is shown it shows the score of the computer and human? (P.S i am showing the scores of the computer and human within the game itself through labels).
    Wednesday, June 4, 2014 5:01 AM

Answers

  • Public Class Form1
        Private WithEvents tim As New Timer With {.Enabled = True}
        Private frm2 As New Form2
        Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
            frm2.Show()
        End Sub
    
        Private Sub tim_Tick(sender As Object, e As EventArgs) Handles tim.Tick
            frm2.Label1.Text = CStr(Now.Millisecond)
    
        End Sub
    End Class


    Success
    Cor

    Thursday, June 5, 2014 6:22 AM
  • Well at this moment in time i have it set so that when the esc key is pressed, it hides the game form and opens up the final one. The problem i am having is making the labels on my third form display what the labels on the previous form had had (the scores).

    All that i want to do is make it so when i press esc from my game i am brought to the final form where it will display to me the scores of the previous form that were shown in the labels.

     

    It seems possible, but we have not ever got any code or simple sample form you, how about we just share some words instead of some code and sample with you?

    1.

    >>The problem i am having is making the labels on my third form display what the labels on the previous form had had (the scores).<<

    Just use its form name like Form1.lable1.text

    2.

    >>All that i want to do is make it so when i press esc from my game i am brought to the final form where it will display to me the scores of the previous form that were shown in the labels.<<

    Just confused, did that game coded by yourself? mind sharing it with us? Or just a screenshot.


    remember make the reply as answer and vote the reply as helpful if it helps.

    Thursday, June 5, 2014 6:24 AM

All replies

  • Can you make it clear what feature or forms you have done and what feature you want?  do you ask how computer scores and human scores can be sent to your third form? That will depends on if your game is in same process as the windows forms. If yes, set application setting would fit your goal.

    Remember to mark reply as answer if it answers the question.
    Apps Request

    Wednesday, June 4, 2014 5:21 AM
  • Well at this moment in time i have it set so that when the esc key is pressed, it hides the game form and opens up the final one. The problem i am having is making the labels on my third form display what the labels on the previous form had had (the scores).

    All that i want to do is make it so when i press esc from my game i am brought to the final form where it will display to me the scores of the previous form that were shown in the labels.

     
    Wednesday, June 4, 2014 6:08 AM
  • Hi there,

    I involved VB expert to further look at this issue. I am moving your thread into the Visual Basic Forum for dedicated support. Thanks for your understanding.

    Best Regard,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, June 5, 2014 5:53 AM
  • Public Class Form1
        Private WithEvents tim As New Timer With {.Enabled = True}
        Private frm2 As New Form2
        Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
            frm2.Show()
        End Sub
    
        Private Sub tim_Tick(sender As Object, e As EventArgs) Handles tim.Tick
            frm2.Label1.Text = CStr(Now.Millisecond)
    
        End Sub
    End Class


    Success
    Cor

    Thursday, June 5, 2014 6:22 AM
  • Well at this moment in time i have it set so that when the esc key is pressed, it hides the game form and opens up the final one. The problem i am having is making the labels on my third form display what the labels on the previous form had had (the scores).

    All that i want to do is make it so when i press esc from my game i am brought to the final form where it will display to me the scores of the previous form that were shown in the labels.

     

    It seems possible, but we have not ever got any code or simple sample form you, how about we just share some words instead of some code and sample with you?

    1.

    >>The problem i am having is making the labels on my third form display what the labels on the previous form had had (the scores).<<

    Just use its form name like Form1.lable1.text

    2.

    >>All that i want to do is make it so when i press esc from my game i am brought to the final form where it will display to me the scores of the previous form that were shown in the labels.<<

    Just confused, did that game coded by yourself? mind sharing it with us? Or just a screenshot.


    remember make the reply as answer and vote the reply as helpful if it helps.

    Thursday, June 5, 2014 6:24 AM