Solved

Four Simple Questions

Posted on 1997-08-31
3
215 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
Comment Utility
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
Comment Utility
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
Comment Utility
Great.  Thanks.  
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

763 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

11 Experts available now in Live!

Get 1:1 Help Now