Click here to Skip to main content
16,016,157 members
Home / Discussions / C#
   

C#

 
GeneralRe: Dynamically generate link labels (open to alternatives if necessary) Pin
Matt U.21-May-11 8:59
Matt U.21-May-11 8:59 
AnswerRe: Dynamically generate link labels (open to alternatives if necessary) Pin
Luc Pattyn21-May-11 9:10
sitebuilderLuc Pattyn21-May-11 9:10 
GeneralRe: Dynamically generate link labels (open to alternatives if necessary) Pin
Matt U.21-May-11 10:28
Matt U.21-May-11 10:28 
AnswerRe: Dynamically generate link labels (open to alternatives if necessary) Pin
Luc Pattyn21-May-11 10:34
sitebuilderLuc Pattyn21-May-11 10:34 
Questionget the unicode of a character in c# Pin
prasadbuddhika20-May-11 22:44
prasadbuddhika20-May-11 22:44 
AnswerRe: get the unicode of a character in c# Pin
Daniel Scott20-May-11 23:05
Daniel Scott20-May-11 23:05 
GeneralRe: get the unicode of a character in c# Pin
prasadbuddhika20-May-11 23:22
prasadbuddhika20-May-11 23:22 
QuestionNotImplementedExpression System.Collections.ListDictionaryInternal --> Error in Print-Preview in XP Pin
Pfotenhauer20-May-11 22:33
Pfotenhauer20-May-11 22:33 
He everyone,

within a application i've use a PrintPreviewControl. When calling ProntPage a error-message occour:

<b>Not ImplementedException System.Collections.ListDictionaryInternal</b>

The error comes up in Line:

<b>e.Graphics.DrawImage ( Image, 10,10 );</b>

But only if the program runs within Windows XP (Svp3). Doing under Windows 7 all works well. Ive also tried all versions of .NET Framework (2.0, 3.0, 3.5 4.0) but this does not change anything.
The development is done with VS2010 under Windows 7

Here are the code to test:

<pre>//Form1.cs

using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace PrintImageTest
{
static class Program
{
/// &lt;summary&gt;
/// Der Haupteinstiegspunkt für die Anwendung.
/// &lt;/summary&gt;
[STAThread]
static void Main ()
{
Application.EnableVisualStyles ();
Application.SetCompatibleTextRenderingDefault ( false );
Application.Run ( new Form1 () );
}
}
}

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace PrintImageTest
{
public partial class Form1 : Form
{
public Form1 ()
{
InitializeComponent ();
this.printDocument1.PrintPage += new System.Drawing.Printing.PrintPageEventHandler ( printDocument1_PrintPage );
}

void printDocument1_PrintPage ( object sender, System.Drawing.Printing.PrintPageEventArgs e )
{
Bitmap Image = new Bitmap (@"C:\Temp\TestImage.jpg");
e.Graphics.DrawImage ( Image, 10,10 );
}
}
}

&lt;br/&gt;//Forms.Designer.cs

namespace PrintImageTest
{
partial class Form1
{
/// &lt;summary&gt;
/// Erforderliche Designervariable.
/// &lt;/summary&gt;
private System.ComponentModel.IContainer components = null;

/// &lt;summary&gt;
/// Verwendete Ressourcen bereinigen.
/// &lt;/summary&gt;
/// &lt;param name="disposing"&gt;True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.&lt;/param&gt;
protected override void Dispose ( bool disposing )
{
if ( disposing &amp;&amp; ( components != null ) )
{
components.Dispose ();
}
base.Dispose ( disposing );
}

#region Vom Windows Form-Designer generierter Code

/// &lt;summary&gt;
/// Erforderliche Methode für die Designerunterstützung.
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
/// &lt;/summary&gt;
private void InitializeComponent ()
{
this.printPreviewControl1 = new System.Windows.Forms.PrintPreviewControl ();
this.printDocument1 = new System.Drawing.Printing.PrintDocument ();
this.SuspendLayout ();
//
// printPreviewControl1
//
this.printPreviewControl1.AutoZoom = false;
this.printPreviewControl1.Document = this.printDocument1;
this.printPreviewControl1.Location = new System.Drawing.Point ( 24, 32 );
this.printPreviewControl1.Name = "printPreviewControl1";
this.printPreviewControl1.Size = new System.Drawing.Size ( 401, 432 );
this.printPreviewControl1.TabIndex = 1;
this.printPreviewControl1.Zoom = 0.36783575705731392D;
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF ( 6F, 13F );
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size ( 471, 508 );
this.Controls.Add ( this.printPreviewControl1 );
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout ( false );

}

#endregion

private System.Windows.Forms.PrintPreviewControl printPreviewControl1;
private System.Drawing.Printing.PrintDocument printDocument1;
}
}
&lt;br/&gt;
//Programm.cs

using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace PrintImageTest
{
static class Program
{
/// &lt;summary&gt;
/// Der Haupteinstiegspunkt für die Anwendung.
/// &lt;/summary&gt;
[STAThread]
static void Main ()
{
Application.EnableVisualStyles ();
Application.SetCompatibleTextRenderingDefault ( false );
Application.Run ( new Form1 () );
}
}
}

</pre>

I would be very happy if someone could help with this.
Thank you in advance

pfotenh
AnswerRe: NotImplementedExpression System.Collections.ListDictionaryInternal --> Error in Print-Preview in XP Pin
phil.o21-May-11 0:36
professionalphil.o21-May-11 0:36 
AnswerRe: NotImplementedExpression System.Collections.ListDictionaryInternal --> Error in Print-Preview in XP Pin
Pfotenhauer21-May-11 1:20
Pfotenhauer21-May-11 1:20 
AnswerRe: NotImplementedExpression System.Collections.ListDictionaryInternal --> Error in Print-Preview in XP Pin
Luc Pattyn21-May-11 2:19
sitebuilderLuc Pattyn21-May-11 2:19 
AnswerRe: NotImplementedExpression System.Collections.ListDictionaryInternal --> Error in Print-Preview in XP Pin
Pfotenhauer21-May-11 5:26
Pfotenhauer21-May-11 5:26 
AnswerRe: NotImplementedExpression System.Collections.ListDictionaryInternal --> Error in Print-Preview in XP Pin
Luc Pattyn21-May-11 5:39
sitebuilderLuc Pattyn21-May-11 5:39 
QuestionProblem with Process.Start("WINWORD.EXE", selectedFile); [modified] Pin
_Q12_20-May-11 6:51
_Q12_20-May-11 6:51 
AnswerRe: Problem with Process.Start("WINWORD.EXE", selectedFile); Pin
Dave Kreskowiak20-May-11 7:02
mveDave Kreskowiak20-May-11 7:02 
GeneralRe: Problem with Process.Start("WINWORD.EXE", selectedFile); Pin
_Q12_20-May-11 7:25
_Q12_20-May-11 7:25 
AnswerRe: Problem with Process.Start("WINWORD.EXE", selectedFile); Pin
Luc Pattyn20-May-11 7:37
sitebuilderLuc Pattyn20-May-11 7:37 
GeneralRe: Problem with Process.Start("WINWORD.EXE", selectedFile); Pin
_Q12_20-May-11 7:45
_Q12_20-May-11 7:45 
GeneralRe: Problem with Process.Start("WINWORD.EXE", selectedFile); Pin
Dave Kreskowiak20-May-11 7:50
mveDave Kreskowiak20-May-11 7:50 
GeneralRe: Problem with Process.Start("WINWORD.EXE", selectedFile); Pin
_Q12_20-May-11 7:57
_Q12_20-May-11 7:57 
GeneralRe: Problem with Process.Start("WINWORD.EXE", selectedFile); Pin
Dave Kreskowiak20-May-11 11:06
mveDave Kreskowiak20-May-11 11:06 
GeneralRe: Problem with Process.Start("WINWORD.EXE", selectedFile); Pin
AspDotNetDev20-May-11 13:29
protectorAspDotNetDev20-May-11 13:29 
GeneralRe: Problem with Process.Start("WINWORD.EXE", selectedFile); Pin
Dave Kreskowiak21-May-11 3:12
mveDave Kreskowiak21-May-11 3:12 
AnswerRe: Problem with Process.Start("WINWORD.EXE", selectedFile); Pin
Luc Pattyn20-May-11 8:18
sitebuilderLuc Pattyn20-May-11 8:18 
GeneralRe: Problem with Process.Start("WINWORD.EXE", selectedFile); Pin
Dave Kreskowiak20-May-11 7:41
mveDave Kreskowiak20-May-11 7:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.