Jump to content

Ian Branch

Members
  • Content Count

    1431
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Ian Branch

  1. Hi Team, I have some SMTP email routines however I want to be able to check/confirm the ISPs smtp server is available before attempting to send the email. Thoughts/suggestions appreciated. Regards & TIA, Ian
  2. Ian Branch

    E2161 Warning: Duplicate resource

    Hi Team, Pulled up an old App renamed it and re-built it in D2007. I get the following Messages.. >> [DCC Error] E2161 Warning: Duplicate resource: Type 16 (VERSIONINFO), ID 1; File E:\DBiWorkflow D2007 Development\DBiManager\DBiManager.res resource kept; file E:\DBiWorkflow D2007 Development\DBiManager\verinfo.res resource discarded. >> [DCC Error] E2161 Warning: Duplicate resource: Type 24 (user-defined), ID 1; File E:\DBiWorkflow D2007 Development\DBiManager\DBiManager.res resource kept; file E:\DBiWorkflow D2007 Development\DBiManager\verinfo.res resource discarded. DBiWorkflow is the new name of the App. Never come across this before. What is the appropriate action to eliminate this warning pls? Where do I find reference to DBiWorkflow.res and verinfo.res in the project files? Is it any real concern? I note Delphi says after this that the "Project compilation failed" however it is actually there and runs as expected. Regards & TIA, Ian
  3. Ian Branch

    E2161 Warning: Duplicate resource

    Hi Team, Great minds..... I found it. It was in one of the source files. {$R verinfo.res} I took it out. Guess what? The file size jumped by about 500k. What the!!! Anyway, the duplicate warning is now gone. Regards, Ian
  4. Ian Branch

    E2161 Warning: Duplicate resource

    Thanks Peter, There is only a {$R *.res} in the project file so I guess it is coming from one of the 3rd Party libraries. It doesn't seem to affect the App at all although the 'Project compilation failed. message was disconcerting until I realized it was in fact built. Something to just put up with I guess. Regards & Tks again, Ian
  5. Ian Branch

    Minimize Button only on Form?

    Hi Team, I want to have the only the Minimize button border icon on the form but it seems I have to have the SystemMenu button on as well. :-( Is there any way to just have the minimize button and not the SystemMenu button? The form BorderStyle is bsSingle. Regards & TIA, Ian
  6. Ian Branch

    Minimize Button only on Form?

    Hi Schokohase, Thank you for the advice on the buttons. I was afraid of that. Philosophical discussion - On the aspect of 'User-friendly' - User-friendly is not what I or Microsoft say it is, it is what the User says it is. If he/she doesn't like the way it looks or the way it does it, it isn't user-friendly, to them. Yes, there tomes about the right way to do things however ultimately it is the User that decides. And ultimately they are the ones paying the Bills. 🙂 Regards, Ian
  7. Hi Team, Perhaps I am looking at this from the wrong perspective. The primary issue is the Customers Internet access/availability. The Customers are based in the Pacific and their Internet/ISPs tend to be a little iffy. Yesterday, one of the Customer's Internet access was down for 3 hours. :-( I think instead of testing for the smtp server I will simply test for the ability to access the internet with something like this.. uses ...., wininet; Function CheckUrl(url: string): Boolean; var hSession, hfile, hRequest: hInternet; dwindex, dwcodelen: dword; dwcode: array [1 .. 20] of char; res: pchar; begin if pos('http://', lowercase(url)) = 0 then url := 'http://' + url; Result := False; hSession := InternetOpen('InetURL:/1.0', INTERNET_OPEN_TYPE_PRECONFIG, nil, nil, 0); if assigned(hSession) then begin hfile := InternetOpenUrl(hSession, pchar(url), nil, 0, INTERNET_FLAG_RELOAD, 0); dwindex := 0; dwcodelen := 10; HttpQueryInfo(hfile, HTTP_QUERY_STATUS_CODE, @dwcode, dwcodelen, dwindex); res := pchar(@dwcode); Result := (res = '200') or (res = '302'); if assigned(hfile) then InternetCloseHandle(hfile); InternetCloseHandle(hSession); end; end; Just prior to the email creation. Regards, Ian
  8. Trying to save the User the hassle of creating the email in the first place if the SMTP Server is not available.
  9. OK. I Surrender. :-)
  10. Are they really that flaky?
  11. Hmmm. Yes, I could do that but I would rather test if the server is available when the App is started, not when I want to send an email.
  12. Ian Branch

    Restart the same App?

    Hi Tee, It does work well and I have integrated it into 3 Apps. I haven't checked it for memory leaks or anything under the hood. It does what I needed. As for publishing to GitHub, I'm afraid that's not in my knowledge base. :-( Regards, Ian
  13. Ian Branch

    Restart the same App?

    Hi Remy, Thank you for the clarifications and the assist. Much appreciated. Regards, Ian
  14. Ian Branch

    Delphi not responding to errors..

    Hi Team, D10.3.1. 32 bit. For reasons I don't understand my Apps have stopped responding to basic error. e.g. divide by 0 error. They just ignore them. They used to work. If I create a new App it responds OK but my existing apps don't. It is probably something I have changed but I can't discern what. Any advice/suggestions (polite :-) ) appreciated. Regards & TIA, Ian
  15. Ian Branch

    Delphi not responding to errors..

    Thanks Peter. Ian
  16. Ian Branch

    Delphi not responding to errors..

    Thanks Kruvich. I have it working now. What I have yet to find out is how/when it changed. :-( Attached are my current configurations. Regards & Tks for the pointers. Ian
  17. Ian Branch

    Delphi 10.3 Update 2 available

    timfrost I stand corrected.
  18. Ian Branch

    Restart the same App?

    Tks Remy, Works exactly as desired/needed. I had to change.. GetStartupInfo(@si); GetStartupInfo(si); No biggie. :-) Regards & Tks again. And to the others for your interest/support. Ian
  19. Ian Branch

    Restart the same App?

    Hi Remy, Thanks for that. I will give it a go. While trying to get the other routines I found going, I discovered the need to change Winapi.Windows to just Windows in the Uses area. I note your indication of just Windows in the uses area. What's the difference? It would seem they both can't be in the uses. Regards & Tks again, Ian
  20. Ian Branch

    Delphi 10.3 Update 2 available

    Timfrost - The post said "without the quotes".
  21. Ian Branch

    Restart the same App?

    Hi All, Thank you all for your pointers and consideration. I have now amassed the following routines which I think will get me there with some massaging. ExecuteAndWait. TerminateProcessByID. GetPIDByProgramName. ExecuteProcess. I will let you know how I go, or not. ;-) Regards & Tks again, Ian
  22. Ian Branch

    Restart the same App?

    Hi David, "Easy" Says he who knows how to do it. ;-) I have no idea how to do what you described. Ian
  23. Ian Branch

    Best delphi so far?

    Bit like 'What is the best Word Processor' - Comes down to experiences and preferences. I currently do all my main work in D10.3.1 and put up with the idiosyncrasies. For easy, simple, quick jobs, I prefer D2007. In fact, I would still use D2007 for everything except a number of 3rd Party libraries I use in D10.3.1 no longer support D2007. :-( That's the reality of 'progress'. I only program 32bit windows Apps. Nothing deliberately in UniCode. If all the fancy stuff, which I suspect is at the root of the issues with it, was removed fro D10.3.1 I would be happier.
  24. Ian Branch

    Formatter Line Breaks..

    Hi Guys, D10.3.1 I seem to recall from some time ago that there was a setting in the Delphi Formatter|Line Breaks that you could set/change so that single line If....then lines would be formatted to a single line as opposed to multi-line If...then...else. Is my memory faulty and there isn't such a setting/change? If it is there, I can't identify it att. Regards & TIA, Ian
  25. Ian Branch

    Formatter Line Breaks..

    Hi Uwe, Given the following single line if/then.. If something is true then do this; The Delphi formatter does this to it.. If something is true then do this; I want it to keep the original and reformat to single line if it is a single line If/then statement. The GExperts formatter does have the option to keep the single line if/then, see picture, but doesn't reformat the second case above back to a single line and then only in the current unit. Ian
×