473,385 Members | 1,983 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.

Selecting a region on a form

I have a form that contains 24 user controls representing hours (something
like MS Outlook daily calendar). I would like to be able to
mouse-down-drag-mouse-up select a region of the form so that selected hours
(say from 8:00am till 1:00pm) appear highlighted or shaded (like in MS
Outlook expres).

Any help will be appreciated

--
-------------------------------------------------------------------------
FIGHT BACK AGAINST SPAM!
Download Spam Inspector, the Award Winning Anti-Spam Filter
http://mail.giantcompany.com


Nov 20 '05 #1
4 1590
OK, letrs break this problem down.

You need several things.

1.) The co-ordinates of each control.

2.) A being Dragged Property

3.) A Mouse Down event on the form

4.) A Mouse Up Event on the form

5.) To Draw / Erase and redraw a square with a dotted line using the start
and new x/y co-ordinates

6.) A method to check the TopLeft/Bottom right co-ordinates pairs come
inside the selection area of the forms graphics region

Thats it. !

I could do this for you, but I wont, I think there is sufficient information
here for you to go away and try this and then come back with more finite
questions.

"Endurance is good for the spirit !"

OHM



Dino M. Buljubasic wrote:
I have a form that contains 24 user controls representing hours
(something like MS Outlook daily calendar). I would like to be able
to mouse-down-drag-mouse-up select a region of the form so that
selected hours (say from 8:00am till 1:00pm) appear highlighted or
shaded (like in MS Outlook expres).

Any help will be appreciated

Nov 20 '05 #2
Here is a link to a simple demo of Drawing a Selection (Rubberband) box on a
Picturebox. This program also crops images.
But, the code within should give you the general idea on how to draw the
selection area on a form too, as a form also has a MouseDown, MouseMove, and
MouseUp events. Then you can figure out how to
get the area that is captured and highlight the objects you are wanting to
capture.
Scroll down the page to: Rubberband Selection Box for Cropping Images" Code
and all is in the zip file you download.

james
aka: Trucker

(watch for word wrap)
http://www.gotdotnet.com/community/u...nguageDropDown
List=VB.NET&SortDirection=Desc&SortColumnName=Crea tionDate&Page=8&Size=25
"Dino M. Buljubasic" <di*************@rivusglobal.com> wrote in message
news:Gdqwb.146067$jy.81173@clgrps13...
I have a form that contains 24 user controls representing hours (something
like MS Outlook daily calendar). I would like to be able to
mouse-down-drag-mouse-up select a region of the form so that selected hours (say from 8:00am till 1:00pm) appear highlighted or shaded (like in MS
Outlook expres).

Any help will be appreciated

--
-------------------------------------------------------------------------
FIGHT BACK AGAINST SPAM!
Download Spam Inspector, the Award Winning Anti-Spam Filter
http://mail.giantcompany.com

Nov 20 '05 #3
The posted message asks for 'any' help, not for finished project, therefore
no need for you to work on it. The lead is welcome enough. :)

I appreciate your help,
Dino

--
-------------------------------------------------------------------------
FIGHT BACK AGAINST SPAM!
Download Spam Inspector, the Award Winning Anti-Spam Filter
http://mail.giantcompany.com
"One Handed Man" <Bo****@Duck.net> wrote in message
news:bp**********@titan.btinternet.com...
OK, letrs break this problem down.

You need several things.

1.) The co-ordinates of each control.

2.) A being Dragged Property

3.) A Mouse Down event on the form

4.) A Mouse Up Event on the form

5.) To Draw / Erase and redraw a square with a dotted line using the start
and new x/y co-ordinates

6.) A method to check the TopLeft/Bottom right co-ordinates pairs come
inside the selection area of the forms graphics region

Thats it. !

I could do this for you, but I wont, I think there is sufficient information here for you to go away and try this and then come back with more finite
questions.

"Endurance is good for the spirit !"

OHM



Dino M. Buljubasic wrote:
I have a form that contains 24 user controls representing hours
(something like MS Outlook daily calendar). I would like to be able
to mouse-down-drag-mouse-up select a region of the form so that
selected hours (say from 8:00am till 1:00pm) appear highlighted or
shaded (like in MS Outlook expres).

Any help will be appreciated


Nov 20 '05 #4
thanks James,

Dino

--
-------------------------------------------------------------------------
FIGHT BACK AGAINST SPAM!
Download Spam Inspector, the Award Winning Anti-Spam Filter
http://mail.giantcompany.com
"james" <jjames700ReMoVeMe at earthlink dot net> wrote in message
news:uH**************@tk2msftngp13.phx.gbl...
Here is a link to a simple demo of Drawing a Selection (Rubberband) box on a Picturebox. This program also crops images.
But, the code within should give you the general idea on how to draw the
selection area on a form too, as a form also has a MouseDown, MouseMove, and MouseUp events. Then you can figure out how to
get the area that is captured and highlight the objects you are wanting to
capture.
Scroll down the page to: Rubberband Selection Box for Cropping Images" Code and all is in the zip file you download.

james
aka: Trucker

(watch for word wrap)
http://www.gotdotnet.com/community/u...nguageDropDown List=VB.NET&SortDirection=Desc&SortColumnName=Crea tionDate&Page=8&Size=25
"Dino M. Buljubasic" <di*************@rivusglobal.com> wrote in message
news:Gdqwb.146067$jy.81173@clgrps13...
I have a form that contains 24 user controls representing hours (something like MS Outlook daily calendar). I would like to be able to
mouse-down-drag-mouse-up select a region of the form so that selected

hours
(say from 8:00am till 1:00pm) appear highlighted or shaded (like in MS
Outlook expres).

Any help will be appreciated

--


-------------------------------------------------------------------------
FIGHT BACK AGAINST SPAM!
Download Spam Inspector, the Award Winning Anti-Spam Filter
http://mail.giantcompany.com


Nov 20 '05 #5

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

Similar topics

4
by: webhigh | last post by:
Iım not sure if this a PHP question or an MySQL question but here it goes. I have a repeat region of a table called userid What Iım trying to accomplish is being able to edit the record and...
11
by: Altramagnus | last post by:
I have a complicated Region object, which I need to draw the outline, but not fill How can I convert the Region object to GraphicsPath object? or How can I draw the outline of the Region object?
4
by: Paddy | last post by:
How do I select a subitem from a listview after clicking on the first column? Couldn't find it in MSDN. Thank you. Paddy.
6
by: aaa | last post by:
Hi I am trying to create a read-only DataGrid that would always have current row selected. Currently, I am using method: public void SelectDataGridRow(DataGrid dg) { if (dg.CurrentRowIndex >...
1
by: Bob Loveshade | last post by:
I am looking for an example that shows how to select and highlight multiple rows in a DataGrid. My DataGrid is part of a Web User Control which is contained in an ASPX page. I haven't been...
15
by: Jigar Patel | last post by:
Hello, I want to create non-rectengular/region form in VB.NET. Please Help Me.............. Jigar Patel
4
by: Dino M. Buljubasic | last post by:
I have a form and a panel on the form that holds 24 user controls each one representing an hour (0 - 23). The panel is completelly covered with the user controls. I need to be able to select...
2
by: M West | last post by:
hello, currently trying to write a custom control that will display an image in true transparent form, e.g. can actually see the background images placed behind the control rather than the...
1
by: Andrew Bullock | last post by:
Hi, I want to crop a picture in a picturebox by allowing the user to select a rectangular region like you get in software like Photoshop. Is there any prefabricated solution to creating such a...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.