limelect
Members-
Content Count
835 -
Joined
-
Last visited
-
Days Won
1
Everything posted by limelect
-
Create component ERROR in expert in D10.2.3
limelect replied to limelect's topic in RTL and Delphi Object Pascal
@David Hoyle You made me think and I just found that 1. It works on FMX 2 I did not do an extensive check but it seems to work with VISUAL and NON VISUAL. So why the difference? -
Create component ERROR in expert in D10.2.3
limelect replied to limelect's topic in RTL and Delphi Object Pascal
@David Hoyle if I use this IDs.CreateComponent(TComponentClass( Tlabel),GxOtaGetNativeComponent(lComponent),0,0,50,50) ; Tlabel not as a string it needs USES to work. Using TADOtable need USES. But it works. So I tried GetClass instead and it got me back to the ERROR; It seems that the main problem is the difference between VISUAL AND NON VISUAL. Since TADOtable workers in any configuration but Tlabel maks the ERROR 'not applicable to this module' So the question is if not this module then which one. In my case, I use the dfm/pas source Label3.Caption:= CurrentForm.FileName; <<<< DFM CurrentForm is derived from CurrentModule. Label4.Caption:=CurrentModule.FileName; <<<< PAS The objective is to place ANY component on a control be Form, Panel, or else. I did not get to the point of differentiating between VCL and FMX. Right now I am trying only to use VCL. And lastly the original source workers on D7 so there is a difference between the Delphi version although the sources (DesignIntf and more) seem to be the same. -
Create component ERROR in expert in D10.2.3
limelect replied to limelect's topic in RTL and Delphi Object Pascal
I finally have a solution with the help of GEXPERT @dummzeuch source It says "// If this starts crashing try IDesigner.CreateComponent" So I did var IDs: IDesigner; change create component to ids := (CurrentForm as INTAFormEditor).FormDesigner; if Assigned(IDs) then IDs.CreateComponent(TComponentClass( Tlabel),GxOtaGetNativeComponent(lComponent),0,0,50,50) ; I hop i did OK Any further help will be appritiated For me, it worked on D10.2.3 this is what I needed. -
Create component ERROR in expert in D10.2.3
limelect replied to limelect's topic in RTL and Delphi Object Pascal
Delphi and Embarcadero. "CurrentForm.CreateComponent" works on D7 !!! it creates the component. Can someone explain why? Is it a bug in Delphi? -
Create component ERROR in expert in D10.2.3
limelect replied to limelect's topic in RTL and Delphi Object Pascal
I would like to thanks @David Hoyle for his personal communication. It seems that "CurrentForm.CreateComponent" in another variation too give this ERROR "Class TLabel is not applicable to this module". Although the variables are correct. Using TADOtable instead of Tlabel is working. Any idea? -
Create component ERROR in expert in D10.2.3
limelect replied to limelect's topic in RTL and Delphi Object Pascal
@David Hoyle I did not want to bother you However i will send you the source. I used an old D6 project called ComponentSearch the project called cs very simple. It has a few pas so it is useless to put it here Thanks -
I have an expert I am trying to debug. On the host, I have a second Delphi. I hope all flags are for debugging. While running the Project I get errors like "Socket error 10048" I press Continue. "Could not bind socket". Continue. "Socket error". Continue. "Could not bind socket". Continue. Now I get my second Delphi. Installing the expert give me a working expert with blue points (debug) on the source. Now to my problem. Putting a debug (red line) does nothing. The expert works but does not debug (stop). I made sure (I hope) all flags are on. Any idea why and help.
-
@dummzeuch Suddenly it workes. What I did I deleted all files except the DPK and source. Before I had breakpoints ONLY on "the second instance". Now it is OK I did break on the "the first instance". Thanks and when I have any strange problem I DELETE all files except sources and usually it workes. Thanks @dummzeuch and all for the help
-
@dummzeuch On the second Delphi, all sources are with blue points. Does it not imply that I run in debug mode.? This is the first thing I made sure I am in debugging.
-
@Lars Fosdal Do you think does this affect the debug? Although the source on the second Delphi has blue points (debug).
-
In an application, I am using Marco Cantu https://blog.marcocantu.com/blog/2014_may_background_delphi_android_threads.html Thread. I have 2 questions 1. I am concerned pressing a button many times does not leave-in memory the last thread or do I have to make sure that before I create a new TThread.CreateAnonymousThread(procedure () that the old one does not exist? 2. On the same program, I would like to use Toast. (Using Notify works). I am trying to put Toast in Synchronize TThread.Synchronize(TThread.CurrentThread, procedure() begin {$IFDEF POSIX} ToastManager1.Toast('Finished Loading Contacts'); // ToastManager1. // FMXToast1.ToastMessage:='aaaaaa'; // FMXToast1.Show(self); // NotifyComplete; {$ENDIF} end); Android gives me a message NO DUPLICATE ALLOWED. So I guess I have to put the TOAST statement outside the thread. Any idea how to? I could put a flag and with timer use it but I do not like the idea.
-
It seems that moving the toast function to another form is the solution to my second question. I wonder why? Still, if someone can answer the first question. Thanks
-
@Attila Kovacs The joke is on me. Getit does not work on my D10.2.3 it shows an error. So I do not use it. That is life.
-
What happened to a new download? where is it? not on the page https://parnassus.co/delphi-tools/bookmarks/
-
This is what I get D10.2.3 Which ver is installed? Haa found it ParnassusBookmarksSetup_v1.5.2.0
-
I have an application running that uses and depends on explorer (NOT INTERNET EXPLORER). For some reasons once in a while working on my computer explorer closes and I have to open a new one. While this happens I have an explorer open and another one that is unseen.(Hidden). The problem: For my software to work properly I need ONLY ONE open explorer. The solution: To close the unseen explorer. What I tried: OleCheck(CoCreateInstance(CLASS_ShellWindows, nil, CLSCTX_INPROC_SERVER or CLSCTX_LOCAL_SERVER, IShellWindows, ShellWindows)); try for i := ShellWindows.Count - 1 downto 0 do < here shall window.count show 3 (for example). 2 unseen. one open ok. begin Dispatch := ShellWindows.Item(i); if Dispatch<> nil then Down the software, I can see the directory that the explorer shows the directory. The problem : in the loop down to 1 and 0 Dispatch is nil finally, I would like to have all 3 explorer and choose which one to close. P.S if I restart my computer I have 1 explorer open and everything is OK. Thanks for your help. Any piece of software can help. This is the program very useful http://limelect.com/downloads/explorer-list/
-
As I said we will meet again Today I had my problem again. Explorer was hidden. A while ago I wrote a program that shows the explorer directory name although explorer was HIDDEN. So I had an indication. Searching again for an answer I found a solution. https://stackoverflow.com/questions/12946150/how-to-bring-my-application-to-the-front I added SetWindowPos(WebBrowserApp.HWnd, HWND_NOTOPMOST,0,0,0,0, SWP_NOMOVE or SWP_NOSIZE); SetWindowPos(WebBrowserApp.HWnd, HWND_TOPMOST,0,0,0,0, SWP_NOMOVE or SWP_NOSIZE); SetWindowPos(WebBrowserApp.HWnd, HWND_NOTOPMOST,0,0,0,0, SWP_SHOWWINDOW or SWP_NOMOVE or SWP_NOSIZE); and it worked. It poped up explorer. Thanks again
-
TIP: How to preview any text file in File Explorer
limelect replied to Lars Fosdal's topic in Tips / Blogs / Tutorials / Videos
Just used it for dpr. Greate. Thanks for the info. No need for a tool. It took 2 min. I also added "Content Type" is it needed ? -
@Turan Can I have been researching this problem for a year now. The last conclusion is that it has a huge problem. Unsolvable especially between windows 7 and 10. Also, the program run "As administrator". I have a huge amount of software most in C but non gave a definitive answer. However "FastCopy" dose it locally while running but not all the time. And since I have its source in c++ I could not duplicate its behavior in Delphi. Whoever you buy a solution from check all the above before paying.
-
If you have no solution yet I have it on Freelancer.
-
Well we will meet again (and it might be a long time) when I have some news for you. Sorry, but it will take a long effort to find whats going on. It seems that d10.2.3 with my software does something to explorer. As I said the hidden comes and goes. However, the software on its own is full proof (i hope) and nothing like that happens. No complaints from people using it. I personally using it for years !! Thanks for your help
-
Ok, I did succeed to make a hidden explorer. How? by executing on D10.2.3 my software. I will keep you guys posted.
-
The only thing left is to scan the memory. But if the hidden disappear somehow I cannot reproduce it since I do not understand how it happens
-
@Fr0sT.Brutal One word. I tried. For the hidden, it did not help. No association to Explorer. If you think you know what hidden mean I am willing to learn. the fact is that even "Winspector - Ultimate Windows Spy Utility" did not help. The obvious fact that somehow the hidden disappear. It is a problem I never encounter. I cannot even make that happen. The only thing I am left with that ShellWindows.Count shows it exist. you can try , I am sure you will not be able to see the problem, or maybe yes? var ShellWindows: IShellWindows; if Succeeded(CoCreateInstance(CLASS_ShellWindows, nil, CLSCTX_LOCAL_SERVER, IID_IShellWindows, ShellWindows)) then Label2.Caption:=IntToStr( ShellWindows.Count);
-
My kind of work needs me to move from one directory to the other very often. Many but many times a day.