Nikola

Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • in reply to: How to make the MainForm unmoveable? #54842
    Nikola
    Participant
    'Support' wrote:

    Thank you for the demo. You should add “message WM_WINDOWPOSCHANGING;” there, as in the sample code.

    Also, disable the “Blend a form when moved” feature and solution will work then as expected.

    If the feature is disabled, setting of Align property to alCustom works as well.

    Thank you very much for your help. I appreciate AlphaControl – it`s really a cool stuff.

    Nikola
    Participant

    ОК.

    Nikola
    Participant
    'Support' wrote:

    Как можно повторить это? Возможно есть уже тестовое приложение?

    Тестовое приложение уже есть – см. вложение. Оно изменяет рабочую область окна так, что верхние 77 пикселей становятся недоступны для окон. После этого я запускаю AlphaControls demo v10.25, пытаюсь мышкой сдвинуть форму вверх. При достижении края области появляется ошибка – не всегда, но из пяти попыток одна обязательно вызовет ошибку. Проверено на XP SP2 и Win 7 SP1.

    [attachment=7615:test1.zip]

    in reply to: How to make the MainForm unmoveable? #54817
    Nikola
    Participant
    'Support' wrote:

    Hello, Nikola

    First solution must work:

    Code:
    procedure PosChange(var Msg: TWmWindowPosChanging); message WM_WINDOWPOSCHANGING;

    procedure TForm1.PosChange(var Msg: TWmWindowPosChanging);
    begin
    Msg.WindowPos.x := Left;
    Msg.WindowPos.y := Top;
    Msg.Result := 0;
    end;

    Can you show an example where it's not working, please?

    I've tried three times more, unfortunately, this solution does not work. Please, check it with the example attached.

    [attachment=7614:alphacontrol_demo.zip]

    Nikola
    Participant
    'TCount' wrote:

    Свойство Align нужной формы установить в alCustom.

    Пробовал. Не работает это, по крайней мере, я не обнаруживаю никакой разницы в поведении формы при alCustom и alNone. Тренируюсь на AlphaControls Demo v.10.25

    События о перемещении формы мышью я ловлю так:

    interface

    uses

    Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

    Dialogs, StdCtrls;

    const

    SC_MOVING =61458;

    type

    TForm1 = class(TForm)

    …………………….

    procedure WndProc(var Msg: TMessage); override;

    private

    { Private declarations }

    public

    { Public declarations }

    end;

    var

    Form1: TForm1;

    implementation

    {$R *.dfm}

    procedure TForm1.WndProc(var Msg: TMessage);

    begin

    if (Msg.WParam = SC_MOVING) {or (Msg.WParam = SC_MOVE)} then

    обрабатываем

    inherited WndProc(msg);

    end;

    Однако, в Демо v.10.25 эти сообщения форма не получает, независимо от настроек свойства Align.

    upd: перепробовал все способы, описанные в: http://delphidabbler.com/tips/187

    Все прекрасно работают на обычной форме, и ни один способ не срабатывает в демопримере с Альфаконтролами.

    Такое ощущение, что AlphaControls перехватывают не только сообщения о событиях от мыши, но и события перемещения окна, и сами формируют системное меню. Это, конечно, впечатляет, но…

Viewing 5 posts - 1 through 5 (of 5 total)