Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Screen bounds seem wrong

2 views
Skip to first unread message

DavidGB

unread,
Aug 1, 2009, 9:17:01 AM8/1/09
to
Part of an application I'm deveoping suddenly stopped working.
This portion decides is a screen reference passed to it is valid.
On debugging, I find the screen bounds (Windows.forms Screen object) are
500x400.
I have dual side by side displays both set at 1280 x 1024, but they both
show as 500x400
I'm pretty sure this just started (last month or so - I've been away for a
while)
Code:
Dim theScreen As Screen = Screen.FromPoint(Pos)
If TestForHit(Pos, theScreen.Bounds) Then
..... (testForHit always fails)
.....<snip>

Public Shared Function TestForHit(ByVal pt As System.Drawing.Point,
ByVal rect As Rectangle) As Boolean
Dim gp As New Drawing2D.GraphicsPath()
Dim myMatrix As New Drawing2D.Matrix()

gp.AddRectangle(rect)
gp.Transform(myMatrix)
Return gp.IsVisible(pt)
End Function

Checking the locals window, thescreen.AllSreens shows two screens, both with
bounds of 500x400 (one offset by 500 i.e.- X=500)

Any ideas anyone?

Nobody

unread,
Aug 3, 2009, 2:40:36 AM8/3/09
to
"DavidGB" <Dav...@discussions.microsoft.com> wrote in message
news:131563C3-0F82-4F8E...@microsoft.com...
> System.Drawing.Point,

This is a VB6 and earlier group(VB Classic). VB.Net and all dotnet groups
have either "dotnet" or "vsnet" in the group name. Please use the following
group instead:

news://msnews.microsoft.com/microsoft.public.dotnet.languages.vb


0 new messages