Click here to Skip to main content
15,917,059 members
Home / Discussions / Graphics
   

Graphics

 
GeneralRe: Place DIV TAG in the CENTER of MONITOR Screen Pin
Pete O'Hanlon1-Feb-08 10:03
mvePete O'Hanlon1-Feb-08 10:03 
Questionhow to play .tga (targa) files Pin
Antonyemac29-Jan-08 17:52
Antonyemac29-Jan-08 17:52 
AnswerRe: how to play .tga (targa) files Pin
led mike30-Jan-08 5:41
led mike30-Jan-08 5:41 
GeneralLine drawing algorithms like the ones used in Visio Pin
Sriram Srivatsan29-Jan-08 2:59
Sriram Srivatsan29-Jan-08 2:59 
GeneralRe: Line drawing algorithms like the ones used in Visio Pin
Maximilien29-Jan-08 8:25
Maximilien29-Jan-08 8:25 
GeneralMaking sure my my custom control is always on top Pin
Sampson Orson Jackson28-Jan-08 3:09
Sampson Orson Jackson28-Jan-08 3:09 
GeneralRe: Making sure my my custom control is always on top Pin
Mark Salsbery28-Jan-08 7:12
Mark Salsbery28-Jan-08 7:12 
GeneralRe: Making sure my my custom control is always on top Pin
Sampson Orson Jackson28-Jan-08 20:33
Sampson Orson Jackson28-Jan-08 20:33 
I have not tried setting the z-order yet.

One thing i would like to stress on is that, when i place the default .net panel on the video viewer(picturebox with realtime image from the webcam) the panel remains on top. But with my custom semi-transparent panel, the video viewer over laps the custom panel.

I have a feeling that there is a/some lines of code im missing out in my custom panel.

I just found out that my semi-transparent panel can not display background images.

This is the code for the semi-transparent panel:
<code>
using System;
using System.ComponentModel;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using System.Windows.Forms;

using System.Drawing.Drawing2D;
using System.Drawing;

namespace VideoCapture_Tutorial
{
public partial class MyControl : Panel
{
private Color brushColor;

public MyControl()
{
InitializeComponent();
}

public MyControl(IContainer container)
{
container.Add(this);

InitializeComponent();
}

protected override CreateParams

CreateParams
{
get
{
CreateParams createParams =

base.CreateParams;
createParams.ExStyle |=

0x00000020; // WS_EX_TRANSPARENT
return createParams;
}
}

protected override void

OnPaintBackground(PaintEventArgs e)
{
//
}

protected override void

OnPaint(PaintEventArgs e)
{
Graphics graphics = e.Graphics;
Rectangle rect = new Rectangle(0, 0,

base.Width - 1, base.Height - 1);
Color brushColor = this.brushColor;
Pen pen = new Pen(Color.Black);
int num = (10 * 0xff) / 100;
SolidBrush brush = new

SolidBrush(Color.FromArgb(num, brushColor));
graphics.FillRectangle(brush, rect);
graphics.DrawRectangle(pen, rect);
pen.Dispose();
brush.Dispose();
graphics.Dispose();

//Invalidate();
}

public Color BrushColor
{
get
{
return this.brushColor;
}
set
{
this.brushColor = value;
base.RecreateHandle();
}
}

//protected override void

}
}
</code>


Thanks for your help. I guess you can still do more it is really urgent.

Thanks
GeneralRe: Making sure my my custom control is always on top Pin
Sampson Orson Jackson28-Jan-08 20:34
Sampson Orson Jackson28-Jan-08 20:34 
GeneralRe: Making sure my my custom control is always on top Pin
Mark Salsbery29-Jan-08 5:18
Mark Salsbery29-Jan-08 5:18 
GeneralRe: Making sure my my custom control is always on top Pin
Mark Salsbery29-Jan-08 5:22
Mark Salsbery29-Jan-08 5:22 
GeneralRe: Making sure my my custom control is always on top Pin
Sampson Orson Jackson29-Jan-08 6:21
Sampson Orson Jackson29-Jan-08 6:21 
GeneralRe: Making sure my my custom control is always on top Pin
Mark Salsbery29-Jan-08 7:46
Mark Salsbery29-Jan-08 7:46 
GeneralRe: Making sure my my custom control is always on top Pin
Sampson Orson Jackson29-Jan-08 21:26
Sampson Orson Jackson29-Jan-08 21:26 
GeneralRe: Making sure my my custom control is always on top Pin
Sampson Orson Jackson29-Jan-08 21:55
Sampson Orson Jackson29-Jan-08 21:55 
GeneralRe: Making sure my my custom control is always on top Pin
Sampson Orson Jackson29-Jan-08 22:30
Sampson Orson Jackson29-Jan-08 22:30 
GeneralRe: Making sure my my custom control is always on top Pin
Mark Salsbery30-Jan-08 5:33
Mark Salsbery30-Jan-08 5:33 
General.x models Pin
Omar Gameel Salem26-Jan-08 12:47
professionalOmar Gameel Salem26-Jan-08 12:47 
GeneralRe: .x models Pin
Pete O'Hanlon28-Jan-08 9:44
mvePete O'Hanlon28-Jan-08 9:44 
GeneralRe: .x models Pin
Jeremy Falcon6-Feb-08 10:25
professionalJeremy Falcon6-Feb-08 10:25 
GeneralRe: .x models Pin
Omar Gameel Salem7-Feb-08 7:55
professionalOmar Gameel Salem7-Feb-08 7:55 
GeneralRe: .x models Pin
Pete O'Hanlon7-Feb-08 11:59
mvePete O'Hanlon7-Feb-08 11:59 
GeneralRe: .x models Pin
Omar Gameel Salem7-Feb-08 12:07
professionalOmar Gameel Salem7-Feb-08 12:07 
QuestionPicturebox with paintable layer [modified] Pin
Tashimasu22-Jan-08 2:28
Tashimasu22-Jan-08 2:28 
QuestionHow do I save a series of C# computer generated bitmap frames as an animated file? Pin
orionworks20-Jan-08 4:08
orionworks20-Jan-08 4:08 

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.