OpenNETCF DrawString not working for me

  • Thread starter Thread starter Hilton
  • Start date Start date
H

Hilton

Hi,

Why does this not show anything? [The rectangle *is* being drawn.]

Oh, also why does DrawRoundedRectangle fill the area? This seems
inconsistent with other Draw methods.

protected override void OnPaint (PaintEventArgs pea)
{
base.OnPaint (pea);

GraphicsEx gex = GraphicsEx.FromControl (this);

gex.DrawRectangle (new PenEx (Color.Blue), 10, 10, 200, 30);
// This *is* being drawn

FontEx fontEx = new FontEx ("Arial", 10.0f, FontStyle.Regular);

for (int i = 1; i < 5; i++)
{
Rectangle rect = new Rectangle (0, 0, i * 50, i * 50);

gex.DrawString ("test", fontEx, Color.Black, rect);

this.Text = i.ToString(); // To verify that exception are
not being thrown; "4" ends up being shown in the title bar
}

fontEx.Dispose ();

gex.Dispose ();
}

Thanks,

Hilton
 
Chris,

I filed a bug on each. They were both closed and marked invalid -
unsupported version.

Frustrating, but thanks for the suggestion.

Hilton
 
That's because v1.4 is out of its support cycle.

I'll check to see if your reports are still valid for v2.0, if so I'll
re-open them against v2.0. However, we're code complete on v2.1, so the
fixes (if any) will be rolled into v2.2. We're not disclosing any expected
release date for v2.2 at this time.

--
Neil Cowburn
Principal Partner
OpenNETCF Consulting, LLC.

Managed Code in the Embedded World

http://www.opennetcf.com/
http://www.smartdeviceframework.com/
 
Neil,

OK, just that I need/want to target CF 1 for obvious reasons.

BTW: I did a bunch of testing, debugging etc and it turns out that if I set
the Angle, things seems to work for DrawString. However if I don't, then it
displays nothing. I have tried a few things and while I can get it to work,
there is something wrong with Angle=0 which is clearly the most used case.
If I find more, I'll post it here and/or add it to the filed bug.

My 5c: Since WM 5.0 Pocket PCs and Smartphones ship with CF 1 and WM6 isn't
out yet, I would like to see OopenNETCF for CF 1 (i.e. Version 1.4) still
being supported. Obviously it is not a commercial product and resources are
limited, but it makes sense that 1.4 is by far the most used version.
Having said that, you guys have already been a tremendous help and resource
for the CF community.

Thanks,

Hilton
 
Please don't amend the bug report. Leave it with us and we will respond
appropriately.

I appreciate your comments on renewing support for 1.4, but that is not an
appropriate course of action for us. The decision to drop support for Smart
Device Framework 1.x was a tough one, but we felt it was right to adopt CF
2.0 and VS 2005 as our development platform and we still stand by that
today. Some of the features in C# 2.0 and in .NET Compact Framework 2.0 were
a reason compelling to make the move Also, we applaud the .NET Compact
Framework team for the performance improvements they implemented in CF 2.0.
Microsoft .NET Compact Framework 2.0 is an outstanding piece of technology
and I would advise anyone not currently targeting it to consider porting
their CF 1.0 applications over.

--
Neil Cowburn
Principal Partner
OpenNETCF Consulting, LLC.

Managed Code in the Embedded World

http://www.opennetcf.com/
http://www.smartdeviceframework.com/
 
Back
Top