Tag: delphi

  • RAD Studio XE5 support

    Today the new trial and registered packages published with RAD Studio XE5 (Delphi and C++Builder) support. All our VCL component suites are compatible with XE5.

    The reg.user may send the request for update to [email protected]
    Please include there any reg.information (order number, tracking id, password etc)

  • found the bug in TToolBar (Delphi6-XE4)

    Today I found the bug in CheckMenuDropdown method for standard TToolBar component. If you’ll assign to toolbar the mainmenu and one from item will have a lot of subitems (some are visible) then the position of dropdown menu will be incorrect (above of toolbar).
    The reason of bug is the next code:

          if (GetSystemMetrics(SM_CYMENU) * FTempMenu.Items.Count) + APoint.Y >
             Screen.MonitorFromPoint(APoint).Height then
            Dec(APoint.Y, Button.Height);

    As you see, the FTempMenu.Items.Count will return the counf of all subitems (including hidden).
    The correct code:

          if (GetSystemMetrics(SM_CYMENU) * GetVisibleMenuItemCount()) + APoint.Y >
             Screen.MonitorFromPoint(APoint).Height then
            Dec(APoint.Y, Button.Height);

    where GetVisibleMenuItemCount function is

      function GetVisibleMenuItemCount: Integer;
      var
        i: Integer;
      begin
        Result := 0;
        for i := 0 to FTempMenu.Items.Count-1 do
          if FTempMenu.Items[i].Visible then
            Inc(Result)
      end;

    Unfortunatelly there is no way to override the CheckMenuDropdown method to fix this issue because all used variables (FTempMenu, FCaptureChangeCancels etc). So only one way is to patch the ComCtrls.pas unit.
    This bug confirmed in all versions from Delphi 6 to XE4.

  • XE4 support

    Today the new trial and registered packages released to support the RAD Studio XE4 (Delphi and C++Builder). All out VCL component suites are supported.

    The reg.user may send the request for update to [email protected]
    Please include there any reg.information (order number, tracking id, password etc)

  • Delphi XE3 support

    today I updated all archives for VCL components with XE3 support.
    The new trials are available for download from site.

    The registered users can download the same reg.link and logon which they used
    before.

  • SecureString type

    The SecureString type from .NET 2.0 is very useful because allow to keep/store the strings/password as encrypted text. They are encrypted in memory cache too and will be decompressed only when you’ll copy the value to usual String’s variable.

    Unfortunately in VCL/Delphi the string type with similar functionality is not added still now.

  • Detect if the current user is logged as administrator

    From Vista and Windows 7 times a lot of operations are disabled for users without administrator privilegies.

    You may use the next code to test if logged user is in administrator group:

    function IsAdmin: Boolean; 
    const 
      DOMAIN_ALIAS_RID_ADMINS = $00000220; 
      SECURITY_NT_AUTHORITY: TSIDIdentifierAuthority = (Value: (0, 0, 0, 0, 0, 5)); 
      SECURITY_BUILTIN_DOMAIN_RID = $00000020; 
    var 
      hAccessToken: THandle; 
      ptgGroups: PTokenGroups; 
      dwInfoBufferSize: DWORD; 
      psidAdministrators: PSID; 
      x: Integer; 
      bSuccess: BOOL; 
    begin 
      Result := False; 
      bSuccess := OpenThreadToken(GetCurrentThread, TOKEN_QUERY, True, 
        hAccessToken); 
      if not bSuccess then 
      begin 
        if GetLastError = ERROR_NO_TOKEN then 
        bSuccess := OpenProcessToken(GetCurrentProcess, TOKEN_QUERY, 
                                      hAccessToken); 
      end; 
      if bSuccess then 
      begin 
        GetMem(ptgGroups, 1024); 
        bSuccess := GetTokenInformation(hAccessToken, TokenGroups, 
                                        ptgGroups, 1024, dwInfoBufferSize); 
        CloseHandle(hAccessToken); 
        if bSuccess then 
        begin 
          AllocateAndInitializeSid(SECURITY_NT_AUTHORITY, 2, 
            SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS, 
            0, 0, 0, 0, 0, 0, psidAdministrators); 
          {$R-} 
          for x := 0 to ptgGroups.GroupCount - 1 do 
            if EqualSid(psidAdministrators, ptgGroups.Groups[x].Sid) then 
            begin 
              Result := True; 
              Break; 
            end; 
          {$R+} 
          FreeSid(psidAdministrators); 
        end; 
        FreeMem(ptgGroups); 
      end; 
    end;
  • Delphi XE2 в Киеве

    Вчера ходили на семинар Embarcadero, посвященный выходу RAD Studio XE2
    В основном все техническое вел Всеволод Леонов, а по лицензиям и стоимости говорил Кирилл Раннев (глава Embarcadero в СНГ)

    Основные нововведения в XE2:
    компилятор под 64 бита
    у меня часто спрашивают для ActiveX библиотек и extended procedure for MS SQL
    LiveBinding
    это круто, но пока неясен полный синтаксис самих выражений и какой парсер за это отвечает
    Кроме того, не очень понятно за счет какого нового RTTI у объектов это сделано.
    И конечно, в следующей версии явно нужно убирать ручные нотификации из кода про обновление связанных свойств-объектов. Это должно быть автоматом, как для dbware

    FireMonkey
    тут не однозначно. С одной стороны выглядит это все, как попса с мельканием, вращением и т.п. С другой стороны, обещанная кроссплатфоменность и однозначное “VCL не убирается, но развиваться будет только FireMonkey – новые проекты пишите только на нем”
    Для каких-то видов приложений FireMonkey будет явно плюсом – трехмерные CAD, планировка квартир, работа с картинками (эффекты, вращения и .п.)
    Но для бизнес приложений что-то я пока скептически настроен. Разве что некий dashboard можно на нем попробовать реализовать.
    В любом случае набор стандартных компонент FireMonkey пока куцый и можно попробовать туда “ворваться” и занять свою нишу

    многоплатформенность
    пока лично меня Macinotish не интересует. Может если добавят Android, то еще можно будет подумать. Пока даже нет идей, что из моего софта может пойти на этих платформах. Да и скорее всего там все сырое пока.

    DataSnap
    с каждым разом он все улчучшается и вроде даже заявлена генерация клиентских прокси-классов на c++, java, php etc из серверов-приложений (webservice). По идее стоит все-таки попробовать:-)

    – заявлен новый Delphi PHP XE2, но что-то я его не вижу в Partner Portal
    по крайней мере заказать лицензию на него не получается, а предыдущий Delphi PHP XE у меня работает странно

    PS: разыгрывали 4 футболки с надписью Embarcadero. Одна у меня:-)

    PPS: Всеволод Леонов тоже выложил в свой блог запись о Киеве и поместил туда фотку. на ней даже я замечен:

    Фото Всеволода Леонова

  • MAPI Message Flags

    Today I added in SMMsg suite and Viewer for MS Outlook Messages the functions to work with flags in message (PR_MESSAGE_FLAGS attribute)

    The list of flags published at http://msdn.microsoft.com/en-us/library/cc839733(v=office.12).aspx

    const
    //The message is marked as having been read
    MSGFLAG_READ            = $00000001;
    //The outgoing message has not been modified since the first time that it was saved; the incoming message has not been modified since it was delivered
    MSGFLAG_UNMODIFIED      = $00000002;
    //The message is marked for sending
    MSGFLAG_SUBMIT          = $00000004;
    //The message is still being composed. It is saved, but has not been sent
    MSGFLAG_UNSENT          = $00000008;
    //The message has at least one attachment
    MSGFLAG_HASATTACH       = $00000010;
    //The messaging user sending was the messaging user receiving the message
    MSGFLAG_FROMME          = $00000020;
    //The message is an associated message of a folder
    MSGFLAG_ASSOCIATED      = $00000040;
    //The message includes a request for a resend operation with a nondelivery report
    MSGFLAG_RESEND          = $00000080;
    //A read report needs to be sent for the message.
    MSGFLAG_RN_PENDING      = $00000100;
    //A nonread report needs to be sent for the message
    MSGFLAG_NRN_PENDING     = $00000200;
    //The incoming message arrived over an X.400 link
    MSGFLAG_ORIGIN_X400     = $00000400;
    //The incoming message arrived over the Internet
    MSGFLAG_ORIGIN_INTERNET = $00000800;
    //The incoming message arrived over an external link other than X.400 or the Internet
    MSGFLAG_ORIGIN_MISC_EXT = $00001000;

    Now it looks so:


    Message Flags

  • RAD Studio XE

    Yesterday I uploaded the archives with compiled packages for XE for SMExport and SMImport (both registered and trials)