The community Portugal-a-programar has in the past 28 on May 6 years of existence . Several years of work and dedication of many volunteer contributors, it has been possible to create and grow a community of programmers in the Portuguese language.
Consider some numbers from the community (blog, journal, wiki, etc.) and post this time, enabling them to win one of five t-shirts that are being offered.
Congratulations Portugal-a-programar and all who have contributed!
This is a site about Pascal/Delphi. Programming. Here You can see some amazing tips for Pascal.
Pesquisar neste blogue
terça-feira, 31 de maio de 2011
segunda-feira, 30 de maio de 2011
Lazarus Free Pascal Tutoriais
Hi again.
I found a good site with video-classes of Lazarus Freepascal.
Here is: http://www.schoolfreeware.com/Free_Pascal_Tutorials.html .
If i got autorization I gonna publish this videos t here.
I found a good site with video-classes of Lazarus Freepascal.
Here is: http://www.schoolfreeware.com/Free_Pascal_Tutorials.html .
If i got autorization I gonna publish this videos t here.
Programming Resources
Hello.
Where I navigate around the web I found some amazing resources for Pascal.
So here is a list:
Articles:
Pascal Newsletter - Free Delphi Newsletter
According to the website, the Pascal Newsletter is a non-periodical (almost monthly) publication distributed free of charge via email in plain text format. There is also an archive of past newsletters in zipped .txt format with source code examples.
Interview with a Pascal Architect
Great insight into the art of compiler making .
Object Pascal beats C++
A down to Earth comparison between Object Pascal and C++.
The Pascal Programming Language
This paper is a review of the Pascal programming language.
Top 10 reasons why Pascal is better than C
Pascal article.
Using Unicode with Vector Pascal
Pacal article.
Hiding the Menu Bar (Mac)
Pascal article.
THINK Pascal and CodeWarrior Pascal
More resources at freeprogrammingresources.com .
Where I navigate around the web I found some amazing resources for Pascal.
So here is a list:
Articles:
Pascal Newsletter - Free Delphi Newsletter
According to the website, the Pascal Newsletter is a non-periodical (almost monthly) publication distributed free of charge via email in plain text format. There is also an archive of past newsletters in zipped .txt format with source code examples.
Interview with a Pascal Architect
Great insight into the art of compiler making .
Object Pascal beats C++
A down to Earth comparison between Object Pascal and C++.
The Pascal Programming Language
This paper is a review of the Pascal programming language.
Top 10 reasons why Pascal is better than C
Pascal article.
Using Unicode with Vector Pascal
Pacal article.
Hiding the Menu Bar (Mac)
Pascal article.
THINK Pascal and CodeWarrior Pascal
More resources at freeprogrammingresources.com .
In my Delphi programs, sometimes it is necessary to simulate a keypress in TEdit that has not received the focus.
Example:
procedure TFormPegaProdutos.DBGrid1KeyPress(Sender: TObject;
var Key: Char);
begin
if not (key in ['0'..'9','/',#13,#27,'A'..'z']) Then key:=#0;
if key=#27 then close;
if (key in ['A'..'Z']) or (key in ['a'..'z']) Then
begin
PanelPesquisa.Top:=80;
PanelPesquisa.Left:=160;
PanelPesquisa.visible:=True;
Palavra1.setfocus;
if (key in ['a'..'z']) Then Key:=chr(trunc(ord(Key))-32);
keybd_event(trunc(Ord(Key)),0,0,0);
end;
if key in ['0'..'9'] Then
begin
PanelVenda.Top:=80;
PanelVenda.Left:=60;
PanelVenda.visible:=True;
ValorUni.Text:=FormatCurr('#0.00',ProTEMPP_VIS.AsCurrency);
QTD.setfocus;
keybd_event(trunc(Ord(Key)),0,0,0);
end;
...That is, the list of items (DBGrid1) the User may open a search panel for a new item without leaving the list, and can still register a sale of the item without leaving the list, which is, say By the way, very practical.
But Lazarus did not have available in the keybd_event, then how to solve this problem?
I created a simple procedure:
procedure keybd_event_on(EditControl:TEdit; var key: char);
begin
EditControl.Text:=key+' ';
EditControl.setfocus;
EditControl.SelStart:=1;
EditControl.SelLength:=1;
end;
Ready!
Now I can continue porting my programs for carrying Lazarus.
Not because of a keybd_event that the project will stop!
procedure TFormPegaProdutos.DBGrid1KeyPress(Sender: TObject;
var Key: Char);
begin
if not (key in ['0'..'9','/',#13,#27,'A'..'z']) Then key:=#0;
if key=#27 then close;
if (key in ['A'..'Z']) or (key in ['a'..'z']) Then
begin
. PanelPesquisa.Top:=80;
. PanelPesquisa.Left:=160;
. PanelPesquisa.visible:=True;
. Palavra1.setfocus;
. if (key in ['a'..'z']) Then Key:=chr(trunc(ord(Key))-32);
. keybd_event(trunc(Ord(Key)),0,0,0);
. keybd_event_on(Palavra1,Key);
end;
if key in ['0'..'9'] Then
begin
. PanelVenda.Top:=80;
. PanelVenda.Left:=60;
. PanelVenda.visible:=True;
. ValorUni.Text:=FormatCurr('#0.00',ProTEMPP_VIS.AsCurrency);
. QTD.setfocus;
. keybd_event_on(QTD,Key);
end;
The Lazarus is not 100% compatible with Delphi, but running into problems like this, we can not give up, always have an exit.
Be free!
Use lazarus / freepascal.
Example:
procedure TFormPegaProdutos.DBGrid1KeyPress(Sender: TObject;
var Key: Char);
begin
if not (key in ['0'..'9','/',#13,#27,'A'..'z']) Then key:=#0;
if key=#27 then close;
if (key in ['A'..'Z']) or (key in ['a'..'z']) Then
begin
PanelPesquisa.Top:=80;
PanelPesquisa.Left:=160;
PanelPesquisa.visible:=True;
Palavra1.setfocus;
if (key in ['a'..'z']) Then Key:=chr(trunc(ord(Key))-32);
keybd_event(trunc(Ord(Key)),0,0,0);
end;
if key in ['0'..'9'] Then
begin
PanelVenda.Top:=80;
PanelVenda.Left:=60;
PanelVenda.visible:=True;
ValorUni.Text:=FormatCurr('#0.00',ProTEMPP_VIS.AsCurrency);
QTD.setfocus;
keybd_event(trunc(Ord(Key)),0,0,0);
end;
...That is, the list of items (DBGrid1) the User may open a search panel for a new item without leaving the list, and can still register a sale of the item without leaving the list, which is, say By the way, very practical.
But Lazarus did not have available in the keybd_event, then how to solve this problem?
I created a simple procedure:
procedure keybd_event_on(EditControl:TEdit; var key: char);
begin
EditControl.Text:=key+' ';
EditControl.setfocus;
EditControl.SelStart:=1;
EditControl.SelLength:=1;
end;
Ready!
Now I can continue porting my programs for carrying Lazarus.
Not because of a keybd_event that the project will stop!
procedure TFormPegaProdutos.DBGrid1KeyPress(Sender: TObject;
var Key: Char);
begin
if not (key in ['0'..'9','/',#13,#27,'A'..'z']) Then key:=#0;
if key=#27 then close;
if (key in ['A'..'Z']) or (key in ['a'..'z']) Then
begin
. PanelPesquisa.Top:=80;
. PanelPesquisa.Left:=160;
. PanelPesquisa.visible:=True;
. Palavra1.setfocus;
. if (key in ['a'..'z']) Then Key:=chr(trunc(ord(Key))-32);
. keybd_event(trunc(Ord(Key)),0,0,0);
. keybd_event_on(Palavra1,Key);
end;
if key in ['0'..'9'] Then
begin
. PanelVenda.Top:=80;
. PanelVenda.Left:=60;
. PanelVenda.visible:=True;
. ValorUni.Text:=FormatCurr('#0.00',ProTEMPP_VIS.AsCurrency);
. QTD.setfocus;
. keybd_event_on(QTD,Key);
end;
The Lazarus is not 100% compatible with Delphi, but running into problems like this, we can not give up, always have an exit.
Be free!
Use lazarus / freepascal.
You like to enhance your applications with gradient effects? It is also possible in Lazarus, see the figure below:
This is the component LazGradient, available for download here.
Good programs
Daniel Figueiredo
This is the component LazGradient, available for download here.
Good programs
Daniel Figueiredo
quinta-feira, 26 de maio de 2011
Subscrever:
Mensagens (Atom)