Jump to content

NanoVengeance

Member
  • Posts

    4
  • Joined

  • Last visited

Awards

This user doesn't have any awards

1 Follower

About NanoVengeance

  • Birthday Dec 19, 1992

Contact Methods

  • Xbox Live
    NanoVengeance

Profile Information

  • Gender
    Male
  • Location
    Northern Ireland
  • Interests
    Gaming, Computers, programming, web development
    football, rugby
  • Occupation
    student

NanoVengeance's Achievements

  1. sorry for the late reply been busy with assignments and have gotten pretty far now and have it mostly working just need to test it and check all the different options to see if there is any bugs i've made everything into a module and then just calling it when they press the finish button was struggling for ages and then when i actually got it to work i looked at it n thought that is so easy how did i not even figure this out ages ago lol just thought i would show my code and let people have a look, and in case there is something that is wrong or could be changed Module Module1 Public TotalScore As Integer = 0 Public TotalAttempts As Integer = 0 Public Response As Integer Public Sub OpenForm(QForm As Form) 'PURPOSE: Opens a VB form 'INPUT: VB form passed as an argument 'PROCESS: Does not process any data 'OUTPUT: Does not return any output QForm.Show() 'Opens Form End Sub Public Sub RadioButtonCheck(RadioButtonTrue As Integer, RadioButtonFalse As Integer) If PopUpBox(MessageBoxButtons.OKCancel) Then FrmMain.LblAttempts.Text = TotalAttempts 'displays the attempts in Label attempts on FrmMain End If If RadioButtonTrue = True Then FrmMain.LblScore.Text = TotalScore End If If RadioButtonFalse = True Then 'Do Nothing End If End Sub Public Sub RadioButtonSelect(RadioButtonTrue1 As Integer, RadioButtonTrue2 As Integer, RadioButtonFalse1 As Integer, RadioButtonFalse2 As Integer) If RadioButtonTrue1 = True And RadioButtonTrue2 = True Then SetScore() FrmMain.LblScore.Text = TotalScore End If If RadioButtonFalse1 = True And RadioButtonFalse2 = True Then 'Do Nothing End If If PopUpBox(MessageBoxButtons.OKCancel) Then SetAttempts() 'if button ok then do following code FrmMain.LblAttempts.Text = TotalAttempts 'displays the attempts in Label attempts on FrmMain End If End Sub Public Function PopUpBox(MessageBoxButtons As MessageBoxButtons) Response = MessageBox.Show("Are you sure you want to continue?", "WARNING", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) If Response = 2 Then End If If Response = 1 Then SetScore() SetAttempts() End If 'MsgBox(Response) used to test to return what vbOK and vbCancel value is Return Response End Function Public Sub ToolStripVisible(TStrip As ToolStripMenuItem) TStrip.Visible = False End Sub Public Sub SetScore() TotalScore += 1 'Updates score on FrmMain in the label End Sub Public Sub SetAttempts() TotalAttempts += 1 'Updates TotalAttempts on FrmMain in the label End Sub Public Sub CloseForm(CForm As Form) 'System.Threading.Thread.Sleep(500) 'System.Threading.Thread.Sleep(1000) makes the form sleep for half Sec before the form will close CForm.Close() 'Closes the Form that has focus End SubEnd Module
  2. nope that doesn't work at the minute I've got Public Function RadioButtonChecked(RdbMathQ1True, RdbMathQ1False) End Function think this is true because I need it to return a value to show what radio button has been checked
  3. thanks ummm how would I do that? where all still learning and im trying to stay a head of everyone haha just trying to figure out how I can write a public function of public sub to check which radio button has been checked on the form and then make it be able to tell which is the correct answer and update the score but first of all I need to figure out how I can get which radio button has been checked
  4. Hi just new to this website i'm currently a student and I'm doing an assignment and i'm trying to figure out how I can get what radiobutton has been checked i'm trying to make this in a module so I can use it over again without having to write raw code all the time the assignment is for young children to create a programme that has 9 questions and they all have radio buttons, some forms have more than 2 radio buttons but when they check the correct radio button and continue I want there score to go up by one i'm just having trouble making a function that checks which radiobutton is checked and to check if it's the correct answer and then to increment the score by 1 if someone could help me on this it would be great thanks :-)
×