Solved

Four Simple Questions

Posted on 1997-08-31
3
217 Views
Last Modified: 2010-04-04
I had a few simple questions I'd like answered.  My guess is any experienced developer could answer these pretty easily, thus I will only grade it if all four are answered - correctly.

Displaying Cardinal Values
====================

I want to display the total physical memory on the users system, which I have as a cardinal value, in a Label's caption.  The compiler raises an error of incompatible types.  How do I convert the cardinal value into something the Label can display.  I'd also want to format the value, so if the users memory is 24662016, then I'd want to display 24,662,016.


Paste Picture into DBImage Field
=========================

I have a DBImage field that will display an employee's picture.  Next to this field is a button that will add a picture stored in the Clipboard to the DBImage field.  When I press the button, I get an error - "Cannot assign a TClipboard to a TDBImage", however, if I press CTRL-V, this picture is placed in the DBImage field correctly.  Why.  My code is below.

procedure TfrmPeople.BitBtn1Click(Sender: TObject);
begin
if not Clipboard.HasFormat(CF_PICTURE) then
    begin
      MessageDlg('There is not a picture in the clipboard.  Copy the picture to the Windows Clipboard, then click Paste. Press F1 for more information.', mtInformation,
        [mbOK],0);
    end
else
    fldpicture.Assign(Clipboard);
end;

RESET TIMER
===========

How do I re-set the timer component?  I want the timer to remove the current password after 300000 (5 minutes) of inactivity.  I want the timer to be re-set (i.e., start over from zero) when actions take place.  Changing the Interval property won't work.  Suggestions?


MAKING RADIOGROUPS BLANK
==========================

I want to 'clear' the entries of a RadioGroup.  For instance, my RadioGroup has values of Yes or No.  How to I 'clear' the group, meaning I don't want either one checked? (Other than re-starting the form).


0
Comment
Question by:d4jaj1
3 Comments
 

Expert Comment

by:krisz
ID: 1343163
I don't think that 6.25 credits is enough. Break it to four
questions, 25cr each.

Some hints:
1, there is a function in delphi for this.
2, dunno
3, will, only one thing to do
4, programmatically no problem. the question is: what is the
   most comfortable for the user.
0
 
LVL 1

Accepted Solution

by:
fsanchez earned 20 total points
ID: 1343164
1.- YourLabel.Caption := FormatFloat(',#', Number);
2.- fldpicture.PasteFromClipboard;
3.- YourTimer.Enabled := False;
    YourTimer.Enabled := True;
4.- YourRadioGroup.ItemIndex := -1;
0
 
LVL 3

Author Comment

by:d4jaj1
ID: 1343165
Great.  Thanks.  
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to disable mouse scroll in a combo box field within a Delphi cxGrid 4 111
Delphi TcxGrid group footer summary 3 209
Convert Jpg /PNG To GIF 5 120
Delphi Form ownership 4 73
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now