为何一用TImage控件C++ Builder就出错

nkcqy 2000-05-29 07:35:00
在Delphi5或C++Bulider4.0的窗体上使用图象类控件,比如拖动,
改变大小,删除等,Windows立即弹出一个白色底的提示,显示:
“Delphi32 用户程序出错。要继续工作,请单击‘忽略’继续并保存到
新文件中。要退出该程序,请单击‘关闭’。”
第一次在Windows97下装完C++Builder4并使用几次后开始出现问
题,单击“忽略”若干次,可以继续工作,但问题越来越频繁,单
击“忽略”也不行,只能“关闭”。单击关闭后弹出“非法操作”
的提示,详细资料显示“BCB运行时产生源错误,位于模块GDI.EXE
的0004:000006fe”重新安装或改装为Delphi5都没有得到任何改
善,而且有时使用别的控件时也会出现同样问题。重新安装Win97
就回到刚开始装C++Builder4时的状况,但在朋友的Windows98上安
装后似乎不会出现这种问题。
各位高手请出手想救!
...全文
176 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
nkcqy 2000-06-04
  • 打赏
  • 举报
回复
我发现原因了,是显卡驱程的问题。有一次使用WinAMP时
也出现了完全一样的现象!因为显示部分是由GDI管理的,
检查之后,发现是显卡驱程的版本问题,换了一个就完全
解决了!不过有趣的是,使用其他程序,包括玩各种游戏
什么问题都没有。看来C++Builder还能用来检测驱程?!
风子 2000-05-30
  • 打赏
  • 举报
回复
我以前在WIN95用过一段时间,好像都没有遇这种问题。
是不是你的系统有问题
halfdream 2000-05-29
  • 打赏
  • 举报
回复
多半是alexela 所说的原因吧,(不过我却认为D版同正版并没有什么质量差异)。
我想你需要的是解决问题而不是找出问题原因。那你就装一下WIN98吧,
毕竟, BCB4。0 在WIN98 更能发挥它的作用,至少WIN98对COM 比WIN97 要改进了
一些。
alexela 2000-05-29
  • 打赏
  • 举报
回复
如此问题,很可能是你的WIN97有毛病(盗版嘛,都这样)。不过我不明白,WIN98那么好,为什么非用WIN97呢?C++BUILDER4。0版本比较高,其不支持低版本的WINDOWS是常事。(你认为C++BUILDER 4。0 在WINDOWS32 中运行会出现什么情况????)
问题解决很容易,装WIN98。(除非你非要和这些版本冲突过不去)
能讲的就这么多了,祝你好运
有其他问题,可再联系:ALEXELA_2000@SINA.COM
delphi 7 gif控件 unit GIFImage; //////////////////////////////////////////////////////////////////////////////// // // // Project: GIF Graphics Object // // Module: gifimage // // Description: TGraphic implementation of the GIF89a graphics format // // Version: 2.2 // // Release: 5 // // Date: 23-MAY-1999 // // Target: Win32, Delphi 2, 3, 4 & 5, C++ Builder 3 & 4 // // Author(s): anme: Anders Melander, anders@melander.dk // // fila: Filip Larsen // // rps: Reinier Sterkenburg // // Copyright: (c) 1997-99 Anders Melander. // // All rights reserved. // // Formatting: 2 space indent, 8 space tabs, 80 columns. // // // //////////////////////////////////////////////////////////////////////////////// // Changed 2001.07.23 by Finn Tolderlund: // // Changed according to e-mail from "Rolf Frei" // // on 2001.07.23 so that it works in Delphi 6. // // // // Changed 2002.07.07 by Finn Tolderlund: // // Incorporated additional modifications by Alexey Barkovoy (clootie@reactor.ru) // found in his Delphi 6 GifImage.pas (from 22-Dec-2001). // // Alexey Barkovoy's Delphi 6 gifimage.pas can be downloaded from // // http://clootie.narod.ru/delphi/download_vcl.html // // These changes made showing of animated gif files more stable. The code // // from 2001.07.23 could crash sometimes with an Execption EAccessViolation. // // // // Changed 2002.10.06 by Finn Tolderlund: // // Delphi 7 compatible. // // // // Changed 2003-03-06 by Finn Tolderlund: // // Changes made as a result of postings in borland.public.delphi.graphics // // from 2003-02-28 to 2003-03-05 where white (255,255,255) in a bitmap // // was converted to (254,254,254) in the gif. // // The doCreateOptimizedPaletteFromSingleBitmap function and // // the CreateOptimizedPaletteFromManyBitmaps function is changed so that // // the correct offset 246 is used instead of 245. // // The ReduceColors function is changed according to Anders Melander's post // // so that a colour get converted to the precise colour if that colour is // // present in the palette when using ColorReduction rmQuantize. // // // // Changed 2003-03-09 by Finn Tolderlund: // // Delphi 7 version is now assumed if unknown compiler version is unknown // // for better compatibility with future Delphi versions. // // Hopefully this code is now compatible with future Delphi versions, // // unless Borland makes some changes that breaks existing code. // // // // Changed 2003-08-04 by Finn Tolderlund: // // Changed procedure AddMaskOnly so that it doesn't leak a GDI HBitmap-object // // and it doesn't release the handle of the source bitmap which // // is used to assign to the GIF object as in gif.assign(bm); // // These changes were made as a result of a news post made by Renate Schaaf // // with the subject "TGifImage HBitmap leak on assign?" // // in borland.public.delphi.graphics on Mon 28 Jul 2003 and Sun 03 Aug 2003. // // // // Changed 2004.03.09 by Finn Tolderlund: // // Added a ForceFrame property to the TGIFImage class. // // The ForceFrame property can be used to make TGIFImage display a apecific // // sub frame from an animated gif. // // How to use: Set the Animate property to False and set the ForceFrame // // property to a desired frame number (0-N) // // Normal display: Set the ForceFrame property to -1 and set Animate to True. // // If ForceFrame is negative TGIFImage behaves just as before this change. // // Note that if the sub frame in the gif only contains part of the image // // (i.e. only the changes from previous frames) the result is unpredictable. // // The result is best if each sub frame contains a whole image. // // If the sub frame is transparent the background is not automatically // // restored, you must do so yourself if you want that. // // If you are using a TImage to display the gif you can use // // Image.Parent.Invalidate or Image.Parent.Refresh to restore the background. // // This change was made as a result of a email correspondance with // // Tineke Kosmis (http://www.classe.nl/) which requested such a property. // // // //////////////////////////////////////////////////////////////////////////////// // // // Please read the "Conditions of use" in the release notes. // // // //////////////////////////////////////////////////////////////////////////////// // Known problems: // // * The combination of buffered, tiled and transparent draw will display the // background incorrectly (scaled). // If this is a problem for you, use non-buffered (goDirectDraw) drawing // instead. // // * The combination of non-buffered, transparent and stretched draw is // sometimes distorted with a pattern effect when the image is displayed // smaller than the real size (shrinked). // // * Buffered display flickers when TGIFImage is used by a transparent TImage // component. // This is a problem with TImage caused by the fact that TImage was designed // with static images in mind. Not much I can do about it. // //////////////////////////////////////////////////////////////////////////////// // To do (in rough order of priority): // { TODO -oanme -cFeature : TImage hook for destroy notification. } // { TODO -oanme -cFeature : TBitmap pool to limit resource consumption on Win95/98. } // { TODO -oanme -cImprovement : Make BitsPerPixel property writable. } // { TODO -oanme -cFeature : Visual GIF component. } // { TODO -oanme -cImprovement : Easier method to determine DrawPainter status. } // { TODO -oanme -cFeature : Import to 256+ color GIF. } // { TODO -oanme -cFeature : Make some of TGIFImage's properties persistent (DrawOptions etc). } // { TODO -oanme -cFeature : Add TGIFImage.Persistent property. Should save published properties in application extension when this options is set. } // { TODO -oanme -cBugFix : Solution for background buffering in scrollbox. }

13,825

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧