Недавно добавленные исходники

•  DeLiKaTeS Tetris (Тетрис)  135

•  TDictionary Custom Sort  3 315

•  Fast Watermark Sources  3 065

•  3D Designer  4 825

•  Sik Screen Capture  3 320

•  Patch Maker  3 535

•  Айболит (remote control)  3 637

•  ListBox Drag & Drop  2 996

•  Доска для игры Реверси  81 559

•  Графические эффекты  3 927

•  Рисование по маске  3 231

•  Перетаскивание изображений  2 613

•  Canvas Drawing  2 735

•  Рисование Луны  2 561

•  Поворот изображения  2 166

•  Рисование стержней  2 161

•  Paint on Shape  1 564

•  Генератор кроссвордов  2 226

•  Головоломка Paletto  1 764

•  Теорема Монжа об окружностях  2 214

•  Пазл Numbrix  1 682

•  Заборы и коммивояжеры  2 052

•  Игра HIP  1 279

•  Игра Go (Го)  1 224

•  Симулятор лифта  1 471

•  Программа укладки плитки  1 214

•  Генератор лабиринта  1 542

•  Проверка числового ввода  1 352

•  HEX View  1 490

•  Физический маятник  1 355

 
скрыть


Delphi FAQ - Часто задаваемые вопросы

| Базы данных | Графика и Игры | Интернет и Сети | Компоненты и Классы | Мультимедиа |
| ОС и Железо | Программа и Интерфейс | Рабочий стол | Синтаксис | Технологии | Файловая система |



Delphi Sources

Скрыть окна IDE во время проектирования



Оформил: DeeCo

//**************************************** 
// Paste into AutoHideIDE.dpk 
//**************************************** 
package AutoHideIDE;

 {$R *.res}
 {$ALIGN 8}
 {$ASSERTIONS ON}
 {$BOOLEVAL OFF}
 {$DEBUGINFO ON}
 {$EXTENDEDSYNTAX ON}
 {$IMPORTEDDATA ON}
 {$IOCHECKS ON}
 {$LOCALSYMBOLS ON}
 {$LONGSTRINGS ON}
 {$OPENSTRINGS ON}
 {$OPTIMIZATION ON}
 {$OVERFLOWCHECKS OFF}
 {$RANGECHECKS OFF}
 {$REFERENCEINFO ON}
 {$SAFEDIVIDE OFF}
 {$STACKFRAMES OFF}
 {$TYPEDADDRESS OFF}
 {$VARSTRINGCHECKS ON}
 {$WRITEABLECONST OFF}
 {$MINENUMSIZE 1}
 {$IMAGEBASE $400000}
 {$DESIGNONLY}
 {$IMPLICITBUILD OFF}

 requires
   rtl,
   vcl;
 contains
   AutoHide in 'AutoHide.pas';
 end.



 //**************************************** 
// Paste into AutoHide.pas 
//**************************************** 
unit AutoHide;

 interface

 uses
   Windows, Messages, SysUtils, Classes, Controls, Forms;

 type
   TAutoHider = class(TObject)
   protected
     procedure DelphiOnMessage(var Msg: TMsg; var Handled: Boolean);
     procedure MyDockDrop(Sender: TObject; Source: TDragDockObject; X, Y: Integer);
     procedure MyDestroy(Sender: TObject);
   public
     OldDockDrop: TDockDropEvent;
     OldDestroy: TNotifyEvent;

     Delphi: TApplication;
     Bar_Top: TForm;
     Bar_Left: TForm;
     ObjInspector: TForm;
     DockHost: TForm;

     Bar_Top_Rect: TRect;
     Bar_Left_Rect: TRect;

     F_AtTop: Boolean;
     F_AtLeft: Boolean;

     procedure Init_Bar_Left;
     procedure Bar_Left_Visible(val: Boolean);
     procedure Bar_Top_Visible(Value: Boolean);
   end;

 var
   AutoHider: TAutoHider;

 implementation

 { TAutoHide }

 procedure Restore_Bar_Left;
 begin
   AutoHider.ObjInspector.OnDockDrop := nil;

   if AutoHider.DockHost <> nil then
    begin
     AutoHider.DockHost.OnDestroy := nil;
   end;
   AutoHider.Bar_Left.BoundsRect := AutoHider.Bar_Left_Rect;
 end;

 procedure Restore_Bar_Top;
 begin
   AutoHider.Bar_Top.BoundsRect := AutoHider.Bar_Top_Rect;
 end;

 procedure InitAutoHider(Value: Boolean);
 begin
   if Value then
    begin
     AutoHider.Delphi  := Application;
     AutoHider.Bar_Top := TForm(Application.FindComponent('AppBuilder'));
     if AutoHider.Bar_Top <> nil then
      begin
       AutoHider.Bar_Top_Rect := AutoHider.Bar_Top.BoundsRect;

       AutoHider.ObjInspector  := AutoHider.Bar_Top.FindComponent('PropertyInspector')
         as TForm;
       AutoHider.Bar_Left_Rect := AutoHider.ObjInspector.BoundsRect;

       AutoHider.OldDockDrop := AutoHider.ObjInspector.OnDockDrop;
       AutoHider.ObjInspector.OnDockDrop := AutoHider.MyDockDrop;

       AutoHider.DockHost := nil;
       AutoHider.Init_Bar_Left;

       AutoHider.F_AtTop          := True;
       AutoHider.F_AtLeft         := True;
       AutoHider.Delphi.OnMessage := AutoHider.DelphiOnMessage;
     end;
   end
    else
    begin
     Restore_Bar_Left;
     Restore_Bar_Top;
   end;
 end;

 procedure TAutoHider.Bar_Top_Visible(Value: Boolean);
 begin
   if Value = F_AtTop then Exit;

   if Value then
    begin
     Bar_Top.Top := 0;
     Bar_Top.Show;
   end
    else
    begin
     Bar_Top.Top := -Bar_Top.Height + 3;
   end;

   F_AtTop := Value;
 end;

 procedure TAutoHider.Bar_Left_Visible(val: Boolean);
 begin
   if val = F_AtLeft then Exit;

   if val then
    begin
     Bar_Left.Left   := 0;
     Bar_Left.Top    := 0;
     Bar_Left.Height := Screen.WorkAreaHeight;
     Bar_Left.Show;
   end
    else
    begin
     Bar_Left.Left := -Bar_Left.Width + 3;
   end;

   F_AtLeft := val;
 end;

 procedure TAutoHider.DelphiOnMessage(var Msg: TMsg; var Handled: Boolean);
 begin
   if not Delphi.Active then Exit;
   if (Msg.message = WM_LBUTTONDOWN) then Exit;

   if (Msg.message = WM_MOUSEMOVE) or (Msg.message = WM_NCMOUSEMOVE) then
    begin
     if F_AtTop then
       if Mouse.CursorPos.Y > Bar_Top.Height + 50 then
        begin
         Bar_Top_Visible(False);
       end;
     if not F_AtTop then
       if Mouse.CursorPos.Y < 3 then
        begin
         Bar_Top_Visible(True);
       end;

     if F_AtLeft then
       if (Mouse.CursorPos.x > Bar_Left.Width + 50) and (not Bar_left.Active) then
        begin
         Bar_Left_Visible(False);
       end;
     if not F_AtLeft then
       if Mouse.CursorPos.X < 3 then
        begin
         Bar_Left_Visible(True);
       end;
   end;
 end;

 procedure TAutoHider.MyDestroy(Sender: TObject);
 begin
   if Sender is TApplication then
    begin
     Bar_Top_Visible(False);
     Bar_Left_Visible(False);
   end
    else
    begin
     if Assigned(OldDestroy) then OldDestroy(Sender);
     DockHost := nil;
     Bar_Left := ObjInspector;
   end;
 end;

 procedure TAutoHider.Init_Bar_Left;
 begin
   if (Delphi.FindComponent('TabDockHostForm') as TForm) <> nil then
     DockHost := Delphi.FindComponent('TabDockHostForm') as TForm
   else if (Delphi.FindComponent('JoinDockForm') as TForm) <> nil then
     DockHost := Delphi.FindComponent('JoinDockForm') as TForm;

   if DockHost <> nil then
    begin
     DockHost.Top       := 0;
     DockHost.Height    := Screen.WorkAreaHeight;
     OldDestroy         := DockHost.OnDestroy;
     DockHost.OnDestroy := MyDestroy;
     Bar_Left           := DockHost;
   end
    else
    begin
     Bar_Left := ObjInspector;
   end;
 end;

 procedure TAutoHider.MyDockDrop(Sender: TObject; Source: TDragDockObject; X,
   Y: Integer);
 begin
   if Assigned(OldDockDrop) then  OldDockDrop(Sender, Source, X, Y);
   Init_Bar_Left;
 end;

 initialization
   AutoHider := TAutoHider.Create;
   InitAutoHider(True);

 finalization
   InitAutoHider(False);
   AutoHider.Delphi.OnMessage := nil;
   AutoHider.Free;
 end.




Похожие по теме исходники

Посторонние окна WinAPI

Video Gest

Plasma Provider

Video Creator

 

Slide Show by OFFLAKE

Space Raider

BASS Video

Colibri WEB Spider

 

Generic Internet Spider

Raiden Cipher




Copyright © 2004-2024 "Delphi Sources" by BrokenByte Software. Delphi World FAQ

Группа ВКонтакте