unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, Menus, XPMan, ComCtrls, StdCtrls, Buttons, jpeg, IniFiles,
LMDOneInstance, LMDUtils, LMDCustomControl,
LMDCustomPanel, LMDCustomBevelPanel, LMDCustomParentPanel,
LMDCustomGroupBox, LMDGroupBox, LMDIniCtrl, LMDApplicationCtrl,
LMDControl, LMDBaseControl, LMDBaseGraphicControl, LMDGraphicControl,
LMDBaseImage, LMDCustomLImage, LMDLImage, LMDBaseController,
LMDCustomContainer, LMDCustomImageList, LMDImageListConnector, ImgList,
LMDClock, LMDImageList, LMDCustomButton, LMDButton, LMDClass,
RichEdit, Clipbrd, LMDCustomStatusBar, LMDStatusBar, LMDWndProcComponent,
LMDFormStyler, LMDCustomComponent;
type
TForm1 =
class(TForm)
PopupMenu1: TPopupMenu;
PageControl1: TPageControl;
TabSheet1: TTabSheet;
TabSheet2: TTabSheet;
Panel1: TPanel;
Image1: TImage;
Label1: TLabel;
GroupBox1: TGroupBox;
GroupBox2: TGroupBox;
RichEdit1: TRichEdit;
RichEdit2: TRichEdit;
GroupBox4: TGroupBox;
GroupBox3: TGroupBox;
TL_V_DREHZAHL: TLabel;
TL_V_VC: TLabel;
TL_V_VORSCHUB: TLabel;
TL_V_REFPUNKT: TLabel;
TL_V_VERSATZ: TLabel;
TL_V_BREITE: TLabel;
TL_V_AUFMASS: TLabel;
TL_V_TEILE: TLabel;
TL_V_UEBERWACHUNG: TLabel;
TL_V_MATERIAL: TLabel;
TL_VS: TLabel;
TL_VQ: TLabel;
TE_V_DREHZAHL: TEdit;
TE_V_VC: TEdit;
TE_V_VORSCHUB: TEdit;
TE_V_REFPUNKT: TEdit;
TE_V_VERSATZ: TEdit;
TE_V_BREITE: TEdit;
TE_V_AUFMASS: TEdit;
TE_V_TEILE: TEdit;
TE_V_UEBERWACHUNG: TEdit;
TE_V_MATERIAL: TEdit;
TE_VS: TEdit;
TE_VQ: TEdit;
Panel3: TPanel;
LMDOneInstance1: TLMDOneInstance;
Panel4: TPanel;
TL_V_AUSSPANN: TLabel;
TL_VE: TLabel;
TL_VZ: TLabel;
TE_V_AUSSPANN: TEdit;
TE_VE: TEdit;
TE_VZ: TEdit;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
XPManifest1: TXPManifest;
TL_VA: TLabel;
TE_VA: TEdit;
BB_V_REFPUNKT: TBitBtn;
TE_V_ANSCHLAG: TEdit;
TL_V_ANSCHLAG: TLabel;
TL_VX: TLabel;
TE_VX: TEdit;
BB_M27: TBitBtn;
LMDImageList1: TLMDImageList;
BB_V_MATERIAL: TBitBtn;
Timer1: TTimer;
StatusBar1: TStatusBar;
procedure FormDestroy(Sender: TObject);
procedure FormKeyDown(Sender: TObject;
var Key: Word; Shift: TShiftState);
procedure Vorschau(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure LMDOneInstance1Custom(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
procedure EditKommaExit(Sender: TObject);
procedure EditNumerischKeyPress(Sender: TObject;
var Key: Char);
procedure EditEnter(Sender: TObject);
procedure BB_V_REFPUNKTClick(Sender: TObject);
procedure TE_V_TEILEExit(Sender: TObject);
procedure BB_V_REFPUNKTEnter(Sender: TObject);
procedure BB_V_REFPUNKTExit(Sender: TObject);
procedure BB_M27Click(Sender: TObject);
procedure BB_M27Enter(Sender: TObject);
procedure BB_M27Exit(Sender: TObject);
procedure BitBtn1Enter(Sender: TObject);
procedure BitBtn2Enter(Sender: TObject);
procedure PageControl1Enter(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure BB_V_MATERIALClick(Sender: TObject);
procedure BB_V_MATERIALEnter(Sender: TObject);
procedure TE_V_DREHZAHLExit(Sender: TObject);
procedure PageControl1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
private
{ Private-Deklarationen }
procedure WMEXITSIZEMOVE(
var Msg : TWMSIZE);
message WM_EXITSIZEMOVE;
svWndProc : TWndMethod;
procedure NewWndProc (
var aMessage: TMessage);
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
M27, Maschinenauswahl: Boolean;
R: Integer;
V_ANSCHLAG, V_DREHZAHL, V_VC, V_VORSCHUB, V_REFPUNKT, V_VERSATZ, V_BREITE:
String;
V_AUFMASS, V_TEILE, V_UEBERWACHUNG, V_MATERIAL, VS, VQ:
String;
V_AUSSPANN, VE, VZ, VA, VX, HUB, Ini_Name:
String;
V_WKSTLAENGE, V_HUBZUGABE, Maschtyp:
String;
K1, K2:
String;
aktControl:
String;
implementation
uses Unit2, Unit3, Unit4, MTRMethoden;
{$R *.dfm}
procedure TForm1.WMEXITSIZEMOVE(
var Msg: TWMSIZE);
var
minhoehe: Integer;
begin
BitBtn1.Top := ClientHeight - BitBtn1.Height - StatusBar1.Height - R * 2;
BitBtn2.Top := BitBtn1.Top;
PageControl1.Height := BitBtn1.Top - PageControl1.Top - R;
Label1.Top := TabSheet1.Height - R - Label1.Height;
Image1.Height := Label1.Top - R - Image1.Top;
Image1.Width := Image1.Height;
GroupBox3.Left := Image1.Left + Image1.Width + R;
GroupBox4.Left := GroupBox3.Left;
PageControl1.Width := GroupBox3.Left + GroupBox3.Width + Image1.Left
+ ( PageControl1.Width - TabSheet1.Width );
minhoehe := GroupBox4.Top + GroupBox4.Height + Label1.Height * 5
+ BitBtn1.Height;
if ClientHeight < minhoehe
then
begin
ClientHeight := minhoehe;
SendMessage(self.Handle, WM_EXITSIZEMOVE, 0, 0);
end;
if ClientHeight > Screen.WorkAreaHeight
then
begin
ClientHeight := minhoehe;
SendMessage(self.Handle, WM_EXITSIZEMOVE, 0, 0);
end;
ClientWidth := PageControl1.Left + PageControl1.Width + PageControl1.Left;
BitBtn1.Left := ClientWidth
div 4 - BitBtn1.Width
div 2;
BitBtn2.Left := ClientWidth
div 4 * 3 - BitBtn2.Width
div 2;
//Vorschaubereich
GroupBox1.Left := R; GroupBox1.Top := R;
GroupBox1.Height := TabSheet2.Height - GroupBox1.Top - R;
GroupBox2.Top := GroupBox1.Top;
GroupBox2.Height := GroupBox1.Height;
GroupBox1.Width := TabSheet2.Width
div 2 - 2 * GroupBox1.Left;
GroupBox2.Width := GroupBox1.Width;
GroupBox2.Left := TabSheet2.Width
div 2 + GroupBox1.Left;
Left := Screen.WorkAreaWidth
div 2 - Width
div 2;
Top := Screen.WorkAreaHeight
div 2 - Height
div 2;
end;
procedure TForm1.NewWndProc (
var aMessage: TMessage);
begin
if ((aMessage.Msg = CN_KEYDOWN)
and (aMessage.WParam = 13))
then aMessage.WParam := 9;
svWndProc (aMessage);
end;