Click here to Skip to main content
15,892,059 members
Home / Discussions / C#
   

C#

 
GeneralSaving the Images/Pictures/OLE objects from PowerPoint Pin
AliIMCIn19-Feb-04 7:02
AliIMCIn19-Feb-04 7:02 
GeneralRe: Saving the Images/Pictures/OLE objects from PowerPoint Pin
John Fisher19-Feb-04 7:13
John Fisher19-Feb-04 7:13 
GeneralRe: Saving the Images/Pictures/OLE objects from PowerPoint Pin
Heath Stewart19-Feb-04 8:46
protectorHeath Stewart19-Feb-04 8:46 
Generalcom port info Pin
elraton19-Feb-04 6:24
elraton19-Feb-04 6:24 
Generalbring DrawRectangle(...) to front Pin
TweeZz19-Feb-04 3:55
TweeZz19-Feb-04 3:55 
GeneralRe: bring DrawRectangle(...) to front Pin
Heath Stewart19-Feb-04 5:02
protectorHeath Stewart19-Feb-04 5:02 
GeneralRe: bring DrawRectangle(...) to front Pin
John Fisher19-Feb-04 5:05
John Fisher19-Feb-04 5:05 
GeneralRe: bring DrawRectangle(...) to front Pin
John Fisher19-Feb-04 13:26
John Fisher19-Feb-04 13:26 
Posted in the forums for the benefit of others who may have similar questions.

Hello,
I took a look at the running program, and the code you sent to me (with Anakrino). Now that I see what is really going on, I can present the options you have.

Problem: You have conflicting goals here. First, you want to be able to draw a rectangle on the surface of the parent window which will appear above the carpet images in this window. Second, you have separate windows (controls) appearing on a layer above the parent window, making it impossible to draw above the carpets from the parent layer.

Solution: Change your existing specialized control in the following ways:

   1) Do not use separate window controls to display the carpets. Instead, use a new carpet class that contains the needed position and image information, but does no other real work.

   2) Handle the Paint behavior of your control, drawing the images in the correct locations and scale. This is the major difference. Since you are drawing the carpets directly to the control's surface, you have complete control of whatever may appear above them.

   3) Now come the annoying little bits. You'll need to handle the mousedown, mouseup, and mousemove behavior is a little more elaborate fashion than you are currently. When not in zoom mode, check to see whether the user clicked in a carpet, and then wait to see if they move the mouse before the next mouse-up. If they do, then start a drag operation -- dragging whatever object you like.

   4) Have a good look at the several specialized C# controls here on CodeProject. Some of the grid or list controls do several of these things, and can teach you how to handle these tasks well.



John

"You said a whole sentence with no words in it, and I understood you!" -- my wife as she cries about slowly becoming a geek.

GeneralRe: bring DrawRectangle(...) to front Pin
TweeZz19-Feb-04 22:03
TweeZz19-Feb-04 22:03 
GeneralGeting system fonts Pin
Itanium19-Feb-04 0:59
Itanium19-Feb-04 0:59 
GeneralRe: Geting system fonts Pin
Nick Parker19-Feb-04 3:12
protectorNick Parker19-Feb-04 3:12 
GeneralLISTVIEW C# Pin
youssef19-Feb-04 0:54
youssef19-Feb-04 0:54 
GeneralRe: LISTVIEW C# Pin
Heath Stewart19-Feb-04 4:52
protectorHeath Stewart19-Feb-04 4:52 
GeneralRe: LISTVIEW C# Pin
Heath Stewart19-Feb-04 10:50
protectorHeath Stewart19-Feb-04 10:50 
GeneralRe: LISTVIEW C# Pin
youssef19-Feb-04 22:14
youssef19-Feb-04 22:14 
GeneralRe: LISTVIEW C# Pin
Heath Stewart20-Feb-04 3:00
protectorHeath Stewart20-Feb-04 3:00 
GeneralRe: LISTVIEW C# Pin
youssef20-Feb-04 6:47
youssef20-Feb-04 6:47 
GenerallistView selection Pin
Snowjim18-Feb-04 22:49
Snowjim18-Feb-04 22:49 
GeneralRe: listView selection Pin
Heath Stewart19-Feb-04 4:50
protectorHeath Stewart19-Feb-04 4:50 
GeneralRe: listView selection Pin
Snowjim19-Feb-04 11:46
Snowjim19-Feb-04 11:46 
GeneralRe: listView selection Pin
Heath Stewart19-Feb-04 11:57
protectorHeath Stewart19-Feb-04 11:57 
Generaljava with c# Pin
bel g18-Feb-04 20:56
sussbel g18-Feb-04 20:56 
GeneralRe: java with c# Pin
Heath Stewart19-Feb-04 4:48
protectorHeath Stewart19-Feb-04 4:48 
Questionneed sql query? Pin
murali_utr18-Feb-04 18:46
murali_utr18-Feb-04 18:46 
AnswerRe: need sql query? Pin
John Kuhn18-Feb-04 19:26
John Kuhn18-Feb-04 19:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.