捐赠 | 广告 | 注册 | 发布 | 上传 | 关于我们    
  粤ICP备10103342号-1 DELPHI盒子 | 盒子文章 | 盒子问答悬赏 | 最新更新 | 盒子检索 | 下载中心 | 高级搜索    
  精品专区 | 繁體中文 | 奖励公告栏 | 直通车账号登陆 | 关闭GOOGLE广告 | 临时留言    
盒子资源分类
全部展开 - 全部合拢
JJYY 聊天软件 (含服务器)
关键字:JJYY 聊天软件 Net Chat 俄罗斯方块
来 自:原创
平 台:Win9x,Win2k/XP/NT,Win2003 下载所需:0 火柴
深浅度:中级 完成时间:2005/8/29
发布者:loskiller 发布时间:2005/8/29
编辑器:DELPHI6 语  种:简体中文
分 类:网络 下载浏览:5148/17804
加入到我的收藏
下载错误报错
登陆以后才能下载
 用户名:
 密 码:
自动登陆(30天有效)
图片如果打不开,说明流量不够了,请稍候下载……
小型局域网聊天软件,带服务器,适合一二十人使用。
也可以在互联网上使用,只要服务器有静态的IP。
使用无阻塞方式,数据可能会不同步。
为了省事消息没加密。
文件传输功能只能在局域网内使用。
主要控件有:
1。Raize3.0.10
2。Coolmenu
3。俄罗斯方块(Square1.0)
4。我修改过的TMagnetic
以上控件在盒子网上都能找到,最好用delphi6。
服务器密码为:JJYY
还有很多的bug,代码也很乱,感觉要做好太难了。
里面有个俄罗斯方块对战游戏,不能同步,不知道谁有好的方法。
Google
 
本站原创作品,未经作者许可,严禁任何方式转载;转载作品,如果侵犯了您的权益,请联系我们
龙脉加密锁 15元起 Grid++Report 报表 申请支付@网
 相关文章
JJYY 聊天软件 (改进版)
loskiller 2006/3/15 下+7950/浏+18434 评+32
JJYY 聊天软件 (含服务器)
loskiller 2005/8/29 下+5148/浏+17805 评+17
相关评论
共有评论17条 当前显示最后6条评论
zjf80 2005/10/15 16:00:41
TMagnetic控件怎么装不上,点编译后没有一点反应.
cswang 2005/10/17 0:54:29
我用 delphi7 没有
tclientsock 
哪能找到
wanlijielang 2005/10/29 9:52:17
这个不错呢,我正准备做毕业设计呢,做一个
网上聊天程序,不知道有那位大哥可以帮帮我呀
我的QQ:277909748 加我呀,
你们也可以联系方式给我呀
zjylyj 2006/2/24 17:32:31
请把以下内容完全覆盖从本软件作者自带的TMagnetic文件即可。
unit Magnetic;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,Dialogs,
  ExtCtrls;

type
  TMagOption = class (TPersistent)
  private
      fMagTray:boolean;
      fMagExplorer:boolean;
      fMagCustom:boolean;
  public
      constructor Create;
      destructor Destroy;override;
  published
      property MagTray:boolean     read fMagTray      write fMagTray;
      property MagExplorer:boolean read fMagExplorer  write fMagExplorer;
      property MagCustom:boolean   read fMagCustom    write fMagCustom;
  end;

type
  TMagnetic = class(TCustomPanel)
  private
    fActive:Boolean;
    fCanResize:Boolean;
    fOldPoint:TPoint;     {old mouse point}
    fNewPoint:TPoint;     {moved point}
    fMagEffect:Integer;   {magnetic effect default 10pix}
    fMagOption:TMagOption;
    fMovedByForm:Boolean;
    fForm:TForm;
    fOldX, fOldY: Integer;
    fOldTWndMethod:TWndMethod;
    HWnd_Tray,HWnd_Explorer:HWND;
    RWnd_Tray,RWnd_Explorer,RWnd_Custrom:TRect;
    procedure Magnetic(var MagPoint:TPoint);
    procedure WndProcMe(var Message: TMessage);
    procedure WMMouseMove(var Msg:TMessage);
    procedure WMLButtonDown(var Msg:TMessage);
    procedure WMNCHitTest(var Msg: TMessage);
    { private declarations }
  protected
    procedure Loaded;override;
    procedure SetMagOption(Value:TMagOption);
    procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
    procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;
    { protected declarations }
  public
    CustomMagWnd:HWND;
    constructor Create(AOwner:TComponent); override;
    destructor Destroy; override;
    { public declarations }
  published
    property Active:boolean       read fActive          write fActive;
    property FormCanResize:boolean    read fCanResize       write fCanResize;    
    property MagOption:TMagOption read fMagOption       write SetMagOption;
    property MagEffect:Integer    read fMagEffect       write fMagEffect;
    property MovedByForm:Boolean  read fMovedByForm     write fMovedByForm;
    property Color;
    property Caption;
    property Align;
    { published declarations }
  end;


procedure Register;

implementation

constructor TMagOption.Create;
begin
  inherited Create;
  fMagTray:=True;
  fMagExplorer:=False;
  fMagCustom:=False;
end;

destructor TMagOption.Destroy;
begin
  inherited Destroy;
end;

constructor TMagnetic.Create(AOwner:TComponent);
begin
  inherited Create(AOwner);
  fActive:=True;
  fMagEffect:=10;
  fMovedByForm:=false;
  height:=30;
  width:=100;
  BevelInner:=bvNone;
  BevelOuter:=bvNone;
  Parent:=fForm;
  fMagOption:=TMagOption.Create;
  fForm:=TForm(AOwner);
  if fForm.BorderStyle=bsNone then fCanResize:=true;
end;

destructor TMagnetic.Destroy;
begin
  fMagOption.Free;
  if not (CsDesigning in ComponentState) then
    fForm.WindowProc:=fOldTWndMethod;
  inherited Destroy;
end;

procedure TMagnetic.WndProcMe(var Message: TMessage);
begin
  { disable during Delphi IDE }
  if (CsDesigning in ComponentState) then fOldTwndMethod(Message)
  else
    case Message.Msg of
      WM_LBUTTONDOWN : WMLButtonDown(Message);
      WM_MOUSEMOVE   : WMMouseMove(Message);
      WM_NCHITTEST   : WMNCHitTest(Message);
    else fOldTwndMethod(Message);
  end;
end;

procedure TMagnetic.WMMouseMove(var Msg:TMessage);
var
  pt:TPoint;
begin
  if not (CsDesigning in ComponentState) then
  begin
    fOldTWndMethod(Msg);
    if not fActive then exit;
    {whether can move}
    if (fForm.WindowState<>wsNormal)and not fActive then exit;
    {whether mouse left button}
    if HiWord(GetAsyncKeyState(VK_LBUTTON))>0 then
    begin
      pt:=Point(TWMMouseMove(Msg).XPos,TWMMouseMove(Msg).YPos);
      {calculate new point}
      fNewPoint:=Point(fForm.left+pt.x-fOldPoint.x,fForm.top+pt.y-fOldPoint.y);
      Magnetic(fNewPoint);  {do magnetic}
      fForm.SetBounds(fNewpoint.X,fNewpoint.Y,fForm.Width,fForm.Height);
    end;
  end;
end;

procedure TMagnetic.WMLButtonDown(var Msg: TMessage);
begin
  if not (CsDesigning in ComponentState) then
  begin
    fOldTWndMethod(Msg);
    if not fActive then exit;
    fOldPoint:=Point(TWMLButtonDown(Msg).XPos,TWMLButtonDown(Msg).YPos);
    if MagOption.fMagCustom and (CustomMagWnd>0) then
      GetWindowRect(CustomMagWnd, RWnd_Custrom);     { get custom rect }
    if MagOption.fMagExplorer then
      HWnd_Explorer:=FindWindow('CabinetWClass',nil);{ get explorer handle }
      if HWnd_Explorer>0 then
        GetWindowRect(HWnd_Explorer, RWnd_Explorer); { get explorer rect }
    if MagOption.fMagTray then
      HWnd_Tray:=FindWindow('Shell_TrayWnd',nil);    { get traybar handle }
    if HWnd_Tray>0 then
      GetWindowRect(HWnd_Tray, RWnd_Tray);          { get taskbar rect }
  end;
end;

procedure TMagnetic.WMNCHitTest(var Msg:TMessage);
var
  pt:TPoint;
begin
  if not (CsDesigning in ComponentState) then
  begin
    fOldTWndMethod(Msg);
    {if windowstate not normal and not can resize then exit}
    if (fForm.WindowState<>wsNormal) or not fCanResize then exit;
    {get form's edges and change it's size}
    pt:=Point(TWMNCHitTest(Msg).XPos,TWMNCHitTest(Msg).YPos);
    pt:=fForm.ScreenToClient(pt);
    if (pt.x<5) and (pt.y<5) then Msg.Result:=htTopLeft
    else if (pt.x>fForm.Width-5) and (pt.y<5) then Msg.Result:=htTopRight
    else if (pt.x>fForm.Width-5) and (pt.y>fForm.Height-5) then Msg.Result:=htBottomRight
    else if (pt.x<5) and (pt.y>fForm.Height-5) then Msg.Result:=htBottomLeft
    else if (pt.x<5) then Msg.Result:=htLeft
    else if (pt.y<5) then Msg.Result:=htTop
    else if (pt.x>fForm.Width-5) then Msg.Result:=htRight
    else if (pt.y>fForm.Height-5) then Msg.Result:=htBottom;
  end;
end;

procedure TMagnetic.Magnetic(var MagPoint:TPoint);
begin
  if not fActive then exit;

  if MagOption.fMagCustom and (CustomMagWnd>0) then
  begin
    { mangetize custrom}
    if Abs(RWnd_Custrom.Bottom-MagPoint.Y)<fMagEffect then MagPoint.Y:=RWnd_Custrom.Bottom
    else if Abs(MagPoint.Y+fForm.Height-RWnd_Custrom.Top)<fMagEffect then MagPoint.Y:=RWnd_Custrom.Top-fForm.Height;
    if Abs(RWnd_Custrom.Right-MagPoint.X)<fMagEffect then MagPoint.X:=RWnd_Custrom.Right
    else if Abs(MagPoint.X+fForm.Width-RWnd_Custrom.Left)<fMagEffect then MagPoint.X:=RWnd_Custrom.Left-fForm.Width;
  end;

  if MagOption.fMagExplorer and (HWnd_Explorer>0) then
  begin
    { mangetize explorer}
    if Abs(RWnd_Explorer.Bottom-MagPoint.Y)<fMagEffect then MagPoint.Y:=RWnd_Explorer.Bottom
    else if Abs(MagPoint.Y+fForm.Height-RWnd_Explorer.Top)<fMagEffect then MagPoint.Y:=RWnd_Explorer.Top-fForm.Height;
    if Abs(RWnd_Explorer.Right-MagPoint.X)<fMagEffect then MagPoint.X:=RWnd_Explorer.Right
    else if Abs(MagPoint.X+fForm.Width-RWnd_Explorer.Left)<fMagEffect then MagPoint.X:=RWnd_Explorer.Left-fForm.Width;
  end;

  if MagOption.fMagTray and (HWnd_Tray>0) then
  begin
    { mangetize tray}
    if Abs(RWnd_Tray.Bottom-MagPoint.Y)<fMagEffect then MagPoint.Y:=RWnd_Tray.Bottom
    else if Abs(MagPoint.Y+fForm.Height-RWnd_Tray.Top)<fMagEffect then MagPoint.Y:=RWnd_Tray.Top-fForm.Height;
    if Abs(RWnd_Tray.Right-MagPoint.X)<fMagEffect then MagPoint.X:=RWnd_Tray.Right
    else if Abs(MagPoint.X+fForm.Width-RWnd_Tray.Left)<fMagEffect then MagPoint.X:=RWnd_Tray.Left-fForm.Width;
  end;

  { magnetize screen }
  if MagPoint.X<fMagEffect then MagPoint.X:=0;
  if MagPoint.X>Screen.Width-fForm.Width-fMagEffect then MagPoint.X:=Screen.Width-fForm.Width;
  if MagPoint.Y<fMagEffect then MagPoint.Y:=0;
  if MagPoint.Y>Screen.Height-fForm.Height-fMagEffect then MagPoint.Y:=Screen.Height-fForm.Height;
  { end screen }

end;

procedure TMagnetic.SetMagOption(Value:TMagOption);
begin
  FMagOption.Assign(Value);
end;

procedure TMagnetic.MouseDown(Button: TMouseButton; Shift: TShiftState; X,
  Y: Integer);
begin
  inherited;
  if not (CsDesigning in ComponentState) then
  begin
    if not fActive then exit;
    FOldX := X;
    FOldy := Y;
    if MagOption.fMagCustom and (CustomMagWnd>0) then
      GetWindowRect(CustomMagWnd, RWnd_Custrom);
    if MagOption.fMagExplorer then
      HWnd_Explorer:=FindWindow('CabinetWClass',nil);
      if HWnd_Explorer>0 then
        GetWindowRect(HWnd_Explorer, RWnd_Explorer);
    if MagOption.fMagTray then
      HWnd_Tray:=FindWindow('Shell_TrayWnd',nil);
    if HWnd_Tray>0 then
      GetWindowRect(HWnd_Tray, RWnd_Tray);
  end;
end;

procedure TMagnetic.MouseMove(Shift: TShiftState; X, Y: Integer);
begin
  inherited;
  if not (CsDesigning in ComponentState) then
  begin
    if not fActive then exit;
    if (fForm.WindowState<>wsNormal)and not fActive then exit;
    if HiWord(GetAsyncKeyState(VK_LBUTTON))>0 then
    begin
      fNewPoint:=Point(fForm.left+x-fOldx,fForm.top+y-fOldy);
      Magnetic(fNewPoint);
      fForm.SetBounds(fNewpoint.X,fNewpoint.Y,fForm.Width,fForm.Height);
    end;
  end;
end;

procedure TMagnetic.Loaded;
begin
  inherited;
  if not (CsDesigning in ComponentState) then
  begin
    fOldTWndMethod:=fForm.WindowProc;
    if fMovedByForm then
      fForm.WindowProc:=WndProcMe;
  end;
end;

procedure Register;
begin
  RegisterComponents('Samples', [TMagnetic]);
end;


end.
123ha 2006/3/27 16:17:48
谁知道到底怎么安装这些控件啊?为什么不能编译呢?

有没有详细的步骤啊?
twofinger 2007/9/6 16:52:21
顶了。。。
我要发表评论 查看全部评论
 
  DELPHI盒子版权所有 技术支持:深圳市麟瑞科技有限公司 1999-2024 V4.01 粤ICP备10103342号-1 更新RSS列表