Solved

Four Simple Questions

Posted on 1997-08-31
3
223 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

696 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