Skip to forum content
My Visual Database
A Simple Solution for Creating Databases
You are not logged in. Please login or register.
Active topics Unanswered topics
Search options
thezimguy wrote:Hello Genius family, is it possible to add another dataset to a button with settings - REPORT?
Eg. 1. Set a button with Action (REPORT);
2. With script add another dataset to the button REPORT dataset
3. Click on the button to have all datasets in report.
This is to also have all the output (Preview, Print, Quick Print, Excel, Word. PDF, HTML, etc) of the button REPORT
Thank you in advance
This effect would have been very nice and simple if possible.
DriveSoft wrote:const
APP_NAME = 'My App Name';
procedure Form1_OnShow (Sender: string; Action: string);
begin
Form1.Caption := '';
if FindWindow(nil, APP_NAME) <> 0 then
begin
ShowMessage('Application is already launched.');
Form1.Close;
end;
Form1.Caption := APP_NAME;
end;
Thank you Dmitry
It worked perfectly
k245 wrote:var
ReallyClose:boolean = false;
procedure Form1_btnClose_OnClick (Sender: TObject; var Cancel: boolean);
begin
ReallyClose := True;
Form1.Close;
end;
procedure Form1_OnCloseQuery (Sender: TObject; var CanClose: Boolean);
begin
if not ReallyClose then
begin
SendMessage(Form1.Handle, $0112, 61472, 0); //WM_SYSCOMMAND - $0112, SC_MINIMIZE - 61472
CanClose := False;
end;
end;
begin
Form1.OnCloseQuery := @Form1_OnCloseQuery;
end.
Thank you K245.
It worked wonderfully
A follow up question
How do I run only one instance of an application.
DriveSoft wrote:1.
Just close the main form
procedure Form1_Button1_OnClick (Sender: TObject; var Cancel: boolean);
begin
Form1.Close;
end;
2. Set property MinimizeToTray = True for Form1.
Example
procedure Form1_OnCloseQuery (Sender: TObject; var CanClose: Boolean);
begin
SendMessage(Form1.Handle, $0112, 61472, 0); //WM_SYSCOMMAND - $0112, SC_MINIMIZE - 61472
CanClose := False;
end;
begin
Form1.OnCloseQuery := @Form1_OnCloseQuery;
end.
But you want to decide, how to close your application.
Thank you Dmitry
It works perfectly but the problem now is how to terminate the application
DriveSoft wrote:Please download latest beta version
https://www.dropbox.com/s/6n60thhfaszoj … a.zip?dl=0
I added a new property for Form, TrayPopupMenu, example:
var
PopupMenu: TPopupMenu;
procedure Form1_OnShow (Sender: string; Action: string);
var
MyItem: TMenuItem;
begin
PopupMenu := TPopupMenu.Create(Form1);
MyItem := TMenuItem.Create (PopupMenu);
MyItem.Caption := 'Item1';
MyItem.OnClick := @MenuClick1;
PopupMenu.Items.Add(MyItem);
MyItem := TMenuItem.Create (PopupMenu);
MyItem.Caption := 'Item2';
MyItem.OnClick := @MenuClick2;
PopupMenu.Items.Add(MyItem);
Form1.TrayPopupMenu := PopupMenu;
Form2.TrayPopupMenu := PopupMenu;
end;
procedure MenuClick1 (Sender: string);
begin
ShowMessage('Hello from Item1');
end;
procedure MenuClick2 (Sender: string);
begin
ShowMessage('Hello from Item2');
end;
Project with example
1. Please, how can I terminate the application on button click
2. How do make minimize tray on close
Tnx you.
Thank you so much Dmitry
The code did it like magic
Thank you
PM family, please how do I play an embed sound file from the database
I don't want to play from the sound_filename but play the sound data embed in the database.
Thank you
Thank you very much Derek.
It works perfectly
Thank you very much Derek.
It works perfectly
Hello MVD family,
Please, how do I sort a comboBox by
without hard coding.
Thank you
I think the 5.6 update will be great. Big ups Dmitry.
I hope you will consider the suggestion above.
Thanks
thezimguy wrote:Again Dmitry,
I wish this feature will added to the tableGrid for easy alignment of column cells.
Find attached image below
It will be very nice to align the columns without having to write code.
Thank you.
This will be great addition to the tableGrid.
I wish Dmitry will consider this and add it early for us.
Nice idea
rodmontgt wrote:thezimguy wrote:gonpublic2k wrote:@theZimGuy - Is this a Point Of Sale project you're working on? From your screenshot I took a look and at a
glance it appears to be. Please let me know because I'm interested on developing one using MVD.
Cheers!
Please find attached.
To use this project, pls dont forget to create a mySQL database first.
You can install xampp and access it phpMyAdmin to do that.
Import the zims.sql after you create the database.
Provide the database settings when prompted.
Example
Server(Host) : localhost
Port : 3306
User : root (default)
Password : (empty default)
Database : zims (the name of the database you created)
Sorry for the delay
Trying to run your project in MVD 5.0 but it throw an error, see the attachment please
You have to set frmDashboard as the default form.
I can see that you have changed it from being default.
Just make it default and it will work.
It worked for me
Thank you theZimGuy,
It really suits my need
Very handy
I wish you will continue building it and update us if possible. We shall also share our opinions to facilitate it's implementations.
Thank you thezimguy for the example project.
I wish to get answers for the subsequent questions
Thanks
Thank you thezimguy
I have also been facing the same issue. It delays renaming of the components. I wish DriveSoft will take a look at it.
Changing other properties is fine except the Name
Yes. It will be very nice and simple for we the newbies
I wish Dmitry will add it
DriveSoft wrote:procedure Form1_bReport_OnClick (Sender: TObject; var Cancel: boolean);
var
i: integer;
begin
for i := 0 to Form1.GridSearch.RowCount - 1 do
Form1.GridSearch.Selected[i] := Form1.GridSearch.Cell[0,i].AsBoolean;
end;
procedure Form1_GridSearch_OnChange (Sender: TObject);
begin
Form1.GridSearch.Columns.InsertcheckboxColumn(0);
Form1.GridSearch.Columns[0].Header.Caption := 'checkbox' ;
end;
Also you should enable MultiSelect option for the TableGrid: Additional > Options > goMultiSelect = True
Wow
Thank you so much
I will try it now
This is great. It works perfectly and it has corrected the error I was getting on tableGrid updates
Thank you Dmitry
Updated
procedure Form1_OnShow (Sender: string; Action: string);
begin
Form1.TableGrid1.Columns.InsertcheckboxColumn(0);
Form1.TableGrid1.Columns[0].Header.Caption := 'checkbox' ;
Form1.TableGrid1.Options := Form1.TableGrid1.Options + goMultiSelect ;
end;
procedure btnReport_onClick(Sender: TObject; ACol, ARow: Integer);
var
i : integer ;
begin
for i := 0 to Form1.TableGrid1.RowCount - 1 do
if Form1.TableGrid1.Cell[0,i].AsBoolean then
Form1.TableGrid1.Selected[i]:=True
else
Form1.TableGrid1.Selected[i]:=False;
end;
begin
I have update the code.
This time I placed the btnReport_onClick procedure in the button click b4 the report is generated.
Im still looking forward to a better alternative
thezimguy wrote:Please is there a better way to achieve the effect below?
Multi select tableGrid for reporting
procedure Form1_OnShow (Sender: string; Action: string);
begin
Form1.TableGrid1.Columns.InsertcheckboxColumn(0);
Form1.TableGrid1.Columns[0].Header.Caption := 'checkbox' ;
Form1.TableGrid1.Options := Form1.TableGrid1.Options + goMultiSelect ;
Form1.TableGrid1.OnChange := @Grid1_onChange_onClick;
Form1.TableGrid1.OnCellClick := @Grid1_onChange_onClick;
end;
procedure Grid1_onChange_onClick(Sender: TObject; ACol, ARow: Integer);
var
i : integer ;
begin
for i := 0 to Form1.TableGrid1.RowCount - 1 do
if Form1.TableGrid1.Cell[0,i].AsBoolean then
Form1.TableGrid1.Selected[i]:=True
else
Form1.TableGrid1.Selected[i]:=False;
end;
begin
end.
I really want this.
Any help?
Posts found: 20