<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://gsbelarus.com:80/gs/wiki/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>https://gsbelarus.com:80/gs/wiki/index.php?action=history&amp;feed=atom&amp;title=IBSQL_WaitWindow.pas</id>
		<title>IBSQL WaitWindow.pas - История изменений</title>
		<link rel="self" type="application/atom+xml" href="https://gsbelarus.com:80/gs/wiki/index.php?action=history&amp;feed=atom&amp;title=IBSQL_WaitWindow.pas"/>
		<link rel="alternate" type="text/html" href="https://gsbelarus.com:80/gs/wiki/index.php?title=IBSQL_WaitWindow.pas&amp;action=history"/>
		<updated>2026-07-17T02:26:41Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.19.16</generator>

	<entry>
		<id>https://gsbelarus.com:80/gs/wiki/index.php?title=IBSQL_WaitWindow.pas&amp;diff=2199&amp;oldid=prev</id>
		<title>SYSDBA в 15:10, 23 мая 2008</title>
		<link rel="alternate" type="text/html" href="https://gsbelarus.com:80/gs/wiki/index.php?title=IBSQL_WaitWindow.pas&amp;diff=2199&amp;oldid=prev"/>
				<updated>2008-05-23T15:10:27Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Предыдущая&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Версия 15:10, 23 мая 2008&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; unit IBSQL_WaitWindow;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; unit IBSQL_WaitWindow;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 146:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 145:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; WC.lpszClassName := WindowClassName;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; WC.lpszClassName := WindowClassName;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; WC.hIconSm := 0;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; WC.hIconSm := 0;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Assert(&lt;/del&gt;Windows.RegisterClassEx(WC&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;) &amp;lt;&amp;gt; 0, IntToStr(GetLastError)&lt;/del&gt;);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; Windows.RegisterClassEx(WC);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; end;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; end;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>SYSDBA</name></author>	</entry>

	<entry>
		<id>https://gsbelarus.com:80/gs/wiki/index.php?title=IBSQL_WaitWindow.pas&amp;diff=2193&amp;oldid=prev</id>
		<title>SYSDBA в 14:43, 23 мая 2008</title>
		<link rel="alternate" type="text/html" href="https://gsbelarus.com:80/gs/wiki/index.php?title=IBSQL_WaitWindow.pas&amp;diff=2193&amp;oldid=prev"/>
				<updated>2008-05-23T14:43:18Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
  unit IBSQL_WaitWindow;&lt;br /&gt;
 &lt;br /&gt;
  interface&lt;br /&gt;
 &lt;br /&gt;
  uses&lt;br /&gt;
    Classes, Windows, Messages;&lt;br /&gt;
 &lt;br /&gt;
  type&lt;br /&gt;
    TIBSQL_WaitWindowThread = class(TThread)&lt;br /&gt;
    private&lt;br /&gt;
      FWnd, FLabel: hWnd;&lt;br /&gt;
      FStartTime: DWORD;&lt;br /&gt;
      FShow: Boolean;&lt;br /&gt;
      FScreenWidth, FScreenHeight: Integer;&lt;br /&gt;
 &lt;br /&gt;
      procedure CreateWinAPIForm;&lt;br /&gt;
      procedure RegisterWindowClass;&lt;br /&gt;
      procedure UnRegisterWindowClass;&lt;br /&gt;
 &lt;br /&gt;
    protected&lt;br /&gt;
      procedure Execute; override;&lt;br /&gt;
 &lt;br /&gt;
    public&lt;br /&gt;
      procedure StartSQL;&lt;br /&gt;
      procedure FinishSQL;&lt;br /&gt;
    end;&lt;br /&gt;
 &lt;br /&gt;
  var&lt;br /&gt;
    IBSQL_WaitWindowThread: TIBSQL_WaitWindowThread;&lt;br /&gt;
 &lt;br /&gt;
  implementation&lt;br /&gt;
 &lt;br /&gt;
  uses&lt;br /&gt;
    SysUtils, Forms;&lt;br /&gt;
 &lt;br /&gt;
  const&lt;br /&gt;
    WindowClassName = 'IBSQL_WaitWindowClass';&lt;br /&gt;
    idLabel = 1;&lt;br /&gt;
    idTimer = 2;&lt;br /&gt;
    InitialDelay = 2000;&lt;br /&gt;
    RefreshRate = 1000;&lt;br /&gt;
 &lt;br /&gt;
  function WindowProc(Wnd: HWnd; Msg: Integer; WParam: WParam; LParam: LParam): LResult; stdcall;&lt;br /&gt;
  begin&lt;br /&gt;
    Result := DefWindowProc(Wnd, Msg, WParam, LParam);&lt;br /&gt;
  end;&lt;br /&gt;
 &lt;br /&gt;
  { TIBSQL_WaitWindowThread }&lt;br /&gt;
 &lt;br /&gt;
  procedure TIBSQL_WaitWindowThread.CreateWinApiForm;&lt;br /&gt;
  const&lt;br /&gt;
    WindowHeight = 80;&lt;br /&gt;
    WindowWidth = 232;&lt;br /&gt;
  begin&lt;br /&gt;
    FWnd := CreateWindowEx(&lt;br /&gt;
      WS_EX_DLGMODALFRAME or WS_EX_TOPMOST,&lt;br /&gt;
      WindowClassName,&lt;br /&gt;
      'Идет выполнение SQL запроса...',&lt;br /&gt;
      WS_DLGFRAME or WS_VISIBLE,&lt;br /&gt;
      (FScreenWidth - WindowWidth) div 2,&lt;br /&gt;
      (FScreenHeight - WindowHeight) div 2,&lt;br /&gt;
      WindowWidth,&lt;br /&gt;
      WindowHeight,&lt;br /&gt;
      0, 0,&lt;br /&gt;
      hInstance,&lt;br /&gt;
      nil);&lt;br /&gt;
 &lt;br /&gt;
    FLabel := CreateWindow(&lt;br /&gt;
      'static',&lt;br /&gt;
      '',&lt;br /&gt;
      WS_VISIBLE or WS_CHILD or BS_TEXT,&lt;br /&gt;
      12, 18,&lt;br /&gt;
      WindowWidth - 20, 20,&lt;br /&gt;
      FWnd,&lt;br /&gt;
      idLabel,&lt;br /&gt;
      hInstance,&lt;br /&gt;
      nil);&lt;br /&gt;
 &lt;br /&gt;
    SetTimer(FWnd, idTimer, RefreshRate, nil);&lt;br /&gt;
 &lt;br /&gt;
    ShowWindow(FWnd, SW_SHOW);&lt;br /&gt;
  end;&lt;br /&gt;
 &lt;br /&gt;
  procedure TIBSQL_WaitWindowThread.Execute;&lt;br /&gt;
  var&lt;br /&gt;
    Msg: TMsg;&lt;br /&gt;
    T: DWORD;&lt;br /&gt;
  begin&lt;br /&gt;
    RegisterWindowClass;&lt;br /&gt;
    try&lt;br /&gt;
      while not Terminated do&lt;br /&gt;
      begin&lt;br /&gt;
        if not FShow then&lt;br /&gt;
          Suspend&lt;br /&gt;
        else begin&lt;br /&gt;
          T := 0;&lt;br /&gt;
          FStartTime := GetTickCount;&lt;br /&gt;
          Sleep(InitialDelay);&lt;br /&gt;
          if not FShow then&lt;br /&gt;
            continue;&lt;br /&gt;
          CreateWinApiForm;&lt;br /&gt;
          try&lt;br /&gt;
            while (not Terminated) and FShow&lt;br /&gt;
              and GetMessage(Msg, 0, 0, 0) do&lt;br /&gt;
            begin&lt;br /&gt;
              TranslateMessage(Msg);&lt;br /&gt;
              DispatchMessage(Msg);&lt;br /&gt;
              if GetTickCount - T &amp;gt;= RefreshRate then&lt;br /&gt;
              begin&lt;br /&gt;
                T := GetTickCount;&lt;br /&gt;
                SetWindowText(FLabel,&lt;br /&gt;
                  PChar('Время выполнения: ' + IntToStr((GetTickCount - FStartTime) div 1000) + ' сек.'));&lt;br /&gt;
              end;&lt;br /&gt;
            end;&lt;br /&gt;
          finally&lt;br /&gt;
            KillTimer(FWnd, idTimer);&lt;br /&gt;
            DestroyWindow(FWnd);&lt;br /&gt;
          end;&lt;br /&gt;
        end;&lt;br /&gt;
      end;&lt;br /&gt;
    finally&lt;br /&gt;
      UnRegisterWindowClass;&lt;br /&gt;
    end;&lt;br /&gt;
  end;&lt;br /&gt;
 &lt;br /&gt;
  procedure TIBSQL_WaitWindowThread.FinishSQL;&lt;br /&gt;
  begin&lt;br /&gt;
    FShow := False;&lt;br /&gt;
  end;&lt;br /&gt;
 &lt;br /&gt;
  procedure TIBSQL_WaitWindowThread.RegisterWindowClass;&lt;br /&gt;
  var&lt;br /&gt;
    WC: TWndClassEx;&lt;br /&gt;
  begin&lt;br /&gt;
    WC.cbsize := SizeOf(WC);&lt;br /&gt;
    WC.style := cs_bytealignwindow or cs_hredraw or cs_vredraw or cs_noclose or cs_savebits;&lt;br /&gt;
    WC.lpfnwndproc := @WindowProc;&lt;br /&gt;
    WC.cbclsextra := 0;&lt;br /&gt;
    WC.cbwndextra := 0;&lt;br /&gt;
    WC.hInstance := hInstance;&lt;br /&gt;
    WC.hIcon := LoadIcon(0, idi_application);&lt;br /&gt;
    WC.hCursor := LoadCursor(0, idc_arrow);&lt;br /&gt;
    WC.hbrBackground := 1;&lt;br /&gt;
    WC.lpszMenuName := nil;&lt;br /&gt;
    WC.lpszClassName := WindowClassName;&lt;br /&gt;
    WC.hIconSm := 0;&lt;br /&gt;
    Assert(Windows.RegisterClassEx(WC) &amp;lt;&amp;gt; 0, IntToStr(GetLastError));&lt;br /&gt;
  end;&lt;br /&gt;
 &lt;br /&gt;
  procedure TIBSQL_WaitWindowThread.StartSQL;&lt;br /&gt;
  begin&lt;br /&gt;
    if Suspended and (not FShow) then&lt;br /&gt;
    begin&lt;br /&gt;
      FScreenWidth := Screen.Width;&lt;br /&gt;
      FScreenHeight := Screen.Height;&lt;br /&gt;
      FShow := True;&lt;br /&gt;
      Resume;&lt;br /&gt;
    end;&lt;br /&gt;
  end;&lt;br /&gt;
 &lt;br /&gt;
  procedure TIBSQL_WaitWindowThread.UnRegisterWindowClass;&lt;br /&gt;
  begin&lt;br /&gt;
    Windows.UnregisterClass(WindowClassName, hInstance);&lt;br /&gt;
  end;&lt;br /&gt;
 &lt;br /&gt;
  initialization&lt;br /&gt;
    IBSQL_WaitWindowThread := TIBSQL_WaitWindowThread.Create(True);&lt;br /&gt;
    IBSQL_WaitWindowThread.Priority := tpLowest;&lt;br /&gt;
    IBSQL_WaitWindowThread.FreeOnTerminate := False;&lt;br /&gt;
 &lt;br /&gt;
  finalization&lt;br /&gt;
    FreeAndNil(IBSQL_WaitWindowThread);&lt;br /&gt;
  end.&lt;/div&gt;</summary>
		<author><name>SYSDBA</name></author>	</entry>

	</feed>