• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 344
  • Last Modified:

Scrollbar in Memo

In my Chat-Program I want that my Memo-box always shows the latest message. How can I scroll down my Memo? Please help me!
0
Shellman
Asked:
Shellman
  • 4
  • 3
  • 3
  • +1
1 Solution
 
rene100Commented:
Hi

Just do this:

SendMessage(MemoName.Hadle,EM_LINESCROLL,NX,NY);

Nx is the amount of chars you wants to scroll horiztontally,
Ny the amount of lines verticaly

reagrds
rene
0
 
rene100Commented:
sorry, should be MemoName.Handle
0
 
ShellmanAuthor Commented:
Sorry, but this doesn't work! I've got Delphi 2.0, maybe this is the Problem.
Undefined: EM_LINESCROLL
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

 
rene100Commented:
ok, try to define Em_Linescroll with this:

const
EM_LINESCROLL  = $00B6;
0
 
ZifNabCommented:
Hi Shellman,

it should normally work. Which version of Delphi are you using?

try :

sendmessage(memo1.Handle, WM_VSCroll, SB_LINEDOWN,0); to scroll one line down

Regards, Zif.
0
 
ronit051397Commented:
uses messages;
.
const
      EM_LINESCROLL  = $00B6;
.
memo1.perform(EM_LINESCROLL,2,memo1.Lines.Count);
0
 
ShellmanAuthor Commented:
These two ways work:
memo1.perform(EM_LINESCROLL,2,memo1.Lines.Count);
sendmessage(memo1.Handle, WM_VSCroll, SB_LINEDOWN,0);
Thank you!
0
 
ZifNabCommented:
then, who gets the points? Maybe split them?
0
 
ShellmanAuthor Commented:
I am new. How can I do this? I am new.
0
 
ZifNabCommented:
Shellman,

You have two ways to do it :

1. Give the points to only one person :
 just give a comment here, who earns the points and this person can then answer the q'n after which you can grade it.
2. split the points.

To split points :
you can ask linda gardner to do it (costumer service of E-E).

But you can do it also on yuor own :

1. because the q'n is already answered once, you can't delete this one anymore. So, give a comment that this q'n is already solved and then others know that they don't have to find for a solution anymore.
--> After a while (believe 30 days without action at thread) the points will return to you, because the q'n was never solved.
2. you open two new q'ns with the names to whom you want to give the points (you can decide how many points you want to give to each of these persons).
e.g. to Shellman, to MyGirl
3. The addressed persons will answer the q'n by giving a dummy one or the one proposed here already (better)
4. Then you can grade the answeres

Regards, Zif.
0
 
ShellmanAuthor Commented:
Please don't answer any more. Ronit should get the points.
0
 
ronit051397Commented:
OK, I have posted an answer.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 4
  • 3
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now