/Kalenderersatz/FullYearCalendar.pas |
---|
0,0 → 1,157 |
unit FullYearCalendar; |
interface |
uses |
Windows, Messages, SysUtils, Classes, Controls, ComCtrls; |
// TODO: Buggy if you select a month directly (click at the month name) |
// -- since the months are fixed, this functionality should be disabled by Windows! |
// TODO: Multiselect führt zu einem Fehler ... |
// -- Grund: Das springen zum Jahresende und Jahresanfang |
// -- Also: Only 30 days selectable |
// TODO: Die wahre Größe für 12 Monate feststellen ... wie? |
// TODO: MaxSelectRange sollte 365 oder 366 sein... |
type |
TFullYearCalendar = class(TMonthCalendar) |
private |
function GetDate: TDate; |
procedure SetDate(Value: TDate); |
function GetDateTime: TDateTime; |
procedure SetDateTime(Value: TDateTime); |
procedure CNNotify(var Message: TWMNotify); message CN_NOTIFY; |
public |
constructor Create(AOwner: TComponent); override; |
protected |
property DateTime: TDateTime read GetDateTime write SetDateTime; |
published |
property Date: TDate read GetDate write SetDate; |
end; |
procedure Register; |
implementation |
uses |
DateUtils, CommCtrl; |
function TFullYearCalendar.GetDate: TDate; |
begin |
result := inherited Date; |
end; |
procedure TFullYearCalendar.SetDate(Value: TDate); |
begin |
if YearOf(Value) <> YearOf(Date) then |
begin |
// User has scrolled. |
// The problem is, that the scrolling does not use Date as the source, |
// instead it takes the left top month as source. So, every scrolling |
// would set the month to January! |
if MonthOf(DateTime) <> 1 then |
begin |
Value := IncMonth(Value, MonthOf(DateTime)-1); |
end; |
end; |
// We want to have January always on left top! |
// Warning: Does not work if the control is too small. |
if not MultiSelect then |
begin |
inherited Date := EndOfTheYear(Value); |
inherited Date := StartOfTheYear(Value); |
end; |
// Then jump to our desired date |
inherited Date := Value; |
end; |
function TFullYearCalendar.GetDateTime: TDateTime; |
begin |
result := Date; |
end; |
procedure TFullYearCalendar.SetDateTime(Value: TDateTime); |
begin |
Date := Value; |
end; |
constructor TFullYearCalendar.Create(AOwner: TComponent); |
begin |
inherited Create(AOwner); |
// Checked with Windows 2000 |
// Warning: Does not work if you use larger fonts! |
// TODO: Is there any way to determinate the real width and height of a full year? |
// Width := 666; |
// Height := 579; |
Width := 724; |
Height := 500; |
Constraints.MinWidth := Width; |
Constraints.MinHeight := Height; |
// Only jump in years |
MonthDelta := 12; |
end; |
procedure Register; |
begin |
RegisterComponents('Beispiele', [TFullYearCalendar]); |
end; |
// Copied from ComCtrls.pas |
function IsBlankSysTime(const ST: TSystemTime): Boolean; |
type |
TFast = array [0..3] of DWORD; |
begin |
Result := (TFast(ST)[0] or TFast(ST)[1] or TFast(ST)[2] or TFast(ST)[3]) = 0; |
end; |
// Copied from ComCtrls.pas - modified |
// This is necessary, so that our "Date" will be changed when the user scrolls! |
procedure TFullYearCalendar.CNNotify(var Message: TWMNotify); |
var |
ST: PSystemTime; |
//I, MonthNo: Integer; |
//CurState: PMonthDayState; |
begin |
with Message, NMHdr^ do |
begin |
case code of |
(* MCN_GETDAYSTATE: |
with PNmDayState(NMHdr)^ do |
begin |
FillChar(prgDayState^, cDayState * SizeOf(TMonthDayState), 0); |
if Assigned(FOnGetMonthInfo) then |
begin |
CurState := prgDayState; |
for I := 0 to cDayState - 1 do |
begin |
MonthNo := stStart.wMonth + I; |
if MonthNo > 12 then MonthNo := MonthNo - 12; |
FOnGetMonthInfo(Self, MonthNo, CurState^); |
Inc(CurState); |
end; |
end; |
end; *) |
MCN_SELECT, MCN_SELCHANGE: |
begin |
ST := @PNMSelChange(NMHdr).stSelStart; |
if not IsBlankSysTime(ST^) then |
(*F*)DateTime := SystemTimeToDateTime(ST^); |
if (*F*)MultiSelect then |
begin |
ST := @PNMSelChange(NMHdr).stSelEnd; |
if not IsBlankSysTime(ST^) then |
(*F*)EndDate := SystemTimeToDateTime(ST^); |
end; |
end; |
end; |
end; |
inherited; |
end; |
end. |
/Kalenderersatz/Calender.bdsproj |
---|
0,0 → 1,175 |
<?xml version="1.0" encoding="utf-8"?> |
<BorlandProject> |
<PersonalityInfo> |
<Option> |
<Option Name="Personality">Delphi.Personality</Option> |
<Option Name="ProjectType">VCLApplication</Option> |
<Option Name="Version">1.0</Option> |
<Option Name="GUID">{F3F21AED-7127-43ED-AB54-5BE84B351EDB}</Option> |
</Option> |
</PersonalityInfo> |
<Delphi.Personality> |
<Source> |
<Source Name="MainSource">Calender.dpr</Source> |
</Source> |
<FileVersion> |
<FileVersion Name="Version">7.0</FileVersion> |
</FileVersion> |
<Compiler> |
<Compiler Name="A">8</Compiler> |
<Compiler Name="B">0</Compiler> |
<Compiler Name="C">1</Compiler> |
<Compiler Name="D">1</Compiler> |
<Compiler Name="E">0</Compiler> |
<Compiler Name="F">0</Compiler> |
<Compiler Name="G">1</Compiler> |
<Compiler Name="H">1</Compiler> |
<Compiler Name="I">1</Compiler> |
<Compiler Name="J">0</Compiler> |
<Compiler Name="K">0</Compiler> |
<Compiler Name="L">1</Compiler> |
<Compiler Name="M">0</Compiler> |
<Compiler Name="N">1</Compiler> |
<Compiler Name="O">1</Compiler> |
<Compiler Name="P">1</Compiler> |
<Compiler Name="Q">0</Compiler> |
<Compiler Name="R">0</Compiler> |
<Compiler Name="S">0</Compiler> |
<Compiler Name="T">0</Compiler> |
<Compiler Name="U">0</Compiler> |
<Compiler Name="V">1</Compiler> |
<Compiler Name="W">0</Compiler> |
<Compiler Name="X">1</Compiler> |
<Compiler Name="Y">1</Compiler> |
<Compiler Name="Z">1</Compiler> |
<Compiler Name="ShowHints">True</Compiler> |
<Compiler Name="ShowWarnings">True</Compiler> |
<Compiler Name="UnitAliases">WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;</Compiler> |
<Compiler Name="NamespacePrefix"></Compiler> |
<Compiler Name="GenerateDocumentation">False</Compiler> |
<Compiler Name="DefaultNamespace"></Compiler> |
<Compiler Name="SymbolDeprecated">True</Compiler> |
<Compiler Name="SymbolLibrary">True</Compiler> |
<Compiler Name="SymbolPlatform">True</Compiler> |
<Compiler Name="SymbolExperimental">True</Compiler> |
<Compiler Name="UnitLibrary">True</Compiler> |
<Compiler Name="UnitPlatform">True</Compiler> |
<Compiler Name="UnitDeprecated">True</Compiler> |
<Compiler Name="UnitExperimental">True</Compiler> |
<Compiler Name="HResultCompat">True</Compiler> |
<Compiler Name="HidingMember">True</Compiler> |
<Compiler Name="HiddenVirtual">True</Compiler> |
<Compiler Name="Garbage">True</Compiler> |
<Compiler Name="BoundsError">True</Compiler> |
<Compiler Name="ZeroNilCompat">True</Compiler> |
<Compiler Name="StringConstTruncated">True</Compiler> |
<Compiler Name="ForLoopVarVarPar">True</Compiler> |
<Compiler Name="TypedConstVarPar">True</Compiler> |
<Compiler Name="AsgToTypedConst">True</Compiler> |
<Compiler Name="CaseLabelRange">True</Compiler> |
<Compiler Name="ForVariable">True</Compiler> |
<Compiler Name="ConstructingAbstract">True</Compiler> |
<Compiler Name="ComparisonFalse">True</Compiler> |
<Compiler Name="ComparisonTrue">True</Compiler> |
<Compiler Name="ComparingSignedUnsigned">True</Compiler> |
<Compiler Name="CombiningSignedUnsigned">True</Compiler> |
<Compiler Name="UnsupportedConstruct">True</Compiler> |
<Compiler Name="FileOpen">True</Compiler> |
<Compiler Name="FileOpenUnitSrc">True</Compiler> |
<Compiler Name="BadGlobalSymbol">True</Compiler> |
<Compiler Name="DuplicateConstructorDestructor">True</Compiler> |
<Compiler Name="InvalidDirective">True</Compiler> |
<Compiler Name="PackageNoLink">True</Compiler> |
<Compiler Name="PackageThreadVar">True</Compiler> |
<Compiler Name="ImplicitImport">True</Compiler> |
<Compiler Name="HPPEMITIgnored">True</Compiler> |
<Compiler Name="NoRetVal">True</Compiler> |
<Compiler Name="UseBeforeDef">True</Compiler> |
<Compiler Name="ForLoopVarUndef">True</Compiler> |
<Compiler Name="UnitNameMismatch">True</Compiler> |
<Compiler Name="NoCFGFileFound">True</Compiler> |
<Compiler Name="ImplicitVariants">True</Compiler> |
<Compiler Name="UnicodeToLocale">True</Compiler> |
<Compiler Name="LocaleToUnicode">True</Compiler> |
<Compiler Name="ImagebaseMultiple">True</Compiler> |
<Compiler Name="SuspiciousTypecast">True</Compiler> |
<Compiler Name="PrivatePropAccessor">True</Compiler> |
<Compiler Name="UnsafeType">False</Compiler> |
<Compiler Name="UnsafeCode">False</Compiler> |
<Compiler Name="UnsafeCast">False</Compiler> |
<Compiler Name="OptionTruncated">True</Compiler> |
<Compiler Name="WideCharReduced">True</Compiler> |
<Compiler Name="DuplicatesIgnored">True</Compiler> |
<Compiler Name="UnitInitSeq">True</Compiler> |
<Compiler Name="LocalPInvoke">True</Compiler> |
<Compiler Name="MessageDirective">True</Compiler> |
<Compiler Name="CodePage"></Compiler> |
</Compiler> |
<Linker> |
<Linker Name="MapFile">0</Linker> |
<Linker Name="OutputObjs">0</Linker> |
<Linker Name="GenerateHpps">False</Linker> |
<Linker Name="ConsoleApp">1</Linker> |
<Linker Name="DebugInfo">False</Linker> |
<Linker Name="RemoteSymbols">False</Linker> |
<Linker Name="GenerateDRC">False</Linker> |
<Linker Name="MinStackSize">16384</Linker> |
<Linker Name="MaxStackSize">1048576</Linker> |
<Linker Name="ImageBase">4194304</Linker> |
<Linker Name="ExeDescription"></Linker> |
</Linker> |
<Directories> |
<Directories Name="OutputDir"></Directories> |
<Directories Name="UnitOutputDir"></Directories> |
<Directories Name="PackageDLLOutputDir"></Directories> |
<Directories Name="PackageDCPOutputDir"></Directories> |
<Directories Name="SearchPath"></Directories> |
<Directories Name="Packages">vcl;rtl;vclx;VclSmp;vclshlctrls;dbrtl;adortl;vcldb;qrpt;bdertl;vcldbx;dsnap;cds;bdecds;teeui;teedb;tee;teeqr;ibxpress;visualclx;visualdbclx;inet;inetdb;nmfast;vclie;dbexpress;dbxcds;indy;dclOffice2k</Directories> |
<Directories Name="Conditionals"></Directories> |
<Directories Name="DebugSourceDirs"></Directories> |
<Directories Name="UsePackages">False</Directories> |
</Directories> |
<Parameters> |
<Parameters Name="RunParams"></Parameters> |
<Parameters Name="HostApplication"></Parameters> |
<Parameters Name="Launcher"></Parameters> |
<Parameters Name="UseLauncher">False</Parameters> |
<Parameters Name="DebugCWD"></Parameters> |
<Parameters Name="Debug Symbols Search Path"></Parameters> |
<Parameters Name="LoadAllSymbols">True</Parameters> |
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters> |
</Parameters> |
<Language> |
<Language Name="ActiveLang"></Language> |
<Language Name="ProjectLang">$00000000</Language> |
<Language Name="RootDir"></Language> |
</Language> |
<VersionInfo> |
<VersionInfo Name="IncludeVerInfo">False</VersionInfo> |
<VersionInfo Name="AutoIncBuild">False</VersionInfo> |
<VersionInfo Name="MajorVer">1</VersionInfo> |
<VersionInfo Name="MinorVer">0</VersionInfo> |
<VersionInfo Name="Release">0</VersionInfo> |
<VersionInfo Name="Build">0</VersionInfo> |
<VersionInfo Name="Debug">False</VersionInfo> |
<VersionInfo Name="PreRelease">False</VersionInfo> |
<VersionInfo Name="Special">False</VersionInfo> |
<VersionInfo Name="Private">False</VersionInfo> |
<VersionInfo Name="DLL">False</VersionInfo> |
<VersionInfo Name="Locale">1031</VersionInfo> |
<VersionInfo Name="CodePage">1252</VersionInfo> |
</VersionInfo> |
<VersionInfoKeys> |
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys> |
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys> |
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys> |
<VersionInfoKeys Name="InternalName"></VersionInfoKeys> |
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys> |
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys> |
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys> |
<VersionInfoKeys Name="ProductName"></VersionInfoKeys> |
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys> |
<VersionInfoKeys Name="Comments"></VersionInfoKeys> |
</VersionInfoKeys> |
</Delphi.Personality> |
</BorlandProject> |
/Kalenderersatz/NoDoubleStart.dcu |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/Kalenderersatz/Calender.dpr |
---|
0,0 → 1,17 |
program Calender; |
uses |
Forms, |
Main in 'Main.pas' {MainForm}, |
FullYearCalendar in 'FullYearCalendar.pas', |
NoDoubleStart in 'NoDoubleStart.pas'; |
{$R *.res} |
begin |
Application.Initialize; |
Application.ShowMainForm := false; |
Application.Title := 'Kalender'; |
Application.CreateForm(TMainForm, MainForm); |
Application.Run; |
end. |
/Kalenderersatz/Calender.dof |
---|
0,0 → 1,90 |
[FileVersion] |
Version=6.0 |
[Compiler] |
A=8 |
B=0 |
C=1 |
D=1 |
E=0 |
F=0 |
G=1 |
H=1 |
I=1 |
J=0 |
K=0 |
L=1 |
M=0 |
N=1 |
O=1 |
P=1 |
Q=0 |
R=0 |
S=0 |
T=0 |
U=0 |
V=1 |
W=0 |
X=1 |
Y=1 |
Z=1 |
ShowHints=1 |
ShowWarnings=1 |
UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; |
[Linker] |
MapFile=0 |
OutputObjs=0 |
ConsoleApp=1 |
DebugInfo=0 |
RemoteSymbols=0 |
MinStackSize=16384 |
MaxStackSize=1048576 |
ImageBase=4194304 |
ExeDescription= |
[Directories] |
OutputDir= |
UnitOutputDir= |
PackageDLLOutputDir= |
PackageDCPOutputDir= |
SearchPath= |
Packages=vcl;rtl;vclx;VclSmp;vclshlctrls;dbrtl;adortl;vcldb;qrpt;bdertl;vcldbx;dsnap;cds;bdecds;teeui;teedb;tee;teeqr;ibxpress;visualclx;visualdbclx;inet;inetdb;nmfast;vclie;dbexpress;dbxcds;indy;dclOffice2k |
Conditionals= |
DebugSourceDirs= |
UsePackages=0 |
[Parameters] |
RunParams= |
HostApplication= |
Launcher= |
UseLauncher=0 |
DebugCWD= |
[Language] |
ActiveLang= |
ProjectLang= |
RootDir= |
[Version Info] |
IncludeVerInfo=0 |
AutoIncBuild=0 |
MajorVer=1 |
MinorVer=0 |
Release=0 |
Build=0 |
Debug=0 |
PreRelease=0 |
Special=0 |
Private=0 |
DLL=0 |
Locale=1031 |
CodePage=1252 |
[Version Info Keys] |
CompanyName= |
FileDescription= |
FileVersion=1.0.0.0 |
InternalName= |
LegalCopyright= |
LegalTrademarks= |
OriginalFilename= |
ProductName= |
ProductVersion=1.0.0.0 |
Comments= |
[Excluded Packages] |
c:\programme\borland\delphi6\Bin\dclnet60.bpl=Borland Internet-Komponenten |
c:\programme\borland\delphi6\Bin\dclsoap60.bpl=Borland Soap-Komponenten |
/Kalenderersatz/TimeDate.ico |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/Kalenderersatz/Calender.res |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/Kalenderersatz/Main.pas |
---|
0,0 → 1,207 |
unit Main; |
interface |
uses |
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, |
Dialogs, ComCtrls, ShellAPI, Menus; |
const |
WM_TASKABAREVENT = WM_USER+1; //Taskbar message |
type |
TMainForm = class(TForm) |
PopupMenu1: TPopupMenu; |
Anzeigen1: TMenuItem; |
Beenden1: TMenuItem; |
procedure FormDestroy(Sender: TObject); |
procedure FormCreate(Sender: TObject); |
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); |
procedure Anzeigen1Click(Sender: TObject); |
procedure Beenden1Click(Sender: TObject); |
private |
RealClose: boolean; |
procedure TaskbarEvent(var Msg: TMessage); |
Message WM_TASKABAREVENT; |
procedure OnQueryEndSession(var Msg: TWMQueryEndSession); |
message WM_QUERYENDSESSION ; |
procedure NotifyIconChange(dwMessage: Cardinal); |
protected |
cal: TMonthCalendar; |
public |
procedure Vordergrund; |
end; |
var |
MainForm: TMainForm; |
implementation |
{$R *.dfm} |
uses |
CommCtrl, FullYearCalendar; |
// Ref: http://www.delphi-fundgrube.de/faq01.htm |
procedure TMainForm.TaskbarEvent(var Msg: TMessage); |
var |
Point: TPoint; |
begin |
{ Die WM_TaskbarEvent-Message "Msg" gibt in Msg.LParam |
das genaue Ereignis an. Msg.LParam kann folgende Werte für |
Mausereignisse annehmen: |
WM_MouseMove |
WM_LButtonDown |
WM_LButtonUp |
WM_LButtonDblClk |
WM_RButtonDown |
WM_RButtonUp |
WM_RButtonDblClk } |
case Msg.LParam of |
WM_LButtonDblClk: |
begin |
Vordergrund; |
end; |
WM_RButtonUp: |
begin |
// Rechtsklick |
// Diese Zeile ist wichtig, damit das PopupMenu korrekt |
// wieder geschlossen wird: |
SetForegroundWindow(Handle); |
// PopupMenu anzeigen: |
GetCursorPos(Point); |
PopupMenu1.Popup(Point.x, Point.y); |
//oder ohne Variable Point: |
//PopupMenu1.Popup(Mouse.CursorPos.x, Mouse.CursorPos.y); |
end; |
end; |
end; |
procedure TMainForm.NotifyIconChange(dwMessage: Cardinal); |
var |
NotifyIconData: TNotifyIconData; |
begin |
Fillchar(NotifyIconData,Sizeof(NotifyIconData),0); |
NotifyIconData.cbSize := Sizeof(NotifyIconData); |
NotifyIconData.Wnd := Handle; |
NotifyIconData.uFlags := NIF_MESSAGE |
or NIF_ICON |
or NIF_TIP; |
NotifyIconData.uCallbackMessage := WM_TASKABAREVENT; |
NotifyIconData.hIcon := Application.Icon.Handle; |
NotifyIconData.szTip := 'Kalender'; |
Shell_NotifyIcon(dwMessage, @NotifyIconData); |
end; |
procedure TMainForm.FormDestroy(Sender: TObject); |
begin |
cal.Free; |
NotifyIconChange(NIM_DELETE); |
end; |
procedure TMainForm.FormCreate(Sender: TObject); |
begin |
NotifyIconChange(NIM_ADD); |
cal := TFullYearCalendar.Create(Self); |
cal.Parent := Self; |
cal.WeekNumbers := true; |
ClientWidth := cal.Width; |
ClientHeight := cal.Height; |
end; |
// Ref: http://www.swissdelphicenter.ch/de/showcode.php?id=261 |
function ForceForegroundWindow(hwnd: THandle): Boolean; |
const |
SPI_GETFOREGROUNDLOCKTIMEOUT = $2000; |
SPI_SETFOREGROUNDLOCKTIMEOUT = $2001; |
var |
ForegroundThreadID: DWORD; |
ThisThreadID: DWORD; |
timeout: DWORD; |
begin |
if IsIconic(hwnd) then ShowWindow(hwnd, SW_RESTORE); |
if GetForegroundWindow = hwnd then Result := True |
else |
begin |
// Windows 98/2000 doesn't want to foreground a window when some other |
// window has keyboard focus |
if ((Win32Platform = VER_PLATFORM_WIN32_NT) and (Win32MajorVersion > 4)) or |
((Win32Platform = VER_PLATFORM_WIN32_WINDOWS) and |
((Win32MajorVersion > 4) or ((Win32MajorVersion = 4) and |
(Win32MinorVersion > 0)))) then |
begin |
// Code from Karl E. Peterson, www.mvps.org/vb/sample.htm |
// Converted to Delphi by Ray Lischner |
// Published in The Delphi Magazine 55, page 16 |
Result := False; |
ForegroundThreadID := GetWindowThreadProcessID(GetForegroundWindow, nil); |
ThisThreadID := GetWindowThreadPRocessId(hwnd, nil); |
if AttachThreadInput(ThisThreadID, ForegroundThreadID, True) then |
begin |
BringWindowToTop(hwnd); // IE 5.5 related hack |
SetForegroundWindow(hwnd); |
AttachThreadInput(ThisThreadID, ForegroundThreadID, False); |
Result := (GetForegroundWindow = hwnd); |
end; |
if not Result then |
begin |
// Code by Daniel P. Stasinski |
SystemParametersInfo(SPI_GETFOREGROUNDLOCKTIMEOUT, 0, @timeout, 0); |
SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT, 0, TObject(0), |
SPIF_SENDCHANGE); |
BringWindowToTop(hwnd); // IE 5.5 related hack |
SetForegroundWindow(hWnd); |
SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT, 0, TObject(timeout), SPIF_SENDCHANGE); |
end; |
end |
else |
begin |
BringWindowToTop(hwnd); // IE 5.5 related hack |
SetForegroundWindow(hwnd); |
end; |
Result := (GetForegroundWindow = hwnd); |
end; |
end; |
procedure TMainForm.Vordergrund; |
begin |
Show; |
ForceForegroundWindow(Handle); |
end; |
procedure TMainForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean); |
begin |
Hide; |
CanClose := RealClose; |
end; |
procedure TMainForm.OnQueryEndSession; |
begin |
RealClose := true; |
Close; |
Msg.Result := 1; |
end; |
procedure TMainForm.Anzeigen1Click(Sender: TObject); |
begin |
Vordergrund; |
end; |
procedure TMainForm.Beenden1Click(Sender: TObject); |
begin |
RealClose := true; |
Close; |
end; |
end. |
/Kalenderersatz/NoDoubleStart.pas |
---|
0,0 → 1,25 |
unit NoDoubleStart; |
interface |
implementation |
uses |
Windows, SysUtils, Forms; |
var |
mHandle: THandle; |
Initialization |
mHandle := CreateMutex(nil, True, 'ViaThinkSoft-Calendar'); |
if GetLastError = ERROR_ALREADY_EXISTS then |
begin |
Halt; |
end; |
finalization |
if mHandle <> 0 then |
begin |
CloseHandle(mHandle) |
end; |
end. |
/Kalenderersatz/FullYearCalendar.dcu |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/Kalenderersatz/Main.dfm |
---|
0,0 → 1,34 |
object MainForm: TMainForm |
Left = 194 |
Top = 148 |
BorderIcons = [biSystemMenu, biMinimize] |
Caption = 'Kalender' |
ClientHeight = 392 |
ClientWidth = 730 |
Color = clBtnFace |
Font.Charset = DEFAULT_CHARSET |
Font.Color = clWindowText |
Font.Height = -11 |
Font.Name = 'MS Sans Serif' |
Font.Style = [] |
OldCreateOrder = False |
Position = poScreenCenter |
OnCloseQuery = FormCloseQuery |
OnCreate = FormCreate |
OnDestroy = FormDestroy |
PixelsPerInch = 96 |
TextHeight = 13 |
object PopupMenu1: TPopupMenu |
Left = 8 |
Top = 8 |
object Anzeigen1: TMenuItem |
Caption = '&Anzeigen' |
Default = True |
OnClick = Anzeigen1Click |
end |
object Beenden1: TMenuItem |
Caption = '&Beenden' |
OnClick = Beenden1Click |
end |
end |
end |
/Kalenderersatz/Main.ddp |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/Kalenderersatz/Calender.cfg |
---|
0,0 → 1,38 |
-$A8 |
-$B- |
-$C+ |
-$D+ |
-$E- |
-$F- |
-$G+ |
-$H+ |
-$I+ |
-$J- |
-$K- |
-$L+ |
-$M- |
-$N+ |
-$O+ |
-$P+ |
-$Q- |
-$R- |
-$S- |
-$T- |
-$U- |
-$V+ |
-$W- |
-$X+ |
-$YD |
-$Z1 |
-cg |
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; |
-H+ |
-W+ |
-M |
-$M16384,1048576 |
-K$00400000 |
-LE"C:\Dokumente und Einstellungen\Daniel Marschall\Eigene Dateien\Borland Studio-Projekte\Bpl" |
-LN"C:\Dokumente und Einstellungen\Daniel Marschall\Eigene Dateien\Borland Studio-Projekte\Bpl" |
-w-UNSAFE_TYPE |
-w-UNSAFE_CODE |
-w-UNSAFE_CAST |
/Kalenderersatz/Calender.exe |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/Kalenderersatz/Main.dcu |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |