OOP 1 (Object Oriented Programming) Rahmadi, SE
OOP 1 (Object Oriented Programming) Rahmadi, SE
3.Coding Program:
3.1.Form Menu
procedure Tform_menu.FormCreate(Sender: TObject);
begin
AnimateWindow(Self.Handle,999,AW_HOR_POSITIVE or AW_ACTIVATE);
end;
3.2.Form Elips
procedure TForm_Elips.FormCreate(Sender: TObject);
begin
//code untuk animasi form
Setwindowrgn(form_elips.handle, CreateEllipticrgn(0,0, width, height), true);
horzscrollbar.Visible:=false;
vertscrollbar.Visible:=false;
//code untuk stringgrid
StringGrid1.DefaultRowHeight:=ComboBox1.Height;
//isi combobox
combobox1.Items.Clear;
combobox1.Items.Add('01');
combobox1.Items.Add('02');
combobox1.Items.Add('03');
combobox1.Items.Add('04');
combobox1.Items.Add('05');
combobox1.Items.Add('06');
combobox1.Items.Add('07');
combobox1.Items.Add('08');
combobox1.Items.Add('09');
combobox1.Items.Add('10');
end;
With ComboBox1 do
Begin
Visible:=False;
R.TopLeft:=Form_Elips.ScreenToClient(StringGrid1.ClientToScreen(R.TopLeft));
R.BottomRight:=Form_Elips.ScreenToClient
(StringGrid1.ClientToScreen(R.BottomRight));
SetBounds(R.Left, R.Top, R.Right-R.Left, R.Bottom-R.top);
End;
With StringGrid1 do
If (TopRow<=Row) and (TopRow+VisibleRowCount>Row) then Combobox1.Show;
End;
4. Project Manager