Jump to content

Search the Community

Showing results for tags 'windows'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
    • Delphi Third-Party
  • C++Builder Questions and Answers
    • General Help
  • General Discussions
    • Embarcadero Lounge
    • Tips / Blogs / Tutorials / Videos
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Delphi-Version

Found 22 results

  1. Mark Billig

    Visible Application List

    I am trying to create a list of applications that are running and visible, similar to Windows "Task Manager" in simple view. I have been successful except for applications that are running elevated. I am trying to get the "File Description" property and as long as I can get the file name and path I can get the description. Is there a way to get the file description directly or a way to get the name and path of an elevated application? I have been searching but everything I have come across so far does not work.
  2. Specs: Delphi XE7, VCL, Win7, sleep mode I'm not sure this is possible. I've been searching around but don't think my search queries were able to pull results. I run an app every day and at the app's launch I put a time stamp on the caption bar. The app is run from my desktop, so it's on the 😄 drive. Now, I want to leave the app running even when I shut down the computer into sleep mode. And when I wake the computer up from sleep mode, I'd like to have my app know that and put another time stamp on the caption bar. So, says "myapp (1:30pm, 7:15pm). Is there any way I can let my app know that it came out of sleep mode and at what time I activated or Windows woke up or something?
  3. In Windows you can use the function " EmptyWorkingSet(GetCurrentProcess) " (from WinAPI.PsAPI) to release all memory to OS. I use it on my application when the memory used is over 50% of all system memory (this help also to reduce the effects of fragmentation). My applications use lot of images, near 2000 raw buffers / second (form some KB to some MB) and fragmentation is high. Every 4 / 5 days I look (from logs) that the application use that function. Normally the application stay on near one year, actively working 10 hours per day. You should look for equivalent function in Linux (I'm quite sure that should exists). Bye
  4. Hello, The memory is not freed and the program keeps the memory, this does not happen in Windows and only in Linux. Below is a simple example, but in everyday if the system is running for a few days the memory usage ends up being excessive, this does not happen in Windows Is necessary restar the program everday. Affected Debian 12, Delphi 11.2 Path 1 Ubuntu 22.04 Delphi 12.1. Sample simple program program Project1; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils, System.Classes; type TListaString = class V_String:String; end; var V_Listas: TList; ii, i : integer; V_Lista : TListaString; V_Run : Boolean; begin V_Run := true; V_Listas:=TList.Create; try while true do begin if V_Run then begin V_Run := false; for i := 0 to 3000 do begin V_Lista := TListaString.Create; for ii := 0 to 10000 do V_Lista.V_String := V_Lista.V_String + IntToStr(Random(99999)); V_Listas.Add(V_Lista); end; writeln('create 1'); sleep(5000); for i := 0 to 3000 do begin V_Lista := TListaString.Create; for ii := 0 to 10000 do V_Lista.V_String := V_Lista.V_String + IntToStr(Random(99999)); V_Listas.Add(V_Lista); end; writeln('create 2'); sleep(5000); for i := 0 to 3000 do begin V_Lista := TListaString.Create; for ii := 0 to 10000 do V_Lista.V_String := V_Lista.V_String + IntToStr(Random(99999)); V_Listas.Add(V_Lista); end; writeln('create 3'); sleep(5000); while V_Listas.Count > 0 do begin TListaString(V_Listas[0]).V_String := ''; TListaString(V_Listas[0]).Free; V_Listas.Delete(0); end; V_Listas.Free; end; writeln('free, but not free'); sleep(5000); end; { TODO -oUser -cConsole Main : Insert code here } except on E: Exception do writeln(E.ClassName, ': ', E.Message); end; end.
  5. function FMXMessageDialog(const AMessage: string; const ADialogType: TMsgDlgType; const AButtons: TMsgDlgButtons; const ADefaultButton: TMsgDlgBtn): Integer; var mr: TModalResult; begin mr:=mrNone; // standart call with callback anonimous method TDialogService.MessageDialog(AMessage, ADialogType, AButtons, ADefaultButton, 0, procedure (const AResult: TModalResult) begin mr:=AResult end); while mr = mrNone do // wait for modal result Application.ProcessMessages; Result:=mr; end; The code works fine. However depending on which monitor the dialog spawns on, on my system the text is clipped. Dragging the dialog back to monitor 1 from monitor 2 makes the dialog draw correctly. Delphi Alex 11.3. The scale on monitor 1 is 150% and and on monitor 2 it's 100%.
  6. After receiving my windows activation key for my new tablet, and after it "upgraded" my windows 10, to "Windows 10 2022 Update | Version 22H2" I was no longer able to access the windows sytem settings app. It sometimes pops up as a blank blue dialogbox with the familiar gear in the center, and then closes. For instance, when I right-click the desktop, and select 'Display settings' I get this error message (after the blue dialog box with the gear pops up and closes). "This file does not have an app associated with it for performing this action. Please install an app or, if one is already installed, create an association in the Default Apps Settings page." Or, when I try to open the Settings app directly, or Windows key+I, or from any place or method of activating Settings, I get this (below) and then it closes in a second or two. The following are things I have tried, I believe are all that I have tried so far: 1. open cmd and enter - sfc /scannow 2. open cmd and enter - Dism /Online /Cleanup-Image /CheckHealth 3. open cmd and enter - Dism /Online /Cleanup-Image /ScanHealth 4. open cmd and enter - Dism /Online /Cleanup-Image /RestoreHealth 5. open powershell and enter - * PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *immersivecontrolpanel*).InstallLocation + '\AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}" 6. open powershell and enter - * Get-AppXPackage -AllUsers -Name windows.immersivecontrolpanel | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register “$($_.InstallLocation)\AppXManifest.xml” -Verbose} 7. open powershell and enter - * Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml" -verbose} I've also tried a few of the registry hacks but they did not help. So now I am wondering what else can I do. Something in the 22H2 messed up the Settings's app's association. And I can't run a Settings Repair because I have to be in Settings to do that. Does anyone else have suggestions for me to try. I can create a system restore point and then try your suggestion(s). TIA
  7. tinyBigGAMES

    GamePascal Toolkit

    GamePascal™ is a professional indie game toolkit that allows you to do 2D game development using the Object Pascal language. Officially supporting Embarcadero Delphi® and FreePascal compilers on desktop PC's running Microsoft Windows® and uses Direct3D® for hardware accelerated rendering. It's robust, designed for easy use and suitable for making all types of 2D games and other graphic simulations. You access the features from a simple and intuitive API, to allow you to develop your projects rapidly and efficiently. There is support for textures, audio samples, streaming music, video playback, loading resources directly from a compressed and encrypted archive, a thin object-oriented actor/scene system, collision detection and much more. GamePascal, make 2D games in Pascal. Easy, fast & fun! https://gamepascal.org
  8. Hello, I have a CHM help file which will be opened by my program via the Microsoft Windows 1) 'HH.exe' or if the user pushes 'F1' on the keyboard Windows will do it via 2) 'HelpPane.exe'. The 'HelpPane.exe' information I have seen here. My problem: Option 1) is working flawless but option 2) will disable the 'Ctrl+C' (copy to clipboard) keyboard shortcut for the opened CHM help file. Does anyone know how to overcome this problem? Thanks! Michaell
  9. I am tackling my first Android app (Firemonkey) using RAD Studio. It is supposed to be a mobile version of a Windows VCL app I already did (language: Pascal). It has to access the same client dataset files (.xml) that the Windows app uses, which are stored in a local Windows network share. I have Googled and found all sorts of esoteric references to JCIFS, Samba, etc. I have got as far as installing JCIFS-1.3.19.jar under the Libraries folder in my Android Target node in Project Manager. So how do I actually use this in my app? Thanks in advance for any help you can give me
  10. I'm running Delphi XE7, and mysteriously/randomly Delphi XE7 will sometimes ONLY show the CPU view when debugging my 64-bit Windows app, and not let me step through any Pascal source. It will stop on a breakpoint but only show CPU view when the breakpoint is hit, and right click - View Source does nothing. When this occurs, if I go to the Modules view, none of the entry points and addresses are showing up for the program's .EXE itself. I can debug a .DLL module used by my project, that was compiled in Delphi, because the module entry points and addresses do show up when I click on that .DLL in the modules window, unlike when I click on the main .EXE in that same Modules window. When this issue occurs, quitting Delphi and restarting it does not resolve it. If I reboot the entire computer, this issue can resolve itself but may start happening again the same day. Today it occurred, and I rebooted, and it resolved it, but then it happened the 2nd time I ran the program in the IDE, which is very frustrating. I have yet to find a way to get the issue to resolve without rebooting. When this issue occurs with my project, I'm able to load a different 64-bit Delphi project and debug it, so it is not a matter of the XE7 debugger itself failing to load module entry points for the main .exe of all 64-bit apps, just the project I want to work on, and it's very mysterious, because I've gone a week or two at a time without the issue occurring with my project and then it happens and rebooting the machine is the only thing that may resolve it, at least temporarily. By the way, the Modules view does show the Base Address, Module Name and .rsm file for the program's .EXE but, again, when you click on the main exe then none of the entry points and addresses are showing up. I'll also mention that I can debug other projects with the same settings as my project when this issue occurs. When this issue occurs, and the main .EXE module is loaded for my project the Event Log does still indicate that the main .EXE has debug info. Any idea why this is occurring, and will it still occur after upgrading to the latest version of Delphi? I keep getting sales calls about upgrading. This was never an issue when I debugged 32-bit apps. Thanks, J.
  11. Hi all, This morning while debugging my FMX app in Windows I suddenly started getting an EOleException within the Notification Center while initialising. onecoreuap\base\diagnosis\platform\notifications\developer\toast.cpp(2389)\wpnapps.dll!63CC11A2: (caller: 63CB5660) ReturnHr(1) tid(14e0) 803E0105 The notification platform is unavailable. First chance exception at $776F9862. Exception class EOleException with message 'The notification platform is unavailable' I've never seen this before, but it may be related to my Windows setup having updated over the weekend to v2004 (19041.388). It looks suspiciously like MS have changed the way their notification APIs work in this update... Has anyone seen this before or know of a way to resolve it? There's nothing useful on Google about this error that I could find. Thanks
  12. Hi, As you may know the onShouldStartLoadWithRequest is not working with FMX.TWebBrowser on Windows and Linux platforms. Is OK with Android and MacOS A bug report has been filled a long time (5 years ago) and reported again and again https://quality.embarcadero.com/browse/RSP-11206 27/May/15 2:08 AM https://quality.embarcadero.com/browse/RSP-24414/May/19 2:34 AM the actual status is " Unresolved" without any other reply or solution For me this event is very useful when I try to execute a delphi function from the web browser (javascript) EX: ==== HTML / JAVASCRIPT BROWSER <div id="fresult"></div> <button type="button" onclick="callDelphi()">Call delphi function</button> <script> function callDelphi(){ window.location.href='https://www.fake.com/?func=HiDelphi'; } function setResult(dresult){ document.getElementById('fresult').innerHTML=dresult; } </script> ==== DELPHI UNIT procedure TForm1.wb_ViewShouldStartLoadWithRequest(ASender: TObject; const URL: string); begin if pos('www.fake',url)>0 then begin wb_View.Stop; /// IMPORTANT here we stop the browser if pos('HiDelphi',URL)>0 then wb_View.EvaluateJavaScript('setResult('' Hi from Delphi '')'); end; end; I am just wondering if you have another solution to call a delphi function from FMX TWebBrowser (a cross platform solution) The example is working only with Android and MacOS . For Windows I have used Chromium FMX (another web browser component from https://github.com/salvadordf/CEF4Delphi) I need one source code for multiple platforms and at this moment this is not possible because of this bug Did you know how to create/modify/use other strategy with FMX.TWebBrowser to achieve this? - stop the browser before load/process any URL? Thank you in advance.
  13. In my Service I want to to receive notification when the system is suspended or resumed (Hibernate/Sleep) so that I can Close Active Sockets connections. Similar questions have got the answer 'the service must use a HandlerEx() callback via RegisterServiceCtrlHandlerEx()' but I have not been able to use it in Delphi. Need more assistance please.
  14. Hello all, I would like to know what is best approach for making and displaying custom notifications in windows 10. Let me explain little bit more. I dont want to use standard win 10 notifications because they does not look and feel like they are from my app ( i cannot customize look of them how i want ) I want to show for example 200x100 notification on the right corner of the screen, notification should be 100% customizable to look like my design that i made in photoshop.. So I am not sure should I make some sort of borderless form and put some rectangles, images and labels that will represent look of my notification? Notifications should slide and auto-hide after lets say 5 seconds... So what would be best approach to this ? Also I have to mention that in my app I want to throw a lot of different notifications like when user click to save settings it should show notification, when user receive message it should pop up notification, when someone mention user name it should pop up notification and so on....... So my notifications dont need to stack on each other, if new notification should be displayed i will first remove any other notification and display that newest one thats my plan I am using FMX for this and OS windows Thank you
  15. FLDelphi

    Windows Build 1909

    What are the general experiences updating to 1909 and using Delphi? I can't say that past experience has made me at all excited to update. And this blog (http://delphicodemonkey.blogspot.com/2020/03/delphi-seattle-becoming-almost-unusable.html) has got me really spooked. Can anyone offer any other experiences using Windows 10 1909? Specifically we do all of our development in XE3 and Seattle. Edit: Sorry I wanted this to go under Windows, but mistakenly put it into VCL. I couldn't delete my own thread.
  16. Tntman

    Animating TListViewItem

    Hello members! I started learning delphi few months ago and recently i discovered that we can make really beautiful user interfaces with delphi FMX styles. I saw on the internet this animation demo ( This is just a design ) and I wanted to implement it in delphi: https://thumbs.gfycat.com/ShamelessConfusedAmbushbug-mobile.mp4 I was thinking to use ListView component in FMX for this with ItemApperance -> DynamicApperance. Everything was cool but i faced one problem. Problem is that I am not sure that TlistViewItem can perform animation when it is been added to the ListView. From my understandings i can only animate "Text1" and other items if i add them -> https://i.imgur.com/Y3SWIsT.jpg There is no option ( or I dont know how to find it ) To animate whole TListItemView when is added to a ListView. **WORKAROUND THAT I HAVE ON MY MIND** I was thinking to drop a ListBox and to add on it "TListBoxItem", after that i would right click it and Go on edit custom style, and try to make it look as i want. I tested this tutorial for editing the look of "TListBoxItem" and it is working nicely: https://www.experts-exchange.com/articles/10054/Implementing-a-ListView-in-Firemonkey.html For animation i planned to use this resources ( not tested, i dont know if it will work ) : So what is my question actually, well i would like to achieve similar design and effect from gif that i showed to you. I would like to use ListView with DynamicApperance. I would like to someone confirm me if that is possible and to give me some references or resource material where i could read more about it.. Also if there is someone who would like to give me a code example i would appreciate a lot. From my tests that i performed ( loop 1000 times, and add 1000 items on ListView and ListBox ) I can say that ListBox performed a lot slower so I would prefer ListView for this, also i think that using ListView here is better practice since ListView is more suitable for this situation based on this post: http://www.delphigroups.info/2/8f/544471.html At the end I just want to point out that im using FMX ONLY because i found it easier to make styles, this program is for Windows only platform. I am using Delphi Rio community ( Free version ). I would also like to add that option " Pull to refresh " that you see on that gif is not needed. Thank you for your answers and help! 🙂
  17. So I have this application, that runs smoothly on a standard PC, and does quite well on a tablet too. With one exception, the virtual keyboard causes quite the headache. Not only does Windows seem to have two different virtual keyboards, they behave quite differently too: First there is the keyboard that has to be actively opened by the user by clicking on the symbol in the tray area. This works fine, but has the disadvantage of "an additional click". (Image 1) Then there is a keyboard (image 2) that can be opened automatically when FMX.Types.VKAutoShowMode := TVKAutoShowMode.Always; is set. According to the fine manual this will cause the virtual keyboard to show even if there is a physical keyboard present. So as soon as the focus is set on an editable component like TEdit, this keyboard will popup and as soon as said component looses focus the keyboard will disappear. Now here's the tricky part: This keyboard looks different, and on some machines (HP tablets with an i5) takes ages (at least 30 seconds) to "pop up". On my VM that I'm running on a Mac with an i7, this happens instantly. Any user who knows iOS will consider option 1 to be "out of the question" so I use option 2, but for the life of me am not able to speed up the virtual keyboard popup process. This might just become a deal breaker, hence this post. TL;DR: Does anyone here have experience with virtual keyboards on Windows tablets, and knows how to open them up quickly on slower systems? Thanks, Sherlock
  18. There are 50 new cross platform samples for Delphi 10.3 Rio FireMonkey available over on Github. The demos heavily feature … http://www.fmxexpress.com/50-cross-platform-samples-for-android-ios-osx-windows-linux-and-html5-in-delphi/
  19. Hi, I have isolated another odd behaviour, and I am just dumping it here, to get it off my mind, and for your entertainment, of course. FMX only. Windows only. Edge case. Reproducible. With TMainMenu that wraps! (There are painting problems when ClientHeight is around Screen.WorkingAreaHeight and the number of menu rows changes because of changed ClientWidth.) unit FrmMain; interface (* The goal: - Maximize ClientHeight, but keep in control of aspect ratio of ClientArea. - Height should be Screen.WorkAreaHeight. - Width should be either Portrait (smaller, 800) or Landscape (larger, 1000). - Need to set Width/Height or ClientWidth/ClientHeight in code. - Prefer to set ClientWidth/ClientHeight over Width/Height. The plot thickens: - Have big TMainMenu component. - In Portrait MainMenu will wrap into two lines! - In Landscape MainMenu will fit on one line! The Problem: - ClientArea painting problem when MainMenu wraps/unwraps, when you toggle between Landscape and Portrait: Odd: - MainMenu.Height is not a property. - Changing MainMenu-Height seems to be part of the problem. - Missing space to grow the window is another part of the problem? Usage: Press buttons in order given below... Problem cases: a) Reset, Portrait, Landscape: - Black (unpainted) area at the bottom edge. b) Reset, Button2, Button1: - Black unpainted area at bottom edge of ClientArea in Window. - Button1 and Button2 not painted correctly, around bottom edge. c) Reset, Lanscape, Button1, Landscape: - Window too big, bottom edge behind task bar. These cases work as expected: d) Reset, Portrait e) Reset, Landscape f) Reset, Button 1 (like Portrait but via using Height property) g) Reset, Button 2 (like Lanscape but via using Height property) Steps: - In new, empty FMX project - rename Form to FormMain - paste test code - connect FormCreate, FormDestroy, FormKeyUp - run - hit keys instead of clicking buttons. *) uses System.SysUtils, System.Types, System.UITypes, System.UIConsts, System.Classes, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Controls.Presentation, FMX.StdCtrls, FMX.Menus, FMX.Layouts, FMX.Objects; type TFormMain = class(TForm) procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); procedure FormKeyUp(Sender: TObject; var Key: Word; var KeyChar: Char; Shift: TShiftState); procedure LandscapeBtnClick(Sender: TObject); procedure PortraitBtnClick(Sender: TObject); procedure ResetBtnClick(Sender: TObject); procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); private ML: TStringList; fa: Integer; MaxClientHeight: Integer; MaxClientHeight1: Integer; MaxClientHeight2: Integer; MenuHeight1: Integer; MenuHeight2: Integer; procedure InitMemoText; procedure InitMenu; procedure UpdateReport; function AddMenu(M: TMainMenu; Caption: string): TMenuItem; procedure InitItem(I: TMenuItem; fa: Integer); public MainMenu: TMainMenu; MemoText: TText; // ResetBtn: TButton; // PortraitBtn: TButton; // LandscapeBtn: TButton; // Button1: TButton; // Button2: TButton; end; var FormMain: TFormMain; implementation {$R *.fmx} procedure TFormMain.FormCreate(Sender: TObject); begin ML := TStringList.Create; { record this while there is no MainMenu } MaxClientHeight := Screen.WorkAreaHeight - (Height - ClientHeight); InitMemoText; InitMenu; { by now we 'know' the height of the main-menu-lines } MaxClientHeight1 := MaxClientHeight - MenuHeight1; MaxClientHeight2 := MaxClientHeight - MenuHeight2; UpdateReport; end; procedure TFormMain.FormDestroy(Sender: TObject); begin ML.Free; end; procedure TFormMain.FormKeyUp(Sender: TObject; var Key: Word; var KeyChar: Char; Shift: TShiftState); begin if KeyChar = 'a' then begin ResetBtnClick(nil); PortraitBtnClick(nil); LandscapeBtnClick(nil); end else if KeyChar = 'b' then begin ResetBtnClick(nil); Button2Click(nil); Button1Click(nil); end else if KeyChar = 'c' then begin ResetBtnClick(nil); LandscapeBtnClick(nil); Button1Click(nil); LandscapeBtnClick(nil); end else if KeyChar = 'd' then begin ResetBtnClick(nil); PortraitBtnClick(nil); end else if KeyChar = 'e' then begin ResetBtnClick(nil); LandscapeBtnClick(nil); end else if KeyChar = 'f' then begin ResetBtnClick(nil); Button1Click(nil); end else if KeyChar = 'g' then begin ResetBtnClick(nil); Button2Click(nil); end else if KeyChar = 'l' then begin LandscapeBtnClick(nil); end else if KeyChar = 'p' then begin PortraitBtnClick(nil); end else if KeyChar = 'r' then begin ResetBtnClick(nil); end else if KeyChar = '1' then begin Button1Click(nil); end else if KeyChar = '2' then begin Button2Click(nil); end end; procedure TFormMain.ResetBtnClick(Sender: TObject); begin ClientWidth := 800; ClientHeight := 600; Top := 100; UpdateReport; end; procedure TFormMain.LandscapeBtnClick(Sender: TObject); begin ClientWidth := 1000; ClientHeight := MaxClientHeight1; Top := 0; UpdateReport; end; procedure TFormMain.PortraitBtnClick(Sender: TObject); begin ClientWidth := 800; ClientHeight := MaxClientHeight2; Top := 0; UpdateReport; end; procedure TFormMain.Button1Click(Sender: TObject); begin ClientWidth := 800; Height := Screen.WorkAreaHeight; Top := 0; UpdateReport; end; procedure TFormMain.Button2Click(Sender: TObject); begin ClientWidth := 1000; Height := Screen.WorkAreaHeight; Top := 0; UpdateReport; end; procedure TFormMain.UpdateReport; begin ML.Clear; ML.Add('Button KeyChars:'); ML.Add(' r = Reset'); ML.Add(' p = Portrait'); ML.Add(' l = Landscape'); ML.Add(' 1 = Button 1'); ML.Add(' 2 = Button 2'); ML.Add(''); ML.Add('KeyChars for Test Cases:'); ML.Add(' a, b, c = Bad'); ML.Add(' d, e, f, g = Good'); ML.Add(''); ML.Add('Info:'); ML.Add(Format(' Screen.Height = %d', [Screen.Height])); ML.Add(Format(' WorkAreaHeight = %d', [Screen.WorkAreaHeight])); ML.Add(Format(' MenuHeight1 = %d', [MenuHeight1])); ML.Add(Format(' MenuHeight2 = %d', [MenuHeight2])); ML.Add(Format(' W-H = (%d, %d)', [Width, Height])); ML.Add(Format(' Client-W-H = (%d, %d)', [ClientWidth, ClientHeight])); MemoText.Text := ML.Text; end; procedure TFormMain.InitMemoText; begin MemoText := TText.Create(self); MemoText.Parent := self; MemoText.Position.X := 10.0; MemoText.Position.Y := 20.0; MemoText.TextSettings.WordWrap := False; MemoText.AutoSize := True; MemoText.Font.Family := 'Consolas'; MemoText.Font.Size := 14; MemoText.TextSettings.FontColor := claBlue; MemoText.TextSettings.HorzAlign := TTextAlign.Leading; MemoText.TextSettings.VertAlign := TTextAlign.Leading; end; procedure TFormMain.InitMenu; var i: Integer; ch1, ch2: Integer; begin MainMenu := TMainMenu.Create(self); MainMenu.Parent := self; ch1 := ClientHeight; for i in [1..8] do AddMenu(MainMenu,'Menu' + IntToStr(i)); ch2 := ClientHeight; MenuHeight1 := ch1 - ch2; for i in [9..16] do AddMenu(MainMenu,'Menu' + IntToStr(i)); ch2 := ClientHeight; MenuHeight2 := ch1 - ch2; end; function TFormMain.AddMenu(M: TMainMenu; Caption: string): TMenuItem; var j: Integer; begin result := TMenuItem.Create(M); result.Text := Caption; M.AddObject(result); for j in [1..2] do begin Inc(fa); InitItem(result, fa); end; end; procedure TFormMain.InitItem(I: TMenuItem; fa: Integer); var t: TMenuItem; begin t := TMenuItem.Create(I); t.Width := 50; t.Height := 50; t.Opacity := 1.0; t.Font.Size := 24; t.Text := 'Item' + IntToStr(fa); t.Enabled := True; t.Visible := True; t.Tag := Ord(fa); I.AddObject(t); end; end.
  20. Development

    sspi error with TWSocket

    Hi, I upgrade the ICS Overbyte version I used to be able to use this Library with RAD Studio 10.2 Tokyo (C++ Builder). I already have a version on a separare computer that works with Rad Studio XE5. Since I add a TWSocket component on a form, I can't compile the project anymore. I have an error : You must define one of SECURITY_WIN32, SECURITY_KERNEL or SECURITY_MAC from sspi.h file. I Added #define SECURITY_WIN32 at the beginning of my project by the problem is not solved. Can you help me ? Best regards,
  21. Hello, i did not find much information about this function but i would like to use it (or does delphi bring own dialog with that ability?) Here is wrapper i use: uses ShlObj; ... function PickIconDialog( IconHandle: HWND; var Filename: string; var IconIndex: Integer ): Boolean; var tmp : String; idx: Integer; begin Result := False; tmp := Filename; idx := IconIndex; if ( PickIconDlg( IconHandle, PWideChar( tmp ), 1023, idx ) <> 0 ) then begin Filename := String( tmp ); IconIndex := idx; Result := True; end; end; This is how i call it: procedure TfrmMain.btnGetIconClick(Sender: TObject); var IconFile: String; IconIndex: LongInt; begin IconFile := ''; IconIndex := 0; try IconIndex := StrToInt( edIconIndex.Text ); except IconIndex := 0; end; if ( PickIconDialog( Handle, IconFile, IconIndex ) = True ) then begin edIconLocation.Text := IconFile; try edIconIndex.Text := IntToStr( IconIndex ); except edIconIndex.Text := '0'; end; Image1.Picture.Icon.Handle := ExtractIcon( hInstance, PWideChar( IconFile ), Cardinal( IconIndex ) ); end; end; What happen is, i get correct Icon displayed but... Iconfilename often is invisible. Other edit fields are invisible overwritten with Value of Iconfilename, Most of time, every field that has no value on start will be invisible overwritten. (ATM i do by workaround, i fill every field before operation with any data) Do i use it wrong? Does better ways exists to have such dialog?
  22. Gnostice Document Studio Delphi version 2018 R2 Build 18.2.2831 released with C++Builder support, new SKUs and more. Highlights in this release: - Marketing name changed to Gnostice Document Studio Delphi. This has no impact on code. - SKUs have been reorganized to cater to popular demands. SKUs based on popular demand. - Essential [$250], Professional [$450], and Ultimate [$600] are the new SKUs. - Essential edition replaces ReportExport edition. Customers of ReportExport edition with an active subscription get a free upgrade to Essential. - Ultimate edition includes all features of Professional + 1 full license of Gnostice StarDocs Document Server Viewer edition. - Support for C++Builder. - PDF rendering enhancements and much more. For the full release notes, please have a look at the following page: https://bit.ly/2vRt2sq To know more about Gnostice Document Studio Delphi, please browse to:https://bit.ly/2nKIeDl https://bit.ly/2nKIeDl To download the trial version, please browse to: https://bit.ly/2zz06Xn Please mail us at support@gnostice.com, if you have any questions. Thank you, The Gnostice DevTools Team https://www.gnostice.com #PDF #Delphi #FireMonkey #DocumentStudio #Windows #macOS #iOS #Android
×