.NET graphics noob
.NET graphics noob
.NET graphics noob
.NET graphics noob
.NET graphics noob
.NET graphics noob .NET graphics noob .NET graphics noob .NET graphics noob .NET graphics noob .NET graphics noob .NET graphics noob .NET graphics noob
.NET graphics noob .NET graphics noob
.NET graphics noob
Go Back  Xtreme Visual Basic Talk > > > .NET graphics noob


Reply
 
Thread Tools Display Modes
  #1  
Old 10-17-2005, 01:53 PM
quarque's Avatar
quarque quarque is offline
Junior Contributor
 
Join Date: Sep 2004
Location: Seattle
Posts: 211
Default .NET graphics noob


I have just started using .NET and I'm trying to port some old VB6 code. One of the functions in the old code was to create a rectangle that would lay on top of some Labels and act like a cursor. In VB6 I used the rectangular Shape control and moved it around as needed. This is to simulate a handheld device's screen (4 x 20 character display with a block cursor).

What is the best way to so this in .NET? I'm using the Compact Framework on a CE Device.

I have played around with the DrawRectangle method and I'm not getting anything to show on the form (perhaps it is hidden behind all the buttons and labels which totally fill the screen). Once you draw a rectangle how do you move it? Is there a 'refresh' required of the display each time?

TIA

Update: I hid some items on the form and the rectangle IS there. How do I get it to stay on top of all other objects on the form?
__________________
what was I thinking?!?!

Last edited by quarque; 10-17-2005 at 02:09 PM.
Reply With Quote
  #2  
Old 10-20-2005, 08:16 PM
Max-Eclipse Max-Eclipse is offline
Newcomer
 
Join Date: Oct 2005
Location: Afton, OK, USA
Posts: 8
Default

afaik you have to draw to the object you want it to show over... You are probably getting your graphics object using 'myGraphics = Me.CreateGraphics' which means you will be drawing directly to that form, which all the other stuff is on top of.

When the cursor needs moved, you set the variables for where it is suppose to be, then you call me.invalidate...

Of course, this is only if it is like the regular framework. I have never messed with the compact framework.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
.NET graphics noob
.NET graphics noob
.NET graphics noob .NET graphics noob
.NET graphics noob
.NET graphics noob
.NET graphics noob .NET graphics noob .NET graphics noob .NET graphics noob .NET graphics noob .NET graphics noob .NET graphics noob
.NET graphics noob
.NET graphics noob
 
.NET graphics noob
.NET graphics noob
 
-->