Quantcast
Channel: Delphi Forum - Delphi Programming Kings of Code - Delphi Programming
Viewing all 173 articles
Browse latest View live

Whatsapp with Delphi

$
0
0
Has anyone, or knows,  a solution for sending and receiving whatsapp messages with delphi?
 

How to create installer(.exe, .msi) from delphi project with database (sql server)

$
0
0
- Help me. How to create installer from delphi project and database in sql server.İmage. thanks.
 

 

 

 

Add MultiLine Notifications For Firemonkey In Delphi 10 Seattle

How to create installer from vcl form project delphi with database SQL Server

$
0
0
- I have a vcl form project delphi connect database in SQL Server. I want create installer file to install in others computer.
- I used to Advanced Installer or Inno setup but couldn't create installer file include database. You can help me? Thanks. İmage
 

Perfect Age Anti Wrinkle Cream

$
0
0
Shallot deal from captains imperial era think Icannot and he re- flower that one in the yeah like packaging is my favorites like shave gels weight spr nah it's liquid then that finds out and I just love it sent is beautiful I love all the  fans in the Bellesse range here regularly on salefor less than three that's normally around five dollars they might showers just an absolutely wonderful time I love these find this on tonight knows I few picas from the drugstore would be the Sally Hansen miracle cure use this as a base coat it does I really nice job I think it helps my nails st strong and then I'm also using I had a taco as well but really like that one Sally Hansen and my choice of nail polish from the truck still would be from bourgeois.

http://eyebornfacts.org/bellesse/

Display PDF firstpage

$
0
0
Hi guys,
i searching for a solution to display then first page on a form look like a TImage, so users have a preview next to a line from a database. I think i can do this with an activex from acrobatreader.
is there any other component that can also? (without activeX or dll)

thanks for support
captnemo
 

 

 

 Sorry, wrong forum. can any mod move it to the right?

Word OLE automation and read-only files

$
0
0
Hi,

If you open a read-only Word document or a document from email attachment or something else the Word considers that should not be edited, the document opens in some Read-only mode. If you wish to edit this file, there is an option in View->Edit Document. I had a problem how to enter this edit mode via OLE automation from Delphi. After a lot of time, I discovered ReadingLayout property. For example:


Code:
var
WordApplication : Word_TLB._Application;
WordDocument : Word_TLB._Document;
begin
WordApplication := CoWordApplication.Create;
WordDocument:=WordApplication.Documents.Open('Test.docx',EmptyParam,True,EmptyPa​ram,EmptyParam,EmptyParam,EmptyParam,EmptyParam,EmptyParam,EmptyParam,EmptyParam​,EmptyParam,EmptyParam,EmptyParam,EmptyParam,EmptyParam);
WordDocument.ActiveWindow.View.ReadingLayout:=False;
...

Off course, read-only mode can be disabled in Word options, but I can not know in advance whether someone has disabled this option or not Smile

Best regards!
 

 

 

 

 

 

 

Multithreading with OmniThread library

$
0
0
Multithreading is something that is and will be unavoidable in the future programing, if we want to build fast and effective applications.
OmnithreadLibrary is one of the best multithreading library and is completely free. It is developed for years now and is very unique.

You can't view the links! Click here to register

Newest version: You can't view the links! Click here to register

And some very nice youtube video about multithreading with OmniThreadLibrary: You can't view the links! Click here to register
 

 

Update 1 for Delphi and C++Builder XE

$
0
0
This file contains important supplementary information that might not appear in the main product documentation. Embarcadero Technologies recommends that you read this file in its entirety.This document refers to "the product" when the information applies to RAD Studio XE or to either or both of the two personalities: Delphi XE and C++Builder XE.For general information about installation, deployment, and licensing, see the InstallDeploy, and License files located, by default, at C:\Program Files\Embarcadero\RAD Studio\8.0.You can't view the links! Click here to register  Contents You can't view the links! Click here to register  Installing This UpdateDelphi and C++Builder XE Update 1 is an MSI-based patch.This update can be applied over any of the following products:
  • Delphi XE
  • C++Builder XE
  • RAD Studio XE
You can install this update in any of the following three ways: You can't view the links! Click here to register  Upgrading via the Automatic Upgrade MechanismIf you selected "Check for Updates Automatically" when you installed the product, you should automatically be notified when an update is available for download.Click the notification and follow the instructions to download and install the Update.You can't view the links! Click here to register  Manually Checking for UpdatesIf you don't receive an automatic notification about the update, you can check for updates manually:
  1. Select Start | Programs | Embarcadero RAD Studio XE | Check for updates.
  2. In the list of available updates, select RAD Studio XE Update 1.

You can't view the links! Click here to register  Downloading from the Registered Users Web PageUpdate 1 is also available for download from the registered users download pages as follows: Download <RADStudioXEUpdate1.zip> to your computer and extract the zip file to install the update.Note: This update process might take fifteen minutes or more to complete. You should avoid stopping the Update installation once it has started.You can't view the links! Click here to register  Uninstalling this UpdateIf you need to uninstall the update, you must uninstall the entire product and reinstall the RTM build. It is not possible to uninstall only the update.You can't view the links! Click here to register  General NotesFor a complete list of the specific problems fixed in this update, see the "List of Bug Fixes in Delphi and C++Builder XE Update 1" at: You can't view the links! Click here to registerYou can't view the links! Click here to register  Known Issues
  • On Windows Vista® and Windows 7TM, a spurious warning message has been observed. If you receive a warning at the end of the installation (stating that setup may not have completed successfully), but you did not see any errors during the actual install, please disregard the warning about setup not completing successfully.
  • On some systems with 64-bit processors and 64-bit Windows 7, setting hardware-based data breakpoints can make the debugger unstable. On such systems, the problem can be avoided either by not using hardware-based data breakpoints or by installing 32-bit Windows 7.
  • For a C++ ActiveX Library that contains a COM Object, after you delete the last child of a parent node and then add new children to the parent node, the new child node does not appear if the parent node was previously expanded. To display the newly added child node, right-click the parent node and select Expand All.
  • During installation of the update, you might encounter Installer error 2318, "Insufficient privileges to modify etm.exe and etm.jdbg" if installation of the ITE/ETM files was turned off in a previous install. The error occurs when the installer tries to update the Integrated Translation Environment (ITE) feature but it is not present. The update installer can be tricked by creating dummy files at the location specified in the error message. However, the best solution is to modify the existing installation and enable the ITE feature in the installer, following these steps:
    1. Click Start | Embarcadero RAD Studio XE | Modify, Repair, Uninstall.
    2. On the Select Features page of the installer, locate the Integrated Translation Environement feature in the custom install list.
    3. Click the X and select Will be installed on local hard drive.
    4. Complete the installation.
    5. Now you can install Update 1.
    6. After installing Update 1, to turn the ITE feature back off (if you do not want it installed), repeat steps 1-4, except that you should select Entire feature will be unavailable for the ITE feature on the Select Features page of the installer.
  • The Microsoft Platform SDK help is no longer automatically installed with the product help (this change occurred at the XE release). When applying Help Update 1 to a system that had the previous Help installed with the Microsoft Platform SDK help, Help Update 1 uninstalls the SDK help, and does not re-install it.However, you can still install the Microsoft Platform SDK help by accessing the help installer, following the steps below: 

    To install the Microsoft Platfrom SDK help when you are installing the help or the help update:
    1. When you run the help installer, find the Select Features page.
    2. Click the X button in front of "Microsoft SDK Help" and then click Will be installed on local hard drive.
    3. Complete the help installation.

     To install the Microsoft Platfrom SDK help after you have completed the installation of the Delphi and C++Builder Online Help or the help update:
    1. Uninstall the Delphi and C++Builder XE Help System. (Instructions are given in the Readme for Help Update 1, online at You can't view the links! Click here to register
    2. Run the help installer and find the Select Features page.
    3. Click the X button in front of "Microsoft SDK Help", and then click Will be installed on local hard drive.
    4. Complete the help installation.

  • Using a different button to e-stop the robot instead of the space key

    $
    0
    0
    I was wondering if there was anyway of changing the emergency stop key of the driver station to some thing other than the space key. The point of this is to allow driving and programming to be done on the same laptop so we can easily tweak values without having to disable, deploy, and then re-enable. Are there any easy ways of doing this, or would it be better to create our own driver station? Disabling the robot to deploy code is not an option in our case. Thank you.

    Delphi 2007 verses XE7

    $
    0
    0
    Simple problem.
    CANUSB dongle and support DLL along with project in a folder on the P: drive common to all systems.

    Delphi project created and running on XP with 2007. No problem opening up the CANUSB and accessing the Version #. Code size about 607K bytes.
    ..
    Same project, same folder but compiled on WIN-7 64 bit using XE7 for WIN32 target. Code size 2.4MB. Call to open USB device fails. Behaviour is the same on a laptop running WIN-7 64 bit. Runs but can't open the CANUSB.

    On a VISTA laptop (32 bit) running Delphi 2007 the compiled code also functions and opens up the CANUSB device.

    Now here's the kicker. The Delphi 2007 code created on the WIN-XP system (607K) runs without problems on the WIN-7 systems opens up the CANUSB and can communicate with it.

    Since all systems open the same TailLightMaster.proj in the same folder and put executable there and the Delphi 2007 then runs properly on any system there's clearly a difference.

    But what? It's the same project file. Where do I even start to look?

    Ideally I'd set some other flags in the WIN-XP system that would influence the WIN-7 XE7 version.

    Converting Char to String and String to Char for the Android platform

    $
    0
    0
    Hello everyone!
    I was wondering if someone can help. I wrote the following code:Code:
    PHP Code:
    procedure TForm4.FormCreate(SenderTObject);
    Var
     
    StringInputVariable String;
     
    CharVariable Char;
     
    StringOutputVariable String;
    begin
     StringInputVariable 
    := 'w';

     
    CharVariable := Char(StringInputVariable[1]);

     
    StringOutputVariable := String(CharVariable);

     
    Label1.Text := StringOutputVariable;
    end
    When I Run for the Android platform I get absolutely no output in Label1 - I was expecting a 'w' in Label1.Text. The program compiles without any errors. When I compile for 32 - bit Windows I get a 'w' in Label1.Text as expected. My program basically takes a one character string input, then converts it to char, then converts it back to string and then writes this string on the screen as Label1. Why does this not work for the Android platform and how can I do workable conversions?

    AfterCreate

    $
    0
    0
    I need an AfterCreate in a Tobject because I need the MemoryStream to operate.
    If I had a component their must be a way to catch the state designtime/Runtime 

    But I have an object so I was thinking of using a thread with a sleep that will drive AfterCreate and destroy its self. And give a Boolean saying AfterCreate has run.

    Can you see any problems with this idea
    Should I use the thread to execute a message to run AfterCreate as a safer way to remove any conflicts.
    TApplication.Idile is an event little hard to reach I think and may get used twice
    Using Delphi 7
     

     

    Android Memory Access

    $
    0
    0
    Android Memory Access
    Quote:Hi everyone. I was wondering if someone might help. I am very new to Firemonkey programming for the Android platform. As soon as I try to do some IO operation to the memory of my android device I get a black screen on my android device and my application doesn't run. My application compiles without errors and I receive absolutely no error messages. I have tried two routes : 1.
    The "AssignFile, Rewrite, Reset, Read, Write , CloseFile" way as well as the 2. TFilestream way to do memory operations. As soon as I do the IO Write my application doesn't work and only give me a black screen. Other android applications work well. Please someone help! Jacobus Opperman

    Need help for a FireDAC component

    $
    0
    0
     İmage Need help for a FireDAC component
    Quote:Hello everybody !

    I need some help for the TFDBatchMove component.

    I have created a method that must copy a source table to a table that does not exist yet in my database (this table would be a kind of clone).

    I am testing what FireDAC can offer.

    According to Embarcadero the TFDBatchMove component can create a table during the copying process by using the options property.

    In the sample code I have added below, there is some comment about what I did with BDE components in order to compare both technologies. You will see that BDE let me do what I expect to do with FireDAC.

    I am sure that I am making a mistake but I don't know where exactly.

    Here the source code:PHP Code:
    Code:
    [code]
    [color=#000000][color=#0000bb] [/color][color=#ff8000]// I give my source table name and clone table name [/color]
    [color=#0000bb]procedure TDBConnection[/color][color=#007700].[/color][color=#0000bb]CopyTableToCloneTable[/color][color=#007700]([/color][color=#0000bb]ASourceTableName[/color][color=#007700], [/color][color=#0000bb]ACloneTableName[/color][color=#007700]: [/color][color=#0000bb]string[/color][color=#007700]); 
    var 
      [/color][color=#0000bb]FFDCloneTable [/color][color=#007700]: [/color][color=#0000bb]TFDTable[/color][color=#007700]; [/color]
    [color=#0000bb]begin 
      
      [/color][color=#007700]try 
      
          [/color][color=#0000bb]FFDBatchMove[/color][color=#007700].[/color][color=#0000bb]Options [/color][color=#007700]:= [[/color][color=#0000bb]poClearDestNoUndo[/color][color=#007700], [/color][color=#0000bb]poIdentityInsert[/color][color=#007700], [/color][color=#0000bb]poCreateDest[/color][color=#007700]]; [/color][color=#ff8000]// I ask to create the destination table 
          [/color][color=#0000bb]FFDCloneTable [/color][color=#007700]:= [/color][color=#0000bb]TFDTable[/color][color=#007700].[/color][color=#0000bb]Create[/color][color=#007700]([/color][color=#0000bb]nil[/color][color=#007700]); 
          try 
      
            [/color][color=#0000bb]FFDTable[/color][color=#007700].[/color][color=#0000bb]Active [/color][color=#007700]:= [/color][color=#0000bb]False[/color][color=#007700]; 
            [/color][color=#0000bb]FFDTable[/color][color=#007700].[/color][color=#0000bb]ConnectionName [/color][color=#007700]:= [/color][color=#0000bb]FFDConnection[/color][color=#007700].[/color][color=#0000bb]ConnectionName[/color][color=#007700]; 
            [/color][color=#0000bb]FFDTable[/color][color=#007700].[/color][color=#0000bb]TableName [/color][color=#007700]:= [/color][color=#0000bb]ASourceTableName[/color][color=#007700]; 
            [/color][color=#0000bb]FFDTable[/color][color=#007700].[/color][color=#0000bb]Active [/color][color=#007700]:= [/color][color=#0000bb]True[/color][color=#007700]; 
      
            [/color][color=#0000bb]FFDCloneTable[/color][color=#007700].[/color][color=#0000bb]Active [/color][color=#007700]:= [/color][color=#0000bb]False[/color][color=#007700]; 
            [/color][color=#0000bb]FFDCloneTable[/color][color=#007700].[/color][color=#0000bb]ConnectionName [/color][color=#007700]:= [/color][color=#0000bb]FFDConnection[/color][color=#007700].[/color][color=#0000bb]ConnectionName[/color][color=#007700]; 
            [/color][color=#0000bb]FFDCloneTable[/color][color=#007700].[/color][color=#0000bb]TableName [/color][color=#007700]:= [/color][color=#0000bb]ACloneTableName[/color][color=#007700]; 
            [/color][color=#0000bb]FFDCloneTable[/color][color=#007700].[/color][color=#0000bb]Active [/color][color=#007700]:= [/color][color=#0000bb]True[/color][color=#007700]; 
      
      
      
            [/color][color=#0000bb]FFDBatchMoveDatasetReader[/color][color=#007700].[/color][color=#0000bb]DataSet [/color][color=#007700]:= [/color][color=#0000bb]FFDTable[/color][color=#007700]; 
      
            [/color][color=#0000bb]FFDBatchMoveDatasetWriter[/color][color=#007700].[/color][color=#0000bb]DataSet [/color][color=#007700]:= [/color][color=#0000bb]FFDCloneTable[/color][color=#007700]; 
      
      
            [/color][color=#0000bb]FFDBatchMove[/color][color=#007700].[/color][color=#0000bb]Reader [/color][color=#007700]:= [/color][color=#0000bb]FFDBatchMoveDatasetReader[/color][color=#007700]; 
            [/color][color=#0000bb]FFDBatchMove[/color][color=#007700].[/color][color=#0000bb]Writer [/color][color=#007700]:= [/color][color=#0000bb]FFDBatchMoveDatasetWriter[/color][color=#007700]; 
            [/color][color=#0000bb]FFDBatchMove[/color][color=#007700].[/color][color=#0000bb]GuessFormat[/color][color=#007700]; 
            [/color][color=#0000bb]FFDBatchMove[/color][color=#007700].[/color][color=#0000bb]Execute[/color][color=#007700]; 
      [/color]
    [color=#ff8000]//******************** BDE Version *************************** 
    //        FCloneTable.DatabaseName := FDatabase.DatabaseName; 
    //        FCloneTable.TableName := ACloneTableName; 
    // 
    //        FTable.Active := False; 
    //        FTable.DatabaseName := FDatabase.DatabaseName; 
    //        FTable.TableName := ASourceTableName; 
    //        FTable.Active := True; 
    // 
    //        FBatchMove.Source := FTable; 
    //        FBatchMove.Destination := FCloneTable; 
    //        FBatchMove.Mode := batCopy; 
    //        FBatchMove.Execute; 
      
      
          [/color][color=#0000bb]finally 
            FreeAndNil[/color][color=#007700]([/color][color=#0000bb]FFDCloneTable[/color][color=#007700]); 
          [/color][color=#0000bb]end[/color][color=#007700]; 
      
      [/color][color=#0000bb]except 
        raise[/color][color=#007700]; 
      [/color][color=#0000bb]end[/color][color=#007700]; 
      [/color]
    [color=#0000bb]end[/color][color=#007700];  [/color][/color]

    When I run this code, a message says that the destination table doesn't exist . I use MS Access for testing.

    If anyone could help me, that would be nice 

    Thank you very much.

    Access Violation Trying to modify folder's permissions

    $
    0
    0
    Hello guys,
    I'm trying to make a little bit of code to create a folder and allow everyone modify access to the folder and its sub-directories. So far I have this code here :Code:
    PHP Code:
    unit ModifyPerms;

    interface

    uses
      Windows
    MessagesSysUtilsClassesGraphicsControlsFormsDialogs,
      
    StdCtrlsAccCtrlperms;

    type
      TForm1 
    = class(TForm)
        
    Button1TButton;
        
    procedure Button1Click(SenderTObject);

      private
        { Private 
    declarations }
      public
        { Public 
    declarations }
      
    end;

    var
      
    Form1TForm1;

    implementation
    {$R *.DFM}

    procedure TForm1.Button1Click(SenderTObject);
    var
      
    NewDaclOldDaclPACl;
      
    SDPSECURITY_DESCRIPTOR;
      
    EAPEXPLICIT_ACCESS_A;
    begin
      GetNamedSecurityInfo
    (PChar('c:\test'), SE_FILE_OBJECT,
    DACL_SECURITY_INFORMATIONnilnil, @OldDaclnilSD);

      
    BuildExplicitAccessWithName(@EAPChar('Everyone'), GENERIC_ALL,
    GRANT_ACCESSSUB_CONTAINERS_AND_OBJECTS_INHERIT);

      
    SetEntriesInAcl(1, @EAOldDaclNewDacl);

      
    SetNamedSecurityInfo(PChar('c:\test'), SE_FILE_OBJECT,
    DACL_SECURITY_INFORMATIONnilnilNewDaclnil);
    end;

    end
    I'm using Delphi 5 (I know it's old as crap, no I can't just upgrade to a newer Delphi). When I run it tells me "Project ModifyPermissions.exe raised exception class EAccessViolation with message 'Access violation at address 00000001. Read of address 00000001'. Process stopped. Use Step or Run to continue.

    I tried running the program in admin mode, it doesn't change anything. I'm confused since I got this code from someone who's program was working... Any help would be appreciated, thanks in advance! İmage

    Delphi newbie here , please help

    $
    0
    0
     Code:
    PHP Code:
    var
      
    Form1TForm1;

    implementation

    {$R *.dfm}

    procedure TForm1.BitBtn2Click(SenderTObject);
    var
     
    sName sYearOfBirth sCurrentYear string;
     
    iCurrent iBirth iAgeiKidsiJuniorsiBigKidsiTeensiSeniorsiCurrentAge integer;

    begin
    sName 
    := Edit1.Text ;
    sYearOfBirth := Edit2.Text;
    sCurrentYear := Edit3.Text ;
    iBirth := StrToInt(sYearOfBirth);
    iCurrent := StrToInt(sCurrentYear) ;
    iCurrentAge := (iCurrent iBirth);
    RichEdit1.Lines.Add' Name of entrant is:' sName) ;
    RichEdit1.Lines.Add' Your age this year is ' IntToStr(iCurrentAge) ) ;

    case 
    iAge of
     3..5 
    Inc(iKids);
     
    6..8 Inc(iJuniors);
     
    9..10 Inc(iBigKids);
     
    13..16 Inc(iTeens);
     
    17..18 Inc(iSeniors);

    if 
    iAge iCurrentAge
     then RichEdit1
    .Lines.Add(' You are eligble to enter this section ')

    [
    font]end;[/font]
    end;
    end
    So my problem is that it keeps on giving me 'constant expression exprected' error at the first 'end;' and I have no idea why , any help please 

    My project is as follows I'm trying to create an application of that when the user clicks the Process button the program must calculate and display the age of the entrant . This must be checked to see if they are eligible to enter the selected age group category. The program must indicate whether the entrant is allowed to participate according to his/her age.

    Using the if , and case statement also Richedit , this is a school task . Any help would be appreciated İmage

    Email using Thunderbird

    $
    0
    0
    I have an applciation where i want to send a normal email with an attachment via thunderbird. 
    Using Outlook seems easy. I got that to work. Some of my clients use thunderbird. I like to get this working here as well.
    I dont want to rely on the DEFAULT emailing program in windows. It does not always work. I found one solution but dont get it working at all. Compling error.
    Code:
    PHP Code:
    ShellExecute(Handle'path\to\thunderbird.exe',
        
    '-compose "to=foo@nowhere.net,attachment=''file:///c:/test.txt''", 
        nil, SW_SHOWNORMAL); 
    Is there is simple way? The above code i cannot get working. I get an error. Incompatibe types integer and widestring. 
    If shellexcute does not work is there any other ideas?

    Please can someone help?

    Thanks

     

    Dbgrid indicator

    $
    0
    0
    I have a dbgrid wich i change the colour of the columns and or rows dependant on the datat taht is displayed. (ondrawcolumnscell).. 
    As soon as i do this my indicator dissapears. The indicator on the far left is still there but normally if you select a row it turns blue. 
    It does not do that any more. Strangely enough the client is complaining as he needs to concentrate to look in a straight line to cetrain value son the grid.

    Is there a way around it?

    Thread: Showwindow(Handle,sw_Shownormal) Return the black screen form

    $
    0
    0
     İmage Delphi newbie here , please help
    Quote:Code:
    PHP Code:
    var
      
    Form1TForm1;

    implementation

    {$R *.dfm}

    procedure TForm1.BitBtn2Click(SenderTObject);
    var
     
    sName sYearOfBirth sCurrentYear string;
     
    iCurrent iBirth iAgeiKidsiJuniorsiBigKidsiTeensiSeniorsiCurrentAge integer;

    begin
    sName 
    := Edit1.Text ;
    sYearOfBirth := Edit2.Text;
    sCurrentYear := Edit3.Text ;
    iBirth := StrToInt(sYearOfBirth);
    iCurrent := StrToInt(sCurrentYear) ;
    iCurrentAge := (iCurrent iBirth);
    RichEdit1.Lines.Add' Name of entrant is:' sName) ;
    RichEdit1.Lines.Add' Your age this year is ' IntToStr(iCurrentAge) ) ;

    case 
    iAge of
     3..5 
    Inc(iKids);
     
    6..8 Inc(iJuniors);
     
    9..10 Inc(iBigKids);
     
    13..16 Inc(iTeens);
     
    17..18 Inc(iSeniors);

    if 
    iAge iCurrentAge
     then RichEdit1
    .Lines.Add(' You are eligble to enter this section ')

    end;
    end;
    end
    So my problem is that it keeps on giving me 'constant expression exprected' error at the first 'end;' and I have no idea why , any help please 

    My project is as follows I'm trying to create an application of that when the user clicks the Process button the program must calculate and display the age of the entrant . This must be checked to see if they are eligible to enter the selected age group category. The program must indicate whether the entrant is allowed to participate according to his/her age.

    Using the if , and case statement also Richedit , this is a school task . Any help would be appreciated İmage


     

     
    Viewing all 173 articles
    Browse latest View live


    <script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>