I have been using Delphi for a little over a month, but I still don't know how to do it right.
If I have methods that I can use in many projects, should I put them in a Unit, form or DataModule? I did not use the block (by itself), New-> Unit. Should I put my utilities there? If so, is there an example that I can look at, a textbook or something else. I have used DataModules in the past, although it gives me the impression that it should only be used when I am dealing with databases, etc.
Another thing, I customize some forms (for example, a form with some TEdits that do certain things). To use this, first add this to use in .dprCustomizedForm in '\CForm\CustomizedForm.pas' ;then I add CustomizedFormto use in my main form (where I will use it).Is this the right way to do this? I just guessed it seems to work, although I'm not really sure if this is the right way.
CustomizedForm in '\CForm\CustomizedForm.pas' ;
CustomizedForm
, , . , , , , . - . , .
, . , , . , , TImageList, , . - , , .
, , . , ( , , ), . ( , .)
, , Delphi . , - , . , Delphi, , Show ShowModal, , Release Free ( TForm.Release , , ), .
utils.pas. .
, , , .
: Delphi
Delphi Zarko Gajic, .
"" . " Camtasia" . Turbo Delphi, , - Delphi , - Delphi.
- StringUtils.pas, MathUtils.pas, DateTimeUtils.pas .. - ( , ...) .Delphi Project , ., ..I myself create a group of projects that includes the package MyProjectUtils.bpl, and I put all my utility modules and classes in this package. I never deploy it as a package, but since they are wrapped together, I can always verify that they all compile correctly, and that they are all immediately available for viewing in the IDE, etc.
Source: https://habr.com/ru/post/1754533/More articles:SWFUpload - breaks on DOM maneuvers - jqueryAre strongly typed ASP.NET MVC views smelly for composite models - asp.net-mvcHow to determine image height in jQuery? - javascriptHow can I get my form to be on top of everything all the time? - delphiParsing Date in Objective-C - objective-cWPF validation on one line? - syntaxWhat does SqlCommand.Parameters.AddWithValue really do? - sql-injectionWhen implementing bindView () for an adapter, can I skip a view? - androidjava - multiuser communication - javahttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1754538/give-anonymous-access-to-one-page-while-site-has-windows-authentication&usg=ALkJrhjpgv2nsDAJd7h2x5BlOZte42CqJgAll Articles