Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

background form

Posted on 2002-07-26
9
Medium Priority
?
168 Views
Last Modified: 2010-04-04
I've using this code on my forms OnPaint:

SetWindowPos(Handle, HWND_BOTTOM, Left, Top, Width, Height, SWP_SHOWWINDOW);

this causes my form to be in the background, just infront of the desktop.

But, if i drop a TListView on the form, and makes it alClient, it won't worke more! Why?
0
Comment
Question by:easysoft_studios
  • 5
  • 4
9 Comments
 
LVL 7

Accepted Solution

by:
Cynna earned 300 total points
ID: 7181159
easysoft_studios,

> But, if i drop a TListView on the form, and makes it alClient, it won't worke more! Why?

Simple - forms OnPaint event is not getting fired. Form is completly covered by ListView, right? So there isn't anything to paint on the form - only ListView is painted.
You can easily check this by putting a breakpoint in forms OnPaint handler.
By the way, even if you didn't use client alignement, this method is quite flickery.

To overcome these problems, handle WM_WINDOWPOSCHANGING message for your form.
Like this:

type
  TForm1 = class(TForm)

  // .... your components ....

  private
    { Private declarations }
     procedure WMWinPosChange(var Msg: TWMWindowPosChanging); message WM_WINDOWPOSCHANGING;
  public


implementation

{$R *.DFM}

// .... your implementation code ....


procedure TForm1.WMWinPosChange(var Msg: TWMWindowPosChanging);
begin
   with Msg.Windowpos^ do
       if (flags and SWP_NOZORDER) = 0 Then hwndInsertAfter := HWND_BOTTOM;
   inherited;
end;

0
 

Author Comment

by:easysoft_studios
ID: 7181180
Thanks! It was the code I was looking for!
0
 
LVL 7

Expert Comment

by:Cynna
ID: 7181212
Thanks, but I'm curious about your grading criteria.
I mean, what should the A-grade answer for this question
contain, that is not in my answer?
Don't get me wrong, I'd just like to know what did I left out, so next time you get better answer, and I get better grade... :)

0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:easysoft_studios
ID: 7181340
well, i've have before get critizied for giving too high grades, so I'm not so sure about giving grades.
0
 
LVL 7

Expert Comment

by:Cynna
ID: 7181981
Too high grades? Well, your last 10 grades were B B C B B C C B C B
I wouldn't exactly call these too high-grades...

OK, let me give you my point of view on this subject.
There are several things you can do to iritate experts, thus reducing your
chances of getting a response. They all can be seen from your profile.

This is my top-4 list of no-no's:

1. Leave a trail of opened questions that have been answered. Abandoning
   your questions when you got a working solution is *the* way too have
   people ignoring you on your next one.

2. Slow response. If it takes you weeks to react to somebody's comment,
   chances are it will get treated as 1.

3. Unclear feedback. If you don't explain what exactly is the problem,
   experts are going to have a much harder time in trying to solve it.
   
4. Poor grades. You see, grade is irrelevant to you, but it is relevant
   to expert, because expert points = question points * grade.
   Here are, in my opinion, fair grading guides:

   - If answer fully provides you with solution, you should grade it A.

   - If it provides you with partial solution, but one that you can
     modify to suit you, it should get a B.

   - If it gives you only a clue, and you have to 'dig-in' on that clue
     to get to the solution, it's a C grade.
   
   Of course, grading issue is much too elaborate to fit in here, but,
   IMHO, these are the thumb-rules. If you try following them, I don't
   think you'll get critisied any more.

0
 

Author Comment

by:easysoft_studios
ID: 7182036
I get your point. But i think my problem have been, that i did'nt understod the system of EE. But ofcourse, i glad that someone tells me, so i'm (hopeful) get's better, of using EE and grading answers.
Thanks for explaining it to me, course I never knew all those things you wrote.
0
 
LVL 7

Expert Comment

by:Cynna
ID: 7182064
Oh, I see... well that explains it than.
You might surf a bit on different areas of EE. They
are on the right side of your main view, under "EE Community" title.
The quetion/answer subject is somewhat covered here:
http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp#14

BTW, if you have any questions of how the system works,
or are insure about something, just ask any expert that
you are currently coresponding with. If you have any more
questions on the subject right now, I'd be glad to try
answering them for you.
Also, at any time you might ask a 0-point question in Community support group, I think. That questions are
answered by the people who mantain this site, so you
can't get any more relevant answer that that.
You'll find all the basic rules in the online help of EE,
just click a bit... :)
0
 

Author Comment

by:easysoft_studios
ID: 7182282
i'll do that :)

thanks once again, it's allways nice to meet people who give time to help, guys like my self :)
0
 
LVL 7

Expert Comment

by:Cynna
ID: 7182392
No problem, glad to be of help.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

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…
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…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

885 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