| Код | procedure TForm1.redrawrg(rg: TRadioGroup; btn, btn2: TButton; tag, tag2: integer); begin Form1.radiogroup1.visible:=false; Form1.radiogroup2.visible:=false; Form1.radiogroup3.visible:=false; Form1.groupbox1.visible:=false; Form1.groupbox2.visible:=false; Form1.groupbox3.visible:=false; Form1.groupbox4.visible:=false; Form1.groupbox5.visible:=false; Form1.groupbox6.visible:=false; Form1.groupbox7.visible:=false; Form1.groupbox8.visible:=false; Form1.groupbox9.visible:=false; Form1.groupbox10.visible:=false; Form1.chart1.visible:=false; Form1.Chart1.Series[1].Clear; Form1.Chart1.Series[2].clear;//здесь возникает ошибка Form1.Button1.Enabled:=false; Form1.Button2.Enabled:=false; rg.Visible:=true; rg.Left:=5; rg.Top:=5; btn.Tag:=tag; btn2.Tag:=tag2; btn.Left:=5; btn.Top:=rg.Height+rg.Top+5; btn2.Left:=rg.Width+rg.Left-btn2.Width; case tag of 1..10: btn.Enabled:=true; end; case tag2 of 2..14: btn2.Enabled:=true; end; form1.clientWidth:=rg.Width+rg.Left+5; form1.clientheight:=btn.Top+btn.height+5; end;
|
| Код | procedure TForm1.FormCreate(Sender: TObject); begin redrawrg(form1.radiogroup1, form1.button1, form1.button2, 1, 1); end;
|
выдает Access violation at address 00498C66 in module 'uravn.exe'. Read of address 00000003. странно, ведь объект существует. изза чего может вылезать эта ошибка? |