473,385 Members | 1,676 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Selection rectangle drawing over eveything in its container

Hi,

I would like to know How I could draw a Dashed rectangle over everything in
a container. I will use this to draw a selection rectangle (like in VB.NET
Form Designer UI). And even it draws in invert colors I think, but this is
not necessary for now.

Can I do this with a usercontrol ? Because I know that transparency is a
little tricky in VB.NET, for usercontrols.

--
Philippe Meunier
Programmer
CHCA Computer Systems Inc.
Jul 19 '05 #1
1 4005
Hi,

As far as I remember the Graphics class can be created for a control.
Therefore, you should capture the mouse, create the Graphics instance, react
to mouse events and re-draw the selection rectangle accordingly, and then
release the mouse and dispose the Graphics.

Just a suggestion though.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Philippe Meunier" <pm******@chca.ca> wrote in message
news:uS*************@TK2MSFTNGP11.phx.gbl...
Hi,

I would like to know How I could draw a Dashed rectangle over everything in a container. I will use this to draw a selection rectangle (like in VB.NET
Form Designer UI). And even it draws in invert colors I think, but this is
not necessary for now.

Can I do this with a usercontrol ? Because I know that transparency is a
little tricky in VB.NET, for usercontrols.

--
Philippe Meunier
Programmer
CHCA Computer Systems Inc.


Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: TT (Tom Tempelaere) | last post by:
Hi there, In my application I have a panel that contains a matrix of user controls. The user control is fairly simple. It merely draws a circle that represents an object in my code. The object...
3
by: | last post by:
I am having a hard time understanding the logic behind the Rectangle object. My problem has to do with the way the rectangle treats the "Width" property. For example, take the following rectangle...
4
by: Colin McGuire | last post by:
Hi, this is a really simple question I have been banging my head on a brick wall over. The program below changes the background colour of a form depending on whether the cursor is inside a...
1
by: Philippe Meunier | last post by:
Hi, I would like to know How I could draw a Dashed rectangle over everything in a container. I will use this to draw a selection rectangle (like in VB.NET Form Designer UI). And even it draws in...
3
by: kamleshgk | last post by:
Hi, I have a requirement to draw a rectangle and a line on a the container control and sometimes as i move the mouse the drawing must occur on top of user controls and other controls, which are...
1
by: Jeff Waskiewicz | last post by:
Hello All, I'm trying to solve a nagging problem. The goal is to draw a rectangle over the top of all the other controls on a form. Specifically, over a ChartFX control. The user would draw...
5
by: moondaddy | last post by:
I want to create a custom UI element which will be a custom rectangle object in a c# XAML application. I'm new to XAML and c# as most of my experience has been using vb with sql. I'm building a...
4
by: RobinS | last post by:
I am drawing a rectangle on a picture that has already been drawn on the graphics area (a user control). It works something like this: //in the MouseDown event m_isDragging = true; m_oldX =...
1
by: kummu4help | last post by:
hi, i want to draw rectangle based on mousedrag event. if user dragging the mouse, then the rectangle on the applet should increase or decrease basing on current mouse coordinates. i have the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.