Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Screen resolution and TDrawgrid

Posted on 2000-05-14
3
Medium Priority
?
133 Views
Last Modified: 2010-04-04
1. How to determine the presnet screen resolution?

2.Please give me a sample code as how to input data to a Drawgrid object from a database? I have seen so many manuals about drawgrid , but there is no code anymore.

Thanks
0
Comment
Question by:ws1999
[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
3 Comments
 
LVL 15

Expert Comment

by:simonet
ID: 2807932
There are actually 2 questions. Please split them so it's easier for you to properly grade the experts.

1) Use Screen.height and Screen.Width
In order to get the screen's color depth, use this code:

function GetColorsCount : integer;
var
  h : hDC;
begin
  Result := 0;
  try
    h := GetDC( 0 );
    Result :=1 shl (GetDeviceCaps(h, PLANES) *
        GetDeviceCaps(h, BITSPIXEL));
  finally
    ReleaseDC( 0, h );
  end;
end;


Yours,

Alex
0
 
LVL 15

Expert Comment

by:simonet
ID: 2807934
2) You don't generally use TDrawGrid for database access. Use TDBGrid for that. It's available in the "Data controls" tab of the component palette.

Yours,

Alex
0
 
LVL 15

Accepted Solution

by:
simonet earned 400 total points
ID: 2971418
simonet has changed his comments to an answer
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying 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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
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…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

609 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