Program muli w XP, śmiga na 7 i 8 - zmienianie rozmiaru, przesuwanie okna.

0

Witam,

Tym razem spotkałem się z problemem pracy skompilowanego programu na XP. Ta sama aplikacja śmiga wyśmienicie na 7 oraz 8. Okroiłem ją już z całego kodu i z 95% elementów czyli: Buttonów, Labeli, Paneli itp. i mimo to w XP strasznie muli, zdarzyło się, że zupełnie zawiesiła komputer. Np maksymalizowanie okna trwa z około 2 sekundy. Program ogólnie piszę w Delphi XE.

Kod samej formy wygląda następująco:

object MainWindow: TMainWindow
  Left = 177
  Top = 233
  AlphaBlend = True
  Caption = 'Agilent+LabJackU3 v0.1 by xxxxxx'
  ClientHeight = 553
  ClientWidth = 782
  Color = clBtnFace
  Constraints.MaxHeight = 1080
  Constraints.MaxWidth = 1920
  Constraints.MinHeight = 600
  Constraints.MinWidth = 800
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -13
  Font.Name = 'Tahoma'
  Font.Style = []
  OldCreateOrder = False
  Position = poDesigned
  ScreenSnap = True
  PixelsPerInch = 120
  TextHeight = 16
  object pgTabs: TPageControl
    Left = 0
    Top = 0
    Width = 782
    Height = 553
    Margins.Left = 2
    Margins.Top = 2
    Margins.Right = 2
    Margins.Bottom = 2
    ActivePage = tabDebug
    Align = alClient
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -13
    Font.Name = 'Tahoma'
    Font.Style = []
    MultiLine = True
    ParentFont = False
    TabOrder = 0
    ExplicitLeft = 7
    object tabChannelConfig: TTabSheet
      Margins.Left = 2
      Margins.Top = 2
      Margins.Right = 2
      Margins.Bottom = 2
      Caption = 'Channel Configuration'
    end
    object tabExperimentConditions: TTabSheet
      Margins.Left = 2
      Margins.Top = 2
      Margins.Right = 2
      Margins.Bottom = 2
      Caption = 'Experiment Conditions'
      ImageIndex = 1
      object panelExperimentConditions: TPanel
        Left = 0
        Top = 0
        Width = 774
        Height = 522
        Align = alClient
        BevelOuter = bvNone
        TabOrder = 0
      end
    end
    object tabDebug: TTabSheet
      Caption = 'Debug'
      ImageIndex = 5
      object panelDebugTop: TPanel
        Left = 0
        Top = 0
        Width = 774
        Height = 57
        Align = alTop
        BevelEdges = []
        BevelOuter = bvNone
        Color = clWhite
        ParentBackground = False
        TabOrder = 0
        object lblAgilentConnectionStatus: TLabel
          AlignWithMargins = True
          Left = 393
          Top = 10
          Width = 117
          Height = 37
          Margins.Left = 20
          Margins.Top = 10
          Margins.Right = 10
          Margins.Bottom = 10
          Align = alLeft
          Alignment = taCenter
          Caption = 'Agilent connection status'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -13
          Font.Name = 'Tahoma'
          Font.Style = [fsBold]
          ParentFont = False
          WordWrap = True
          ExplicitHeight = 32
        end
        object lblLabJackConnectionStatus: TLabel
          AlignWithMargins = True
          Left = 20
          Top = 10
          Width = 117
          Height = 37
          Margins.Left = 20
          Margins.Top = 10
          Margins.Right = 10
          Margins.Bottom = 10
          Align = alLeft
          Alignment = taCenter
          Caption = 'LabJack connection status'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -13
          Font.Name = 'Tahoma'
          Font.Style = [fsBold]
          ParentFont = False
          Layout = tlCenter
          WordWrap = True
          ExplicitHeight = 32
        end
        object btnAgilentConnectionStatus: TBitBtn
          AlignWithMargins = True
          Left = 530
          Top = 10
          Width = 184
          Height = 37
          Margins.Left = 10
          Margins.Top = 10
          Margins.Right = 20
          Margins.Bottom = 10
          Align = alLeft
          Caption = 'No connection'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clRed
          Font.Height = -13
          Font.Name = 'Tahoma'
          Font.Style = [fsBold]
          ParentFont = False
          TabOrder = 0
        end
        object btnLabJackConnectionStatus: TBitBtn
          AlignWithMargins = True
          Left = 157
          Top = 10
          Width = 196
          Height = 37
          Margins.Left = 10
          Margins.Top = 10
          Margins.Right = 20
          Margins.Bottom = 10
          Align = alLeft
          Caption = 'No connection'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clRed
          Font.Height = -13
          Font.Name = 'Tahoma'
          Font.Style = [fsBold]
          ParentFont = False
          TabOrder = 1
        end
      end
      object panelDebugBottom: TPanel
        Left = 0
        Top = 57
        Width = 774
        Height = 465
        Align = alClient
        BevelOuter = bvNone
        TabOrder = 1
        object lblDebugInfo: TLabel
          AlignWithMargins = True
          Left = 20
          Top = 3
          Width = 734
          Height = 16
          Margins.Left = 20
          Margins.Right = 20
          Align = alTop
          Caption = 'Debug information'
          Color = clWhite
          ParentColor = False
          Layout = tlBottom
          ExplicitWidth = 105
        end
        object memoDebug: TMemo
          AlignWithMargins = True
          Left = 10
          Top = 22
          Width = 754
          Height = 433
          Margins.Left = 10
          Margins.Top = 0
          Margins.Right = 10
          Margins.Bottom = 10
          Align = alClient
          Color = clWhite
          ReadOnly = True
          ScrollBars = ssVertical
          TabOrder = 0
        end
      end
    end
  end
end

Jak utworzę w nowym projekcie formę i powstawiam elementy itp. to taka aplikacja działa bez zarzutu na XP, 7 i 8. Nie chciałbym jednak przepisywać i projektować całej formy od nowa. Proszę o pomoc w wyśledzeniu problemu w formie, który uniemożliwia poprawne działanie takiej aplikacji na XP.

0

a co mamy ci powiedzieć na podstawie kodu formatki???

0

Kod samego programu wygląda tak:

unit LabJack;

interface

uses
  Vcl.Forms, Vcl.ComCtrls, Vcl.StdCtrls, Vcl.ExtCtrls,
  Vcl.Buttons, Vcl.Controls, System.Classes;

type
  TMainWindow = class(TForm)
    pgTabs: TPageControl;
    tabChannelConfig: TTabSheet;
    tabExperimentConditions: TTabSheet;
    tabDebug: TTabSheet;
    memoDebug: TMemo;
    lblDebugInfo: TLabel;
    panelDebugTop: TPanel;
    btnAgilentConnectionStatus: TBitBtn;
    btnLabJackConnectionStatus: TBitBtn;
    panelDebugBottom: TPanel;
    lblLabJackConnectionStatus: TLabel;
    lblAgilentConnectionStatus: TLabel;
    panelExperimentConditions: TPanel;
  private
  public
  end;

var
  MainWindow: TMainWindow;

implementation

{$R *.dfm}


end.

Jak widać wszystko wywaliłem a mimo to coś jest nie tak..

0

Jeśli to jest tylko tle to spakuj cały projekt razem z exe i wstaw gdzieś do sprawdzenia

0

Załączam link do ściągnięcia projektu ze skompilowanym już programem (Debug i Release):
http://www.sendspace.pl/file/292455755d790b366834f9d

4

wyłącz AlphaBlend dla formy

1 użytkowników online, w tym zalogowanych: 0, gości: 1