473,796 Members | 2,916 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1609
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&Sor tDirection=Desc &SortColumnName =CreationDate&P age=8&Size=25
"Dino M. Buljubasic" <di************ *@rivusglobal.c om> wrote in message
news:Gdqwb.1460 67$jy.81173@clg rps13...
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.ne t> wrote in message
news:bp******** **@titan.btinte rnet.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" <jjames700ReMoV eMe at earthlink dot net> wrote in message
news:uH******** ******@tk2msftn gp13.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&Sor tDirection=Desc &SortColumnName =CreationDate&P age=8&Size=25
"Dino M. Buljubasic" <di************ *@rivusglobal.c om> wrote in message
news:Gdqwb.1460 67$jy.81173@clg rps13...
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
3668
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 then update it by clicking a submit button on the same line. I¹m doing it this way so the user can quickly update a number of records one at a time. I know I could do this by passing the userid info to a detail page but really want to do it the way...
11
7658
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
9713
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
13585
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) { dg.Select(dg.CurrentRowIndex);
1
3356
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 able to find any examples which demonstrate how to do this. My Code:
15
7232
by: Jigar Patel | last post by:
Hello, I want to create non-rectengular/region form in VB.NET. Please Help Me.............. Jigar Patel
4
1219
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 user controls and highlight them or select them (like rubber band) by mouse-down-drag-mouse-up events. I am trying to capture coordinates of mouse down event on the panel holding the user controls. However, since panel is under the controls, I...
2
1532
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 background graphic held on the form. Have produced a region which will hold the outline of an image that will be displayed as transparent, e.g. irregular. So far, this region can only be applied to forms (will produce Media Player type skins.), is...
1
5686
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 selection window, or will I have to code it myself? Thanks
1
10201
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10021
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9061
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7558
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6802
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5454
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4130
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2931
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.