[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Controls adding without Placing them

Posted on 2000-04-23
9
Medium Priority
?
135 Views
Last Modified: 2010-04-04
Okay, here's the deal:
when you use Delphi you can always just paint Controls on the forms. Now that is something I don't wanna do anymore...just because I have all these examples with only the source code...
I know that you can use the WinAPI functins and stuff to create a window, but that is something I don't want to do either. I'd like to just have one .pas file and to type everything in it there...
is this possible?
I'm a beginner, and kinda get the big idea about all the items and stuff. The book I have only uses sourcecode too, no explanation from "place this there, place that there".

Anybody?

CJ
0
Comment
Question by:CJ_S
[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
  • 5
  • 4
9 Comments
 
LVL 3

Expert Comment

by:f15iaf
ID: 2742168
yes it is posible but it is much more complicated.

0
 
LVL 3

Expert Comment

by:f15iaf
ID: 2742170
yes it is posible but it is much more complicated.

0
 
LVL 22

Author Comment

by:CJ_S
ID: 2742178
Okay, then.........could you tell me?
I know about the dynamically creating control elements and placing them on the screen. is that what you mean with 'complicated'?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 3

Expert Comment

by:f15iaf
ID: 2742191
example:

var
   b:Ttimer;
implemantation

procedure Tform1.func(sender:tobject)
begin
     ......
end;
procedure Tform1.formcreate(sender:Tobject);
begin
     b:=Ttimer.create(form1);
     b.interval:=1;//property
     b.ontimer:=func;//event
end;

0
 
LVL 22

Author Comment

by:CJ_S
ID: 2742211
UHM....so, if I understand this correctly, it determines whether it is an event or property by itself?????....

0
 
LVL 3

Accepted Solution

by:
f15iaf earned 100 total points
ID: 2742228
example:

var
   b:Ttimer;
implemantation

procedure Tform1.func(sender:tobject)
begin
     ......
end;
procedure Tform1.formcreate(sender:Tobject);
begin
     b:=Ttimer.create(form1);
     b.interval:=1
     b.ontimer:=func;
end;



0
 
LVL 22

Author Comment

by:CJ_S
ID: 2742234
was that a yes or a no on my last comment???? You have the points, but please tell me that one thing.
0
 
LVL 3

Expert Comment

by:f15iaf
ID: 2742267
//..... in delphi it means that compiler ignores what said after //
usually it's a coment which wrriten by programers.

you don't need  to write //property or
//event after each action.

events and properties are determinied in
control such as Ttimer from the beginning in their source code.

when you write

b.interval:=1;

a compiler knows that it's a property.
0
 
LVL 22

Author Comment

by:CJ_S
ID: 2743017
Okay, duuuuuuh, I know about the comments, just to be sure that the compiler knows about it.

Thnx!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
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…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

650 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