Program HideVidomi; Uses Forms, HideVidomiUnit In 'HideVidomiUnit.pas' {Form1}, JobUnit1 In 'JobUnit1.pas' {Job}, GraphicFX In 'D:\Base\Programming\FromLaptop\GraphicFX\GraphicFX.pas', ConfigPictureUnit In 'ConfigPictureUnit.pas' {Form2}; {$R *.res} Begin Application.Initialize; Application.Title := 'Hide Vidomi'; Application.CreateForm(TForm1, Form1); Application.CreateForm(TJob, Job); Application.CreateForm(TForm2, Form2); Application.Run; End. (**************************************************************) (**************************************************************) (**************************************************************) (**************************************************************) Unit JobUnit1; Interface Uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, jpeg, Menus; Type TLabelArray = Array[1..9] Of TLabel; TJob = Class(TForm) Label1 : TLabel; Timer1 : TTimer; Label2 : TLabel; Label3 : TLabel; Label4 : TLabel; Label5 : TLabel; Label6 : TLabel; Timer2 : TTimer; Image1 : TImage; Label7 : TLabel; Label8 : TLabel; Label9 : TLabel; Label10 : TLabel; Procedure FormCreate(Sender : TObject); Procedure Timer1Timer(Sender : TObject); Procedure Timer2Timer(Sender : TObject); Procedure Image1Click(Sender : TObject); Procedure Image1MouseUp(Sender : TObject; Button : TMouseButton; Shift : TShiftState; X, Y : Integer); End; TCharArray = Array[0..260] Of Char; Var Job : TJob; ParentHandle, TestHand : THandle; AllowMove : Boolean; Labels : TLabelArray; MaxX, MaxY : Integer; Implementation Uses HideVidomiUnit, GraphicFX; {$R *.dfm} Function FindWindowEXNumber(Parent, Child : THandle; ClassName, WindowName : PChar; Depth : Integer) : THandle; Var Loop : Integer; Begin Result := Child; For loop := 1 To Depth Do Result := FindWindowEx(Parent, Result, 'Static', Nil); End; Procedure TJob.FormCreate(Sender : TObject); Begin Left := Screen.Width - Width; Top := Screen.Height - Height - 30; HideVidomiConfig.Apply; Image1.Picture.Bitmap.PixelFormat := pf24bit; ParentHandle := FindWindow('#32770', 'Vidomi Statistics'); SetWindowLong(Application.Handle, GWL_EXSTYLE, GetWindowLong(Application.Handle, GWL_EXSTYLE) Or WS_EX_TOOLWINDOW); BorderStyle := bsNone; FormStyle := fsStayOnTop; Label2.top := Label1.top + label1.Height + HideVidomiConfig.Spacing; Label3.top := Label2.top + label1.Height + HideVidomiConfig.Spacing; Label4.top := Label3.top + label1.Height + HideVidomiConfig.Spacing; Label5.top := Label4.top + label1.Height + HideVidomiConfig.Spacing; Label6.top := Label5.top + label1.Height + HideVidomiConfig.Spacing; Label7.top := Label6.top + label1.Height + HideVidomiConfig.Spacing; Label8.top := Label7.top + label1.Height + HideVidomiConfig.Spacing; Label9.top := Label8.top + label1.Height + HideVidomiConfig.Spacing; Timer1Timer(self); MaxX := Left; MaxY := Top; End; Function GetString(Number : Integer) : TcharArray; Begin TestHand := FindWindowEx(ParentHandle, 0, 'Static', Nil); TestHand := FindWindowExNumber(ParentHandle, TestHand, 'Static', Nil, Number); GetWindowText(TestHand, Result, 255); End; Procedure TJob.Timer1Timer(Sender : TObject); Begin Label1.Caption := ' Total Encode Time: ' + GetString(26) + ' '; Label2.Caption := ' Total Jobs: ' + GetString(20) + '/' + GetString(13) + ' '; Label3.Caption := ' Current Job: ' + GetString(24) + '.divx' + ' '; Label4.Caption := ' Pass Number: ' + GetString(3) + ' '; Label5.Caption := ' Percent of Pass Complete: ' + GetString(5) + ' '; Label6.Caption := ' Time on Current Job: ' + GetString(11) + ' '; Label7.Caption := ' Pass Time: ' + GetString(7) + ' '; Label8.Caption := ' Pass Remaining: ' + GetString(9) + ' '; Label9.Caption := ' Frames Per Second: ' + GetString(2) + ' ' + #13; // AutoSize := true; Image1.Align := alNone; Image1.Width := 1; Image1.Height := 1; Image1.Align := alClient; Label2.top := Label1.top + label1.Height + HideVidomiConfig.Spacing; Label3.top := Label2.top + label1.Height + HideVidomiConfig.Spacing; Label4.top := Label3.top + label1.Height + HideVidomiConfig.Spacing; Label5.top := Label4.top + label1.Height + HideVidomiConfig.Spacing; Label6.top := Label5.top + label1.Height + HideVidomiConfig.Spacing; Label7.top := Label6.top + label1.Height + HideVidomiConfig.Spacing; Label8.top := Label7.top + label1.Height + HideVidomiConfig.Spacing; Label9.top := Label8.top + label1.Height + HideVidomiConfig.Spacing; End; Procedure TJob.Timer2Timer(Sender : TObject); Var MouseRect, ProgramRect, TempRect : TRect; Begin If Visible Then Begin MouseRect := Rect(Mouse.CursorPos.X, Mouse.CursorPos.Y, Mouse.CursorPos.X + 10, Mouse.CursorPos.y + 10); ProgramRect := Rect(Left, Top, Left + Width, Top + Height); If AllowMove Then Begin MaxY := Mouse.CursorPos.Y - (Height Div 2); MaxX := Mouse.CursorPos.X - (Width Div 2); End; If MaxY > Screen.Height - Height - 30 Then MaxY := Screen.Height - Height; If MaxY < 0 Then MaxY := 0; Top := MaxY; If MaxX < 0 Then MaxX := 0; If MaxX > (Screen.Width - Width) Then MaxX := Screen.Width - Width; Left := MaxX; If IntersectRect(TempRect, MouseRect, ProgramRect) Then Begin If AlphaBlendValue < 250 Then AlphaBlendValue := AlphaBlendValue + 10 Else AlphaBlendValue := 255; BringToFront; End Else Begin If form1.AutoFade1.Checked Then If AlphaBlendValue >= 10 Then AlphaBlendValue := AlphaBlendValue - 10; End; End; End; Procedure TJob.Image1Click(Sender : TObject); Begin Visible := False; // Timer2.Enabled := not Timer2.Enabled; End; Procedure TJob.Image1MouseUp(Sender : TObject; Button : TMouseButton; Shift : TShiftState; X, Y : Integer); Begin If button = mbLeft Then Image1Click(self); If button = mbright Then Begin AllowMove := Not AllowMove; Invert(Image1.Picture.Bitmap); Image1.Canvas.Draw(0, 0, Image1.Picture.Bitmap); End; End; End. (**************************************************************) (**************************************************************) (**************************************************************) (**************************************************************) (**************************************************************) Unit HideVidomiUnit; Interface Uses Windows, Messages, SysUtils, Forms, LMDTrayIcon, Menus, LMDCustomComponent, LMDWndProcComponent, StdCtrls, Controls, Classes, ExtCtrls, dialogs, Graphics, ExtDlgs, strutils; Type TForm1 = Class(TForm) LMDTrayIcon1 : TLMDTrayIcon; PopupMenu1 : TPopupMenu; Close1 : TMenuItem; Exit1 : TMenuItem; AutoFade1 : TMenuItem; FontDialog1 : TFontDialog; SetFontFormat1 : TMenuItem; OpenPictureDialog1 : TOpenPictureDialog; SetBackground1 : TMenuItem; EditPicture1 : TMenuItem; ColorDialog1 : TColorDialog; FineTuneFontColor1 : TMenuItem; N4 : TMenuItem; N3 : TMenuItem; SaveSettings1 : TMenuItem; SaveDialog1 : TSaveDialog; LoadSettings1 : TMenuItem; OpenDialog1 : TOpenDialog; SaveSettingsAsDefault1 : TMenuItem; N5 : TMenuItem; FullScreenMode1 : TMenuItem; Settings1 : TMenuItem; N6 : TMenuItem; N7 : TMenuItem; SaveLoad1 : TMenuItem; N8 : TMenuItem; SetTrayIcon1 : TMenuItem; OpenDialog2 : TOpenDialog; Procedure FormCreate(Sender : TObject); Procedure Close1Click(Sender : TObject); Procedure LMDTrayIcon1DblClick(Sender : TObject); Procedure ShowExport1Click(Sender : TObject); Procedure Exit1Click(Sender : TObject); Procedure LMDTrayIcon1MouseDown(Sender : TObject; Button : TMouseButton; Shift : TShiftState; X, Y : Integer); Procedure SetFontFormat1Click(Sender : TObject); Procedure SetBackground1Click(Sender : TObject); Procedure EditPicture1Click(Sender : TObject); Procedure FineTuneFontColor1Click(Sender : TObject); Procedure LoadSettings1Click(Sender : TObject); Procedure SaveSettings1Click(Sender : TObject); Procedure SaveSettingsAsDefault1Click(Sender : TObject); Procedure FullScreenMode1Click(Sender : TObject); Procedure SetTrayIcon1Click(Sender : TObject); End; THideVidomiConfig = Class Background, Icon : String; Spacing : Integer; Constructor Create; Procedure Apply; Procedure Load(Filename : String); Procedure Save(Filename : String); Private X, Y : Integer; Font : TFont; FileData : TStringList; LastData : String; Function CheckINI(ItemToFind, StringToFindIn : String) : String; End; Var Form1 : TForm1; ShowHide : Boolean; HideVidomiConfig : THideVidomiConfig; Implementation Uses JobUnit1, ConfigPictureUnit; {$R *.dfm} Function THideVidomiConfig.CheckINI(ItemToFind, StringToFindIn : String) : String; Begin If AnsiStartsText(ItemToFind, StringToFindIn) Then Result := copy(StringToFindIn, Length(ItemToFind) + 1, Length(StringToFindIn)) Else Result := ''; LastData := Result; End; Constructor THideVidomiConfig.Create; Begin Font := TFont.Create; FileData := TStringList.Create; If FileExists('Default.hvc') Then Load('Default.hvc') Else Begin If FileExists('Background.bmp') Then Background := 'Background.bmp'; Spacing := 0; Font.Color := clWindowText; Font.Size := 12; X := Screen.Width; Y := Screen.Height - 250; Icon := ''; End; End; Procedure THideVidomiConfig.Load(Filename : String); Var Loop : Integer; Begin If FileExists(Filename) Then Begin FileData.LoadFromFile(Filename); For loop := 0 To FileData.Count - 1 Do Begin If CheckINI('Background picture: ', FileData.Strings[Loop]) <> '' Then Background := LastData; If CheckINI('Font Name: ', FileData.Strings[Loop]) <> '' Then Font.Name := LastData; If CheckINI('Font Color: ', FileData.Strings[Loop]) <> '' Then Font.Color := StringToColor(LastData); If CheckINI('Font Size: ', FileData.Strings[Loop]) <> '' Then Font.Size := StrToInt(LastData); If CheckINI('X: ', FileData.Strings[Loop]) <> '' Then X := StrToInt(LastData); If CheckINI('Y: ', FileData.Strings[Loop]) <> '' Then Y := StrToInt(LastData); If CheckINI('Spacing: ', FileData.Strings[Loop]) <> '' Then Spacing := StrToInt(LastData); If CheckINI('Icon: ', FileData.Strings[Loop]) <> '' Then Icon := LastData; End; End; End; Procedure THideVidomiConfig.Save(Filename : String); Begin Font := Job.Label1.Font; X := Job.Left; Y := Job.Top; FileData.Clear; If Background <> '' Then FileData.Add('Background picture: ' + Background); If Icon <> '' Then FileData.Add('Icon: ' + Icon); FileData.Add('Font Name: ' + Font.Name); FileData.Add('Font Color: ' + ColorToString(Font.Color)); FileData.Add('Font Size: ' + IntToStr(Font.Size)); FileData.Add('X: ' + IntToStr(x)); FileData.Add('Y: ' + IntToStr(Y)); FileData.Add('Spacing: ' + IntToStr(Spacing)); FileData.SaveToFile(Filename); End; Procedure THideVidomiConfig.Apply; Begin Job.Label1.Font := Font; Job.Label2.Font := Font; Job.Label3.Font := Font; Job.Label4.Font := Font; Job.Label5.Font := Font; Job.Label6.Font := Font; Job.Label7.Font := Font; Job.Label8.Font := Font; Job.Label9.Font := Font; If Background <> '' Then If FileExists(background) Then job.Image1.Picture.LoadFromFile(background); Job.Image1.Picture.Bitmap.PixelFormat := pf24bit; Job.Top := y; Job.Left := x; End; Procedure TForm1.FormCreate(Sender : TObject); Begin ShowHide := True; LMDTrayIcon1DblClick(self); HideVidomiConfig := THideVidomiConfig.Create; End; Procedure TForm1.Close1Click(Sender : TObject); Begin ShowHide := False; Show; SendMessage(FindWindow('VidomiMainEncoderWindow', 'Vidomi Encoder'), WM_CLOSE, 0, 0); Close; End; Procedure ShowHideProc(WindowClass, WindowName : String); Var WindowHWND : HWND; Begin WindowHWND := FindWindow(PChar(WindowClass), PChar(WindowName)); If ShowHide Then ShowWindow(WindowHWND, SW_HIDE) Else ShowWindow(WindowHWND, SW_Show); End; Procedure TForm1.LMDTrayIcon1DblClick(Sender : TObject); Begin ShowHideProc('VidomiMainEncoderWindow', 'Vidomi Encoder'); ShowHideProc('#32770', 'Vidomi Statistics'); ShowHide := Not ShowHide; End; Procedure TForm1.ShowExport1Click(Sender : TObject); Begin ShowHide := False; ShowHideProc('#32770', 'Vidomi Statistics'); BringWindowToTop(FindWindow('#32770', 'Vidomi Statistics')); ShowHide := True; End; Procedure TForm1.Exit1Click(Sender : TObject); Begin Close; End; Procedure TForm1.LMDTrayIcon1MouseDown(Sender : TObject; Button : TMouseButton; Shift : TShiftState; X, Y : Integer); Begin If Not (Button = mbRight) Then Begin Job.Visible := Not job.Visible; job.AlphaBlendValue := 250; End; End; Procedure TForm1.SetFontFormat1Click(Sender : TObject); Begin FontDialog1.Font := Job.Label1.Font; If FontDialog1.Execute Then With job Do Begin Label1.Font := FontDialog1.Font; Label2.Font := FontDialog1.Font; Label3.Font := FontDialog1.Font; Label4.Font := FontDialog1.Font; Label5.Font := FontDialog1.Font; Label6.Font := FontDialog1.Font; Label7.Font := FontDialog1.Font; Label8.Font := FontDialog1.Font; Label9.Font := FontDialog1.Font; End; End; Procedure TForm1.SetBackground1Click(Sender : TObject); Begin If OpenPictureDialog1.Execute Then Begin Job.Image1.Picture.LoadFromFile(OpenPictureDialog1.FileName); Job.Image1.Picture.Bitmap.PixelFormat := pf24bit; HideVidomiConfig.Background := OpenPictureDialog1.FileName; ChDir(ExtractFileDir(ParamStr(0))); End; End; Procedure TForm1.EditPicture1Click(Sender : TObject); Begin Form2.Image1.Picture.Bitmap := Job.Image1.Picture.Bitmap; Form2.Image1.Width := Job.Image1.Width; Form2.Image1.Height := Job.Image1.Height; Form2.Edit1.Text := IntToStr(HideVidomiConfig.Spacing); Form2.Visible := True; End; Procedure TForm1.FineTuneFontColor1Click(Sender : TObject); Begin If ColorDialog1.Execute Then With job Do Begin Label1.Font.Color := ColorDialog1.Color; Label2.Font.Color := ColorDialog1.Color; Label3.Font.Color := ColorDialog1.Color; Label4.Font.Color := ColorDialog1.Color; Label5.Font.Color := ColorDialog1.Color; Label6.Font.Color := ColorDialog1.Color; Label7.Font.Color := ColorDialog1.Color; Label8.Font.Color := ColorDialog1.Color; Label9.Font.Color := ColorDialog1.Color; End; End; Procedure TForm1.LoadSettings1Click(Sender : TObject); Begin If OpenDialog1.Execute Then Begin HideVidomiConfig.Load(OpenDialog1.FileName); HideVidomiConfig.Apply; End; ChDir(ExtractFileDir(ParamStr(0))); End; Procedure TForm1.SaveSettings1Click(Sender : TObject); Begin If SaveDialog1.Execute Then HideVidomiConfig.Save(SaveDialog1.FileName); ChDir(ExtractFileDir(ParamStr(0))); End; Procedure TForm1.SaveSettingsAsDefault1Click(Sender : TObject); Begin HideVidomiConfig.Save('Default.hvc'); End; Procedure TForm1.FullScreenMode1Click(Sender : TObject); Begin If FullScreenMode1.Checked Then Begin Job.AutoSize := False; job.WindowState := wsMaximized; Job.Image1.AutoSize := False; Job.Image1.Align := alClient; ShowCursor(False); Job.AlphaBlend := False; End Else Begin Job.AutoSize := True; job.WindowState := wsNormal; Job.Image1.AutoSize := True; Job.Image1.Align := alNone; ShowCursor(True); Job.AlphaBlend := True; End; End; Procedure TForm1.SetTrayIcon1Click(Sender : TObject); Begin If OpenDialog2.Execute Then LMDTrayIcon1.Icon.LoadFromFile(OpenDialog2.FileName); ChDir(ExtractFileDir(ParamStr(0))); End; End. (**************************************************************) (**************************************************************) (**************************************************************) (**************************************************************) (**************************************************************) Unit ConfigPictureUnit; Interface Uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls, ComCtrls, GraphicFX, Spin; Type TForm2 = Class(TForm) TrackBar1 : TTrackBar; Label1 : TLabel; Button1 : TButton; Image1 : TImage; Label2 : TLabel; Button2 : TButton; Button3 : TButton; Button4 : TButton; Button5 : TButton; Button6 : TButton; Button7 : TButton; Timer1 : TTimer; Button8 : TButton; Button9 : TButton; Button10 : TButton; Button11 : TButton; Button12 : TButton; Button13 : TButton; SaveDialog1 : TSaveDialog; Button14 : TButton; Label3 : TLabel; Label4 : TLabel; Edit1 : TEdit; Button15 : TButton; UpDown1 : TUpDown; Button16 : TButton; Button17 : TButton; Procedure FormCreate(Sender : TObject); Procedure Button2Click(Sender : TObject); Procedure Button1Click(Sender : TObject); Procedure TrackBar1Change(Sender : TObject); Procedure Button3Click(Sender : TObject); Procedure Brightness; Procedure Red; Procedure Green; Procedure Blue; Procedure Button4Click(Sender : TObject); Procedure Button7Click(Sender : TObject); Procedure Button5Click(Sender : TObject); Procedure Timer1Timer(Sender : TObject); Procedure Button8Click(Sender : TObject); Procedure Button6Click(Sender : TObject); Procedure Button9Click(Sender : TObject); Procedure Button10Click(Sender : TObject); Procedure Button11Click(Sender : TObject); Procedure Button12Click(Sender : TObject); Procedure Button13Click(Sender : TObject); Procedure Button14Click(Sender : TObject); Procedure SpinEdit1Change(Sender : TObject); Procedure Edit1Change(Sender : TObject); Procedure Button15Click(Sender : TObject); Procedure UpDown1Click(Sender : TObject; Button : TUDBtnType); Procedure Button16Click(Sender : TObject); Procedure Button17Click(Sender : TObject); Private { Private declarations } Public { Public declarations } End; Var Form2 : TForm2; Mode : String; Implementation Uses JobUnit1, HideVidomiUnit; {$R *.dfm} Procedure TForm2.FormCreate(Sender : TObject); Begin Image1.Picture := Job.Image1.Picture; TrackBar1.Position := 0; Label2.Left := Job.Label1.Left + Image1.Left; Mode := 'Brightness'; End; Procedure TForm2.Button2Click(Sender : TObject); Begin If Mode = 'Brightness' Then Brightness Else If Mode = 'Red' Then Red Else If Mode = 'Green' Then Green Else If mode = 'Blue' Then blue; TrackBar1.Position := 0; Image1.Refresh; End; Procedure TForm2.Brightness; Var Amount : Integer; Begin Amount := TrackBar1.Position; If TrackBar1.Position > 0 Then Lighten(Image1.Picture.Bitmap, Amount) Else Darken(Image1.Picture.Bitmap, 0 - Amount); End; Procedure TForm2.Red; Var Amount : Integer; Begin Amount := TrackBar1.Position; If TrackBar1.Position > 0 Then LightenChannel(Image1.Picture.Bitmap, Amount, 3) Else DarkenChannel(Image1.Picture.Bitmap, 0 - Amount, 3); End; Procedure TForm2.Green; Var Amount : Integer; Begin Amount := TrackBar1.Position; If TrackBar1.Position > 0 Then LightenChannel(Image1.Picture.Bitmap, Amount, 2) Else DarkenChannel(Image1.Picture.Bitmap, 0 - Amount, 2); End; Procedure TForm2.Blue; Var Amount : Integer; Begin Amount := TrackBar1.Position; If TrackBar1.Position > 0 Then LightenChannel(Image1.Picture.Bitmap, Amount, 1) Else DarkenChannel(Image1.Picture.Bitmap, 0 - Amount, 1); End; Procedure TForm2.Button1Click(Sender : TObject); Begin Image1.Picture.LoadFromFile(HideVidomiConfig.Background); Image1.Picture.Bitmap.PixelFormat := pf24bit; End; Procedure TForm2.TrackBar1Change(Sender : TObject); Begin Label1.Caption := Mode + ': ' + IntToStr(TrackBar1.Position); End; Procedure TForm2.Button3Click(Sender : TObject); Begin Mode := 'Brightness'; Label1.Caption := Mode + ': ' + IntToStr(TrackBar1.Position); End; Procedure TForm2.Button4Click(Sender : TObject); Begin Mode := 'Red'; Label1.Caption := Mode + ': ' + IntToStr(TrackBar1.Position); End; Procedure TForm2.Button7Click(Sender : TObject); Begin Job.Image1.Picture.Bitmap := Image1.Picture.Bitmap; Visible := False; End; Procedure TForm2.Button5Click(Sender : TObject); Begin Mode := 'Green'; Label1.Caption := Mode + ': ' + IntToStr(TrackBar1.Position); End; Procedure TForm2.Timer1Timer(Sender : TObject); Begin With Label2 Do Begin Caption := Job.Label1.Caption; Font := Job.Label1.Font; Left := Job.Label1.Left + Image1.Left; Top := Job.Label1.Top + Image1.Top; End; With Label4 Do Begin Caption := Job.Label2.Caption; Font := Job.Label1.Font; Left := Job.Label2.Left + Image1.Left; Top := Job.Label2.Top + Image1.Top; End; End; Procedure TForm2.Button8Click(Sender : TObject); Begin Image1.Picture.Bitmap := job.Image1.Picture.Bitmap; End; Procedure TForm2.Button6Click(Sender : TObject); Begin Mode := 'Blue'; Label1.Caption := Mode + ': ' + IntToStr(TrackBar1.Position); End; Procedure TForm2.Button9Click(Sender : TObject); Begin Invert(Image1.Picture.Bitmap); Image1.Refresh; End; Procedure TForm2.Button10Click(Sender : TObject); Begin GrayScale(Image1.Picture.Bitmap); Image1.Refresh; End; Procedure TForm2.Button11Click(Sender : TObject); Begin Emboss(Image1.Picture.Bitmap); Image1.Refresh; End; Procedure TForm2.Button12Click(Sender : TObject); Begin SwapColors(Image1.Picture.Bitmap); Image1.Refresh; End; Procedure TForm2.Button13Click(Sender : TObject); Begin If SaveDialog1.Execute Then Image1.Picture.Bitmap.SaveToFile(SaveDialog1.FileName); End; Procedure TForm2.Button14Click(Sender : TObject); Begin Sketch(Image1.Picture.Bitmap); Image1.Refresh; End; Procedure TForm2.SpinEdit1Change(Sender : TObject); Begin // HideVidomiConfig.Spacing := SpinEdit1.Value; End; Procedure TForm2.Edit1Change(Sender : TObject); Var Loop : Integer; TempSTR, NewSTR : String; Begin Edit1.OnChange := Nil; TempSTR := Edit1.Text; NewSTR := ''; For loop := 1 To length(Edit1.Text) Do If (Ord(TempSTR[loop]) >= Ord('0')) And (Ord(TempSTR[loop]) <= Ord('9')) Or ((Loop = 1) And (TempSTR[loop] = '-')) Then NewSTR := NewSTR + TempSTR[Loop]; Edit1.Text := NewSTR; If Edit1.Text <> '-' Then HideVidomiConfig.Spacing := StrToInt(NewSTR); Edit1.OnChange := Edit1Change; End; Procedure TForm2.Button15Click(Sender : TObject); Begin Image1.Picture.Bitmap := job.Image1.Picture.Bitmap; Visible := False; End; Procedure TForm2.UpDown1Click(Sender : TObject; Button : TUDBtnType); Begin If Button = btNext Then Inc(HideVidomiConfig.Spacing) Else Dec(HideVidomiConfig.Spacing); Edit1.Text := IntToStr(HideVidomiConfig.Spacing); End; Procedure TForm2.Button16Click(Sender : TObject); Begin If HideVidomiConfig.Background <> '' Then Begin If MessageDlg('This will overwrite ' + HideVidomiConfig.Background + '.' + #13 + 'Continue?', mtConfirmation, mbOKCancel, 0) = mrOk Then Begin Image1.Picture.Bitmap.SaveToFile(HideVidomiConfig.Background); End; End Else Button13Click(self); End; Procedure TForm2.Button17Click(Sender : TObject); Begin Blur(Image1.Picture.Bitmap, 1); Image1.Refresh; End; End.