malfunction Grandmaster Cheater Supreme
Reputation: 0
Joined: 30 Jan 2007 Posts: 1015 Location: http://www.behindthecorner.com/
|
Posted: Wed Jul 18, 2007 5:33 am Post subject: Delphi Tips and Tricks!!! |
|
|
Did u guys know this?
1) select a component on a form in Delphi
2) select Cut from the menu
3) go to your favourite text editor
4) select Paste
5) you now have a textual representation of the component and its properties
6) change some of the properties
7) select the whole text block again
select Cut from the menu
9) go to Delphi and select Paste
10) the component now reappears with the changes you made
| Quote: |
From: [email protected]
Subject: Re: Delphi: Tips?
ApplicationBlock ~ When running a program, blocks the user from running other programs at the same time
a) Create a form that consumes the screen (presumably 640x480) without any
icons (maximize, minimize, system).
b) In the FormDeactivate handler for the form, call the setFocus method as
follows - this will disable Ctrl-Esc:
Form1.SetFocus;
c) In the FormActivate, you must assign the Deactivate method to the
application as follows:
Application.onDeactivate := FormDeactivate;
d) Create a popup menu with one item. The properties for the item must
include Visible ->False. Create a function for the single item and have it do
something trivial (x := 1) to prevent the code from being stripped by Delphi.
e) Assign the Popup menu to the form using the Popupmenu property.
f) Create a shortcut for the popup menu in the FormActivate method as follows:
NullItem1.shortcut := ShortCut(VK_Tab, [ssAlt]);
(Note: NullItem1 should be replaced by the menu item you created).
Steps d, e, and f disable Alt-Tab.
|
| Quote: |
FROM: [email protected]
SUBJECT: Re: TMediaPlayer - What CD Track am I on?
Here's an easy way to do it:
create a timer and put this code in the OnTimer event:
var Trk, Min, Sec: Word;
begin
with MediaPlayer1 do
begin
Trk:= MCI_TMSF_TRACK(Position);
Min:=MCI_TMSF_MINUTE(Position);
Sec:=MCI_TMSF_SECOND(Position);
Label1.Caption:=Format('%.2d',[Trk]);
Label2.Caption:=Format('%.2d:%.2d',[Min,Sec]);
end;
end;
Add MMSystem to the uses clause in Unit1
This will show current track and time.
Hope it actually works?!?!
|
| Quote: |
CUSTOM CURSORS
Create a cursor with Image Editor. name it CRBOMBSITE (all caps).
Create a constant named crBombSite and set it to a value >1.
Use this code in you program in the Form1.Create procedure
Screen.Cursors[crBombSite] := LoadCursor(hInstance,'crBombsite');
Cursor := crBombSite;
You can use any the custom cursor in other form by setting the Cursor
property to crBombSite |
hope some of them helped
il update this every once in a while
_________________
|
|