Leírás hozzáadása alkalmazásbeállításhoz

A My Project almappában lévő Settings.Designer.vb fájlhoz kell hozzáadni egy DescriptionAttribute osztályú attribútumot:

 <Global.System.Configuration.UserScopedSettingAttribute(),
         Global.System.Diagnostics.DebuggerNonUserCodeAttribute(),
         Global.System.Configuration.DefaultSettingValueAttribute(""),
         Global.System.ComponentModel.Description("ÁNYK mentett dokumentumok mappája")>
    Public Property AfaMappa() As String

Amely például egy PropertyGrid-ben így jelenik meg:

Forrás:

DescriptionAttribute Class

Manage application settings (.NET)

Module attributes kiolvasása VS_FIXEDFILEINFO struktúrából

PJVersionInfo komponens: https://github.com/ddablib/verinfo

VI:=TPJVersionInfo.Create(nil);
try
  lblVerzio.Caption:=VI.FileVersion;
  GetExtendedVersionInfo(VI.FileFlagsMask, VI.FileFlags);
finally
  VI.Free;
end;

procedure TfrmMain.GetExtendedVersionInfo(const FileFlagMask,
  FileFlags: DWORD);
const
  MaskValues : array[1..6] of string = ('Hibakereső verzió....: ',
                                        'Dinamikus............: ',
                                        'Patchelve............: ',
                                        'Előzetes kiadás......: ',
                                        'Nem szabványos build.: ',
                                        'Speciális build......: ');
var
  i : integer;
  p : byte;
begin
  {Extended version info}
  lblVerzio.Hint:='';
  p:=1;
  for i:=1 to 6 do begin
    if FileFlagMask and p = p then begin
      lblVerzio.Hint := lblVerzio.Hint + MaskValues[i] + IfThen(FileFlags and p = p, 'Igen', 'Nem') + #13;
    end;
    p:=p*2;
  end;
end;

Microsoft dwFileFlagsMask és dwFileFlags leírás: https://learn.microsoft.com/en-us/windows/win32/api/verrsrc/ns-verrsrc-vs_fixedfileinfo

Egyéni verzió forrásfájl: https://helloacm.com/how-to-store-file-information-version-in-resource-file-for-delphi-projects/

Komponens használata nélküli megoldás: http://www.delphigroups.info/2/62/417375.html

Enum from string

This example uses the GetEnumValue function to convert the string for an enumerated value into the corresponding constant:

uses
  TypInfo;

type
  TFruits = (apples, pears, grapes, bananas, oranges);

procedure FruitBeep (const fruitName : string);
var
  Fruit : TFruits;
begin
  Fruit := TFruits(GetEnumValue(TypeInfo(TFruits),fruitName));
  case Fruit of
    apples  : Windows.Beep (440, 100);
    pears   : Windows.Beep (660, 100);
    grapes  : Windows.Beep (880, 10);
    bananas : Windows.Beep (1320, 10)
  else

    Windows.Beep (70, 100)
  end
end

Forrás: Delphi 7 help

Speculative execution side-channel védelem ellenőrzése

Install the PowerShell module

PS> Install-Module SpeculationControl

Run the SpeculationControl PowerShell module to verify that protections are enabled

PS> # Save the current execution policy so it can be reset
PS> $SaveExecutionPolicy = Get-ExecutionPolicy
PS> Set-ExecutionPolicy RemoteSigned -Scope Currentuser
PS> Import-Module SpeculationControl
PS> Get-SpeculationControlSettings
PS> # Reset the execution policy to the original state
PS> Set-ExecutionPolicy $SaveExecutionPolicy -Scope Currentuser

Forrás

Windows Search adatbázis tömörítése

Method 1: Defragment the Index

You can defragment the index in Windows Search Service to fix the Windows.edb file issue. Follow the steps below to do that.

Step 1: Type Command Prompt in the Search box and right-click it to choose Run as administrator.

Step 2: Input the following commands one by one. After each one, you should press the Enter key.

Sc config wsearch start=disabled

Net stop wsearch

esentutl.exe /d %AllUsersProfile%MicrosoftSearchDataApplicationsWindowsWindows.edb

Sc config wsearch start=delayed-auto

Net start wsearch

Forrás

Windows 10 BIOS-ról UEFI-re áttérés

Egy ASRock H470M-HVS alaplapra váltás során derült ki, hogy a VGA D-SUB kimenet nem támogatott, ha a CSM betöltésre kerül (legacy BIOS). A rendszer meg nem UEFI / GPT telepítés, átkapcsolva nem indult.

A 1703 és újabb build-ek lehetőséget adnak a konverzióra az mbr2gpt paranccsal

  • Kijelentkezés
  • A bejelentkezés képernyőn shift lenyomása mellett leállítás
  • Parancssor indítása
  • mbr2gpt /validate
  • ha hibát jelez, mbr2gpt /validate /allowFullOS
  • mbr2gpt /convert
  • reboot, firmware-ben átállni UEFI boot-ra

reagentc nem tudta elvégezni a WinRE javítását, (Failed to update ReAgent.xml) de ennek ellenére működött.

Forrás, és egyéb tudnivalók

Microsoft dokumentáció

reagentc tippek

Különleges karakterek a Word keresés és csere ablakában

CharacterString
^1 or ^gPicture (inline pictures only)
^2, ^f (footnote), or ^e (endnote)Auto-referenced footnotes or endnotes
^5 or ^aAnnotation/comment mark
^19 or ^dOpening field brace (Use only when you are viewing field codes.) (Selects whole field, not just opening brace.)
^21 or ^dClosing field brace (Use only when you are viewing field codes.) (Selects whole field, not just closing brace.)
^?Any single character
^#Any digit
^$Any letter
^u8195Em space Unicode character value search
^u8194En space Unicode character value search
^bSection break
^wWhite space (space, nonbreaking space, tab)
^unnnnWord 2000 Unicode character search, where “n” is a decimal number corresponding to the Unicode character value
A keresésben használható karakterek

CharacterString
^&Contents of the “Find what” box
^cReplace with the Clipboard contents
A cserében használható karakterek

CharacterString
^9 or ^tTab
^11 or ^lNew line
^12Page or section break (Replaces a section break with a page break)
^13 or ^pCarriage return/paragraph mark
^14 or ^nColumn break
?Question mark
^-Optional hyphen
^~Nonbreaking hyphen
^^Caret character
^+Em dash
^=En dash
^mManual page break
^sNonbreaking space
^nnnWhere “n” is an ASCII character number
^0nnnWhere “n” is an ANSI character number
Mindkét mezőben használható karakterek

Forrás