XP と Vista では正常に動作する .NET 2.0 アプリがありますが、Windows 7 RC (x64) では次のエラーでクラッシュします。
例外情報
例外の種類: System.OutOfMemoryException メッセージ: メモリが不足しています。データ: System.Collections.ListDictionaryInternal TargetSite: Void .ctor(System.Drawing.Image, System.Drawing.Drawing2D.WrapMode) HelpLink: NULL ソース: System.Drawing
スタックトレース情報
System.Drawing.TextureBrush..ctor (画像イメージ、WrapMode wrapMode) で System.Windows.Forms.ControlPaint.DrawBackgroundImage (Graphics g、画像 backgroundImage、Color backColor、ImageLayout backgroundImageLayout、四角形境界、四角形 clipRect、ポイント scrollOffset、RightToLeft rightToLeft ) System.Windows.Forms.Control.PaintBackground(PaintEventArgs e, Rectanglerectangle, Color backColor, Point scrollOffset) at System.Windows.Forms.Control.PaintBackground(PaintEventArgs e, Rectanglerectangle) at System.Windows.Forms.Control. System.Windows.Forms.ScrollableControl.OnPaintBackground(PaintEventArgs e) の OnPaintBackground(PaintEventArgs pevent) Message& m) System.Windows.Forms.Control で。System.Windows.Forms.ScrollableControl.WndProc(Message& m) の WndProc(Message& m)
なぜこれが起こっているのか、またはそれを回避するようにプログラムする方法についてのアイデアはありますか? 特別な背景のない標準の winform をペイントするだけです。
更新:これは、デフォルトでもある BackgroundImageLayout = ImageLayout.Tile の場合にのみ問題になることがわかりました。ズームまたはセンターに設定すると、問題は消えます。ただし、タイル張りにする必要があるため、これはかなり不十分です。