Solved

Four Simple Questions

Posted on 1997-08-31
3
219 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

791 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