Solved

Four Simple Questions

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

739 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