Search the Community
Showing results for tags 'mouse'.
Found 4 results
-
I am having trouble figuring this one out. I have a form with a tscrollbox and an timage. In the image1MouseMove event of the timage I have the following code; procedure TForm2.im1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); begin scrollbox1.vertScrollBar.Position := x; scrollbox1.horzScrollBar.Position := y; end; But it is not what I'd expect. What I am trying to do: 1. Lets say I have screenshot of my desktop and inserted into the timage. 2. And I resize the app's form smaller 3. Using the mouse, I want to click on the image and drag (or pan) around inside the form's scrollbox area so that I can see other parts of the image. What am I doing wrong and how can I fix this? TIA
-
I want to capture the before and after values for specific dbedit boxes in an app I am working on (The point is to capture the user who makes the change and track the changes they are making). I have written 2 procedures, one that inserts the text value before the field is updated and one that inserts the text value after the field is updated I am using OnMouseEnter and OnExit events respectively to do so. The AddUserbefore insert works fine (It is the same code except it captures OldValue instead of NewValue). The AddUserAfter insert works fine as long as the user places the cursor in another field before shutting down the app But if they update the value in the edit box and then shut down the app without placing the cursor in another field first then either the NewValue doesn't show up in the db, or the updated value shows up in the OldValue field. I tried adding the post first but it didn't change anything. What am I doing wrong? Thank you! ############################################################ procedure TfDesignMaster.AddUserAfter(Sender: TObject); var CommandText,userstring,NewValue,qstring: string; TimeOfChange : TDateTime; begin if (dm.tb_design_master.state=dsEdit) or (dm.tb_design_master.state=dsInsert) then dm.tb_design_master.post else ShowMessage('Not open'); with dm do begin userstring := CurrentUserName; NewValue := dbedit13.text; TimeOfChange := VarToDateTime(Now); qString := 'INSERT INTO AdimsUserField (JM_User,NewValue,TimeOfChange) VALUES (:a, :b,:c)'; commandAddUser.CommandText := qstring; commandAddUser.Parameters.FindParam('a').Value := userstring; commandAddUser.Parameters.FindParam('b').Value := NewValue; commandAddUser.Parameters.FindParam('c').Value := TimeOfChange; commandAddUser.Execute(); //ShowMessage(userstring); end; end;
-
I installed the latest 10.4 2 patch, but now the most troublesome problem is that the mouse will continue to be pseudo busy in the process of writing code. It seems that it has been analyzing the code, but at this time, the mouse does not point to any words, which has reduced the speed of writing code.
-
Does application.processmessages behaviour differ between VCL and FMX?
Incus J posted a topic in RTL and Delphi Object Pascal
In Delphi VCL I can use application.processmessages to process any queued messages, including pending events such as mouse clicks. Firemonkey also has application.processmessages - but its behaviour seems different, in that it doesn't process queued mouse clicks on buttons. This means that I am unable to check to see whether a Cancel button has been clicked part way through an operation. Is this correct? (Delphi FMX Tokyo 10.2.3)