Hello,
Malwarebytes recently started blocking all my applications created by MVD 6.5. It says that SQLITE3.DLL is infected with malware.

Malware.AI.6063088, C:\USERS\USER\DESKTOP\PROJECT 10\SQLITE3.DLL

PLEASE HELP!!!!!! I CAN NOT run any of my MVD applications on any computer with Malwarebytes on it.

This is the sample project

Working on a project I found a bug on Version 6.5 while enabling the Multi Select on Combo Boxes. The very first value on the drop down is a big rectangle at the top of the drop down. This rectangle is  also hiding the first record making it difficult to select the items.

Please advice.

4

(1 replies, posted in Script)

Need help on loading docx documents to rich text.

Does anyone know how to load a Docx document to a Rich Text field?

The following code allows me to save RichEdit text to a word document .docx

procedure Form1_Button1_OnClick (Sender: TObject; var Cancel: boolean);
var FilePath: String;
begin
        FilePath:='C:\Temp\document.docx';
        Form1.RichEdit1.SaveDocX(FilePath);
end;

Does anyone know how to read back the document to  Form1.RichEdit1?  There is no  Form1.RichEdit1.LoadDocX(). Please advise.

Hello, It looks like I found a bug with the code to save and read RichText files RTF not sure if its happening on older versions but I know is happening on version 6.4.

So this is the scenario. I'm using the following code to read and save rich text documents on my projects. Which I had no issues.

       Form1.RichEdit1.LoadRTF(FilePath);
       Form1.RichEdit1.SaveRTF(FilePath,False);
 

After a while of working on my projects I notice that the files were taking a long time to load and the files where getting super big even though I did not had a lot of information. IT seems, the above code is adding extra lines at the beginning of the document and thus is making the .rft document huge.  THIS IS VERY IMPORTANT. It only happens after opening and saving many documents, it seems  Form1.RichEdit1 is not clearing some of the formatting. When I open the program for the first time the issue does not happen and if I click on the icon to create a new document. The issue disappears.

{\listlevel\levelnfc0\leveljc0\li720\fi-360\jclisttab\tx720\levelstartat32{\leveltext\'02\'00.;}{\levelnumbers\'01;}\f1\fs24\cf2}
{\listlevel\levelnfc4\leveljc0\li1440\fi-360\jclisttab\tx1440\levelstartat1{\leveltext\'02\'01.;}{\levelnumbers\'01;}\f1\fs24}
{\listlevel\levelnfc2\leveljc2\li2160\fi-180\jclisttab\tx2160\levelstartat1{\leveltext\'02\'02.;}{\levelnumbers\'01;}\f1\fs24}
{\listlevel\levelnfc0\leveljc0\li2880\fi-360\jclisttab\tx2880\levelstartat1{\leveltext\'02\'03.;}{\levelnumbers\'01;}\f1\fs24}
{\listlevel\levelnfc4\leveljc0\li3600\fi-360\jclisttab\tx3600\levelstartat1{\leveltext\'02\'04.;}{\levelnumbers\'01;}\f1\fs24}
{\listlevel\levelnfc2\leveljc2\li4320\fi-180\jclisttab\tx4320\levelstartat1{\leveltext\'02\'05.;}{\levelnumbers\'01;}\f1\fs24}
{\listlevel\levelnfc0\leveljc0\li5040\fi-360\jclisttab\tx5040\levelstartat1{\leveltext\'02\'06.;}{\levelnumbers\'01;}\f1\fs24}
{\listlevel\levelnfc4\leveljc0\li5760\fi-360\jclisttab\tx5760\levelstartat1{\leveltext\'02\'07.;}{\levelnumbers\'01;}\f1\fs24}
{\listlevel\levelnfc2\leveljc2\li6480\fi-180\jclisttab\tx6480\levelstartat1{\leveltext\'02\'08.;}{\levelnumbers\'01;}\f1\fs24}

Any suggestions on how to fix this issue. I have created a very simple program to replicate the issue. look at the file.rtf inside the folder, view it on notepad++.

any other suggestions will be helpful!!!

I'm trying to display an picture without an image object in the form, so I can dynamically add as many images as I want using just code.

Form1.Image1.Picture.Bitmap.Assign(Graphic);      <-- this was manually dragged in the form

Hello, I'm trying to load an image into a form using only script code but this is not working. Please HELP!!!

procedure Form1_OnShow (Sender: TObject; Action: string);
Var  graphics:Tgraphic;
Var  image:TImage;
var  png: TPNGImage;
var  file_path: string;
begin

      //file path
      file_path:= 'image.png';

      //create the image from code
      image:=TImage.create(frm_main);
      image.Picture.LoadFromFile(file_path);
      image.name:='image1';
      image.top:=8;
      image.left:=8;
      image.width:=350;
      image.height:=350;
      image.autosize:=true;
      image.visible:=true;
      image.enabled:=true;

      //free object
      image.free;
end;

11

(3 replies, posted in General)

I figured out the issue. The code has to be added before the database connection settings.

12

(3 replies, posted in General)

I want to modify the look of the login form. My following code works fine using SQLLite but when I switch the database to MySQL it stops working. It seems the program is using a different form name. Does anyone know the login form for using MySQL?

 frmdbCoreLogin.Caption:=strCaption;  
 frmdbCoreLogin.Image1.Picture.LoadFromFile(ExtractFilePath(Application.ExeName)+'Images\logo.png');    //load custom image

Thank you so much sibprogsistem it works

Yes, the questions is how to retrieve the data from the following JSON String: All the samples I've seen in this forum do not work for the sample below.

[
   {
      "id":"1001",
      "email":"jdenero@testemail.com",
      "name":"John Denero",
      "memberships":[
         {
            "group":"Regular Users",
            "hourlyRate":{
               "amount":15,
               "currency":"USD"
            },
            "membershipStatus":"ACTIVE"
         }
      ]
   },
   {
      "id":"1002",
      "email":"mwilson@testemail.com",
      "name":"Mark Wilson",
      "memberships":[
         {
            "group":"Admin Users",
            "hourlyRate":{
               "amount":30,
               "currency":"USD"
            },
            "membershipStatus":"ACTIVE"
         }
      ]
   },
   {
      "id":"1003",
      "email":"psalmon@testemail.com",
      "name":"Peter Salmon",
      "memberships":[
         {
            "group":"Regular Users",
            "hourlyRate":{
               "amount":17,
               "currency":"USD"
            },
            "membershipStatus":"DEACTIVATED"
         }
      ]
   }
]

thank you sibprogsistem, I think the problem I'm having is that I need to read the array of JSON string without a leading pair therefore i'm not able to use the following code.


JsonArray:=TJSONArray(JSONObject.GetPairByName('products').JsonValue);


[
   {
      "id":"1001",
      "email":"jdenero@testemail.com",
      "name":"John Denero",
      "memberships":[
         {
            "group":"Regular Users",
            "hourlyRate":{
               "amount":15,
               "currency":"USD"
            },
            "membershipStatus":"ACTIVE"
         }
      ]
   },
  ....
]

Hello I'm trying to pair and retrieve JSON data but TJSONObject  is not working for me the the data is a valid JSON (RFC 8259) but no matter what I do is not showing anything for me. I think i'm doing something wrong. Please Help..

JSON DATA

[
   {
      "id":"1001",
      "email":"jdenero@testemail.com",
      "name":"John Denero",
      "memberships":[
         {
            "group":"Regular Users",
            "hourlyRate":{
               "amount":15,
               "currency":"USD"
            },
            "membershipStatus":"ACTIVE"
         }
      ]
   },
   {
      "id":"1002",
      "email":"mwilson@testemail.com",
      "name":"Mark Wilson",
      "memberships":[
         {
            "group":"Admin Users",
            "hourlyRate":{
               "amount":30,
               "currency":"USD"
            },
            "membershipStatus":"ACTIVE"
         }
      ]
   },
   {
      "id":"1003",
      "email":"psalmon@testemail.com",
      "name":"Peter Salmon",
      "memberships":[
         {
            "group":"Regular Users",
            "hourlyRate":{
               "amount":17,
               "currency":"USD"
            },
            "membershipStatus":"DEACTIVATED"
         }
      ]
   }
]

Code I'm Using. See attach project.

procedure Form1_Button1_OnClick (Sender: TObject; var Cancel: boolean);
var
sl:TStringList;
jDataStream, jParent_01,jParent_02: TJSONObject;
jValue_01, jValue_02, jValue_03, jValue_04: TJSONString;
jArray: TJSONArray;
i: int;
begin
      sl:=TStringList.Create;
      sl.LoadFromFile(ExtractFilePath(Application.ExeName)+'\json.txt');
      jDataStream := nil;

      jDataStream:=TJSONObject(TJSONObject.ParseJSONValue(sl.Text));
      frm_main.Memo1.Text:=sl.text;
      frm_main.Memo2.Text:=''; //clear

      if jDataStream <> nil then                               
       begin

           frm_main.Memo2.Lines.add('json size: '+ IntToStr(jDataStream.size));     //size of json

          //Method 1.. get information from array
          for i := 0 to jDataStream.Size-1 do
             begin
                  jValue_01 := TJSONString(TJSONObject(jArray.Get(i)).GetPairByName('id').JsonValue);     //get pair
                  frm_main.Memo2.Lines.add(jValue_01.value);       //writes value
             end;

         frm_main.Memo2.Lines.Add('--------------');      //writes value
                  
         //Method 2... pair by name
         jValue_02 := TJSONString(jDataStream.GetPairByName('email').JsonValue);         //pair
         frm_main.Memo2.Lines.Add(jValue_02.Value);      //writes value

         //method 3.. pair by index
         jValue_03 := TJSONString(jDataStream.GetPairByIndex(0).JsonValue);           //Level 1
         frm_main.Memo2.Lines.Add(jValue_03.Value);      //writes value

        //method 4.. pair by index and then get information by name
         jParent_01 := TJSONObject(jDataStream.GetPairByIndex(1).JsonValue);           //Level 1
         jValue_03 := TJSONString(jParent_01.GetPairByName('name').JsonValue);         //pair
         frm_main.Memo2.Lines.Add(jValue_03.Value);      //writes value




     end;

      //free object
      sl.free
end;


begin

end.

17

(12 replies, posted in General)

Dmitry,
Can you provide some sample code on how to edit the forms using script?

DriveSoft wrote:
kees.krause wrote:

Am I right that forms are automaticly generated by the program when user/roles is activated? For I cannot see them and so I cannot charge them in Dutch.

Yes, but you can change forms using script.

18

(12 replies, posted in General)

This is this great.. very nice.
Is there a way to change the image of the login form and the caption of the form?

19

(1 replies, posted in General)

I'm trying to build an application that has an embedded browser using TWebBrowser and I need to know the link that the user click inside the website. it seems that OnClick event is not available on MVD, I get an error message "Undeclared Identifier" is there a way to get this info another way. Please Advise.

    Web := TWebBrowser.Create(Form1);
    TWinControl(Web).Parent := Form1.Panel2;
    Web.Width := Form1.Panel2.Width;
    Web.Height := Form1.Panel2.Height;
    Web.Navigate(Form1.Editwww.Text);
    Web.Align := alClient;
    Web.Silent := 1;
    Web.TheaterMode := 1;   //ocupies entire screen
    Web.RegisterAsDropTarget :=1;    //allow to drag and drop
    Web.RegisterAsBrowser :=1;
    Web.StatusBar := 0;
    Web.ToolBar :=0;
    Web.MenuBar :=0;
    Web.OnStatusTextChange := @WebOnStatusTextChange;
    Web.OnClick := @OnClick;     // <=== this is not working

20

(2 replies, posted in General)

How do you import a file, for example, if the file is Pipe delimited or a different character?

Thanks it works.

Hello, I was able to hide the Import Menu but i'm getting an error message with export

        Form1.mniImport.Visible := False;  
        Form1.mniExport.Visible := False;        //   <-- This one does not work

Error Message Undeclared identifier: 'mniExport'. What should be the correct menu name?

23

(5 replies, posted in Script)

Hello, can someone provide an example for RichEdit1.InsertTextA.


For example, i'm trying to insert a time stamp to a Rich Text Editor in bold and in red.  But I keep getting the error message

Incompatible Types: 'AnsiString', 'String'


procedure Form1_RichEdit1_OnKeyUp (Sender: TObject; var Key: Word; Shift, Alt, Ctrl: boolean);
begin

   if (Key=112) then
       begin
            frm_main.RichEdit1.InsertTextA('Time Stamp will be inserted here in bold and red',0);
       end;
end;

How can I insert formatted text to a RichText Box?

Here is a image of the issue.. also is there a way to make the executable compatible with high resolutions screens 4K. right now I have to overwrite the DPI settings on the application to make it more compatible.  see attached image.

For some reason I'm getting  a white space the beginning of the text when loading a file using script. I'm using version 5.1 is anyone getting the same issue is this bug on the software? or is it just my computer. Any help would be appreciated. I have attached a sample program.

If I open and close the program several times the blank space keeps growing.