|
|
you are a jack ass y would u put that crap on this site u sh*t head
|
|
|
|
|
ass man wrote:
you are a jack ass
Anyone else notice the irony in that statement?
|
|
|
|
|
There are no failures.. only extended learning opportunities.
|
|
|
|
|
Ok, Are you happy now?
Mazy
You're face to face,
With the man who sold the world - David Bowie
|
|
|
|
|
|
Hi
I have the following code that parses the PowerPoint presentation and saves the listed types of shapes in the IF condition as an image to the disk.
================================================================
if((objShape.Type ==MsoShapeType.msoPicture) ||
(objShape.Type == MsoShapeType.msoOLEControlObject ) ||
(objShape.Type == MsoShapeType.msoChart) ||
(objShape.Type == MsoShapeType.msoDiagram) ||
(objShape.Type == MsoShapeType.msoTable) ||
(objShape.Type == MsoShapeType.msoCanvas) ||
(objShape.Type == MsoShapeType.msoEmbeddedOLEObject) ||
(objShape.Type == MsoShapeType.msoGroup))
{
objShape.Export(FrmDemoApp.ImageFolder + "\\"+objShape.Name+"-test.emf",PowerPoint.PpShapeFormat.ppShapeFormatJPG,Convert.ToInt32(objShape.Width * 2.5),Convert.ToInt32(objShape.Height * 2.5) ,PowerPoint.PpExportMode.ppScaleToFit);
}
================================================================
The problem is while saving the OLE objects are getting saved with a black background. I just want them to be saved as they showup in PowerPoint but not with a Black Background.
Any help or documentation links that I might have missed would be of great help.
Thanks
Mohammed Ali
|
|
|
|
|
JPG files do not store transparency information, so there must be a background of some kind of you use that file type. I haven't used PowerPoint automation, but maybe there is another file type that will deal with it better, or maybe you can find a method or attribute that will let you specify the background color to use.
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.
|
|
|
|
|
I suggest PING (.png). It uses the full 32-bit range of colors, which includes the alpha channel that can provide a transparent background.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hi.
I´m trying to get the com ports info, so my user can check in which port he has his modem(s). Can someone help me with a way to get this info form the system?
thanks
|
|
|
|
|
Hello all...
I have a problem (of course) and I can't seem to find a solution (of course).
Let me describe the problem. I have a GroupBox (VisualShed) which can contain a few PictureBoxes (Carpets). If there are no Carpet's in the VisualShed and I draw a rectangle, the rectangle is visible. So far so good...
But when the VisualShed contains some Carpets and I draw the rectangle again, I only can see the rectangle in the VisualShed on the places where there is no carpet.
Is there a way to bring the drawn rectangle in front of the Carpets?
To make it more clear I have made a screenshot which you can find here:
http://users.pandora.be/bratislava_TJ/screenShot.jpg
The problem (I think) is that I have to use the Graphics object of the GroupBox, because that is where I have to draw the rectangle. I have to be able to draw the rectangle over more than 1 Carpet.
I also tried to draw a rectangle on a Carpet itself (so with the graphics object of a carpet) and even that wouldn't work?!
I have tried different things:
SetStyle(opaque, true);
BringToFront();
I hope someone can help me out here because the problem is driving me
I don't have much experience in C# but I'm learning... I realy want to get this program solved!
Thanks in advance!
GreetZz,
TweeZz.
ps: If the problem doesnt seem clear... You can always ask me for the sourcecode!
At the end everything is going to be OK!
|
|
|
|
|
The problem is that the rectangle is being drawn before the carpets. It's all a matter of order. Draw the carpets first, then draw the rectangle.
If you're looking to owner-draw, handle the Paint event of a control (not all fire it, though) or - if you're deriving from a control - override the OnPaint method. You'll get an initialized Graphics object that you can use. If you need to perform a single paint operation, you can also use Control.CreateGraphics , but this will not be redrawn if the region you painted gets invalidated (that's what the Paint event is for).
For more information on drawing in .NET, see the many examples[^] here on CodeProject.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
It sounds like you have a windowing issue. In essence you have a window (the group box), in which you can draw whatever you want. Then, you set another window on top of that one, showing the picture. So, whatever you drew in the group box window will only be visible where the picture box windows do not cover it.
So, how do you fix it? Generally, problems like this are solved with a custom control. Instead of a group box and some picture boxes, you want a control that draws the images directly to the surface of the main window (maybe the group box). That way, your rectangle can be drawn after the image was drawn, letting you see the complete rectangle.
Before you write your own control though, check to see if there already is one that can do the job you require. (There may be a control that looks and acts differently, but accomplishes the goals of your project.)
John
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.
|
|
|
|
|
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.
|
|
|
|
|
Hi John,
Yesterday I send a few mails with Stewart. In general, he told me to do the same thing. It's all a matter of drawing things in the right order. I use pictureboxes and groupboxes as my controls. Instead I have to right my own and implement paint() methods... Keep track of the different positions and the order I have to draw things... So that is what I'm going to do. I'll look up some _custom controls_ here on codeproject in the hope they will give me some help with that.
So actually the thing I did was bad programming, because I use the common controls that are provided by .NET which do far to much for the things I need. (Due to that I use to much CPU cycles and resources...) I'm glad that I know now that the thing I wanted to do is (as good as) impossible the way I used my different classes.
This is how I interprete your and Stewart's advice... Correct?
So back to work now for the next hmmm 14 hours? =) Thanks again!!
GreetZz,
TweeZz.
// modified
ps: I got an email from Bob Powell with an url... Nice description of my problem... http://www.bobpowell.net/manipulate_graphics.htm
Thank you Mr. Powell!
|
|
|
|
|
PLz tell me tha thow to get the list of all available fonts in system?
Thanx
sorry for my bad English.
|
|
|
|
|
|
Hi,
I looking for a sample where a listview is using.
In the sample I would like :
- add icon,
- add progressbar,
- add combobox,
- add highlight row,
- add sort column,
- add blinking row,
- change colour of row, column or subitem,
- using context menu for each row,
- find idex of an subitem,
- select different views : details, large,list,...
- add tooltip for each row or subitem,
-...
youssef
|
|
|
|
|
You're not looking hard enough, then. Try searching CodeProject or use google. There's plenty of examples out there, though not with everything in that list. My recommendation is to use a third-party library like those from http://www.devexpress.com/[^] or http://www.infragistics.com[^]. Adding all that is a lot more work than you probably think.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
|
Thanks,
But I see this link.
I tested and some properties doesn't exist from my request.
If you know a link where I can find more samples it is great even if I must to buy.
Best regards
youssef
|
|
|
|
|
Look, you're not going to find such a complex control for free! Either buy one, or read the Platform SDK and .NET Framework SDK about Windows Common Controls, Windows messages, Windows Forms, and either make your own or enhance the existing ListView or controls like the one I gave you a link for. It's not a simple project to throw something like this together and if you're just ripping off other people's source you'll never learn anything. There's plenty of examples out there to give you a good start. Learning what it all means and how to add to it is up to you.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
|
Hey
When i select somthing from the listView the selected item becomes gray. Is there any funktion that could change the color of the selcted item, maby transparent?
Or do i have to override selected in the listView?
//Jimmy
|
|
|
|
|
If ListView.HideSelection is set to false (default), the gray background is not drawn when an item is selected and the ListView does not have the focus.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|