Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unit ASTopicSelectionUnit;
- interface
- uses
- Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
- Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
- type
- TfrmASTopicSelect = class(TForm)
- lblTopics: TLabel;
- btnMitosis: TButton;
- btnExit: TButton;
- procedure btnExitClick(Sender: TObject);
- procedure btnMitosisClick(Sender: TObject);
- procedure FormCreate(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- frmASTopicSelect: TfrmASTopicSelect;
- implementation
- {$R *.dfm}
- Uses
- MitosisQuestionsUnit , StudentMenuUnit;
- //Close the form - goes to student menu:
- procedure TfrmASTopicSelect.btnExitClick(Sender: TObject);
- begin
- frmASTopicSelect.Close;
- frmStudentMenu.Show;
- end;
- procedure TfrmASTopicSelect.btnMitosisClick(Sender: TObject);
- begin
- //open mitosis questions:
- frmMitosisQuestions.Show;
- frmASTopicSelect.Hide;
- //Reset the radio group selections:
- frmMitosisQuestions.rgrpQuestion1.ItemIndex := -1;
- frmMitosisQuestions.rgrpQuestion2.ItemIndex := -1;
- frmMitosisQuestions.rgrpQuestion3.ItemIndex := -1;
- frmMitosisQuestions.rgrpQuestion4.ItemIndex := -1;
- frmMitosisQuestions.btnSubmit.Enabled := True;
- //make the answers invisible
- frmMitosisQuestions.lblAnswer1.Visible := False;
- frmMitosisQuestions.lblAnswer2.Visible := False;
- frmMitosisQuestions.lblAnswer3.Visible := False;
- frmMitosisQuestions.lblAnswer4.Visible := False;
- end;
- procedure TfrmASTopicSelect.FormCreate(Sender: TObject);
- begin
- //disables close button (top-right corner):
- EnableMenuItem( GetSystemMenu( handle, False ),SC_CLOSE, MF_BYCOMMAND or MF_GRAYED );
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement