Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unit A2TopicSelectionUnit;
- interface
- uses
- Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
- Vcl.Controls, Vcl.Forms, Vcl.Dialogs , Vcl.StdCtrls;
- type
- TfrmA2TopicSelect = class(TForm)
- lblTopics: TLabel;
- btnRespiration: TButton;
- btnPhotosynthesis: TButton;
- btnExit: TButton;
- procedure btnExitClick(Sender: TObject);
- procedure btnRespirationClick(Sender: TObject);
- procedure btnPhotosynthesisClick(Sender: TObject);
- procedure FormCreate(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- frmA2TopicSelect: TfrmA2TopicSelect;
- implementation
- Uses
- RespirationQuestionsUnit , PhotosynthesisQuestionsUnit, StudentMenuUnit;
- {$R *.dfm}
- procedure TfrmA2TopicSelect.btnPhotosynthesisClick(Sender: TObject);
- begin
- //open phtotosynthesis questions:
- frmPhotosynthesisQuestions.Show;
- frmA2TopicSelect.Hide;
- //set the font colour to black for each missing word in photosyntheis questions
- frmPhotosynthesisQuestions.edtMissingWord1.Font.Color := clBlack;
- frmPhotosynthesisQuestions.edtMissingWord2.Font.Color := clBlack;
- frmPhotosynthesisQuestions.edtMissingWord3.Font.Color := clBlack;
- frmPhotosynthesisQuestions.edtMissingWord4.Font.Color := clBlack;
- frmPhotosynthesisQuestions.edtMissingWord5.Font.Color := clBlack;
- //setting the missing words to blank in photosyntheis questions
- frmPhotosynthesisQuestions.edtMissingWord1.Text := '';
- frmPhotosynthesisQuestions.edtMissingWord2.Text := '';
- frmPhotosynthesisQuestions.edtMissingWord3.Text := '';
- frmPhotosynthesisQuestions.edtMissingWord4.Text := '';
- frmPhotosynthesisQuestions.edtMissingWord5.Text := '';
- //enable the 'Submit Answers' button:
- frmPhotosynthesisQuestions.btnAnswers.Enabled := True;
- end;
- procedure TfrmA2TopicSelect.btnRespirationClick(Sender: TObject);
- begin
- frmRespirationQuestions.Show;
- frmA2TopicSelect.Hide;
- end;
- procedure TfrmA2TopicSelect.FormCreate(Sender: TObject);
- begin
- //disables close button (top-right corner):
- EnableMenuItem( GetSystemMenu( handle, False ),SC_CLOSE, MF_BYCOMMAND or MF_GRAYED );
- end;
- //close form - goes back to student menu:
- procedure TfrmA2TopicSelect.btnExitClick(Sender: TObject);
- begin
- frmA2TopicSelect.Close;
- frmStudentMenu.Show;
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement