Draw Graphics On A Transpaqrpicturebox Over A "video" Picture Box?

Apr 1, 2010

overlay a picture box of some kind on top of another picture box in which a video is playing, in such a way that the video plays underneath and is completely visible... and, by drawing on the overlaid picture box, I can add cursors, lines, graphic text, etc... JUST LIKE using a grease pencil to draw on a TV screen?

In my case, the video is 'live' incoming video from a USB capture device. The video-in-a-picturebox display code is a third-party function library, so there might ultimately be an issue of compatibility with this package... so ideally, the solution ought to be something that does not directly interact with the video picturebox (other than to lay on top of it).

View 2 Replies


ADVERTISEMENT

Graphics - Draw Above A Picture In .NET?

Apr 15, 2012

I am building a 2D game where the user is a circle(:P) and the enemies are rectangles coming at him. However, my problem is that when I placed a very nice picture of space I found on the internet, the screen draws whatever it has to underneath this image. Everything works,I can still see my lives going down when something collides into me - except the fact it is all covered up by this picture. How Do I Draw everything ON Top of this - (I tried using the 'Send To Back' Command)

EDIT: The form draws everything through a timer, and the user controls his character through keys.In the mybase.load procedure:

PicBackGround.Dock = DockStyle.Fill

PicBackGround is the picture box with the image.In the paint procedure:

e.Graphics.Clear(Color.Black)
e.Graphics.FillEllipse(Brushes.Orange, Player)

[code]....

Player is a rectangle declared right at the top, Dim Player As New Rectangle(0, 0, 50, 50); There is then the array Objects, which stores all the data about the enemies coming at the player, Current_Projectiles is simply an array to store data about rectangles(bullets) that the player fires.

View 1 Replies

VS 2008 Draw In Picture Box Without Deleting Previous Graphics?

Apr 15, 2009

crashed a while ago and i didn't bother fixing it since my new laptop was due to come shortly after, because of this i am a bit out of practise with Visual Basic .NET. My problem is that my application allows a user to draw a rectangle with their mouse on a picturebox called picimage. When the user is done drawing their rectangle and tries to draw another one the previous rectangle gets deleted. I was playing around a bit with the

vb.net
Public Class Form1
Dim DrawRectangle As Boolean = False

[code].....

View 9 Replies

Interface And Graphics :: Draw On Tabpage's Graphics?

Jan 19, 2011

So I decided to make my famous tile selector project, but instead of drawing in a form's graphics, do it inside a tabpage.Well, I managed to get it working, but it seems to... flicker.Normally, setting the form's DoubleBuffered property to True would help a lot there, but apparently, the tabpage has no such property.

When I invalidate the tabpage, I draw two images and fill one rectangle.Following past advice, those two images were created before, just once, and are stored in a variable so I don't create them every time I invalidate the tabpage.

View 1 Replies

Draw Graph Over Video .net 2008?

Mar 18, 2011

I have series of video files that i need to automatically draw some line over through to the en. The line varies, the values will be provided, is this possible in vb.net?

View 1 Replies

Draw Graph Over Video In 2008

Aug 25, 2009

I am having problems passing data from one form to another form opened from the first form.Here is my scenario: I have my start-up form. From this form I open a form by using the following:

[code]...

I use this because I want to be able to open multiple forms from the start-up form.Then from the PartyDetail form I open another form to display order details, like this:

[code]...

I want this order details form to be able to get a partyid variable from the party detail form.This works, but depending on the order that I open the forms the variables are incorrect Example:If I open the first PartyDetail form and then open the OrderDetail form, it works correctly. I can open as many PartyDetail and OrderDetail forms that I want and the variables are correct.But, say I open a PartyDetail form and then open another PartyDetail form and then open the OrderDetail form from the first opened PartyDetail form, it displays data based on the second opened PartyDetail form instead of the first. Basically, I want to be able to open multiple PartyDetail forms and then open OrderDetail forms based on whichever PartyDetail form it is opened from.Right now I am using Public Shared variables on the PartyDetail form and accessing this variable from the OrderDetail form. I suspect this is my main problem but don't know the best way to pass the variables from the PartyDetail form to the OrderDetail form.What would be the best way to do this?

View 2 Replies

Draw Graphics More Than Once?

Aug 21, 2010

Running VB/Studio? 2010 on XP. I draw on full screen resolution of 1920 wide x 1080 hi.I have set FormBorderStyle to NONE & WindowState to Maximize which seems to be the only way to get rid of the task bar.but w or wout this setting, My graphics draws a full screen twice - mostly repeatably.When I have [code] parameters set to use 9/16th of screen horizontally, the pattern is drawn once the first time I run it and usually once if I hit F5 quickly enough after hitting Alt-F4. But if I wait long enough [a second or 2] after 'Ready' appears at teh lower left of the IDE screen, then it draws the pattern 3 times.for wider patterns, 10/16th, 11/16 up to 16/16, which is 1920 pixels wide, it usually draws the pattern once after I make this parameter change and twice from there on. The 'twice' is repeatable; it 'doing it once' the first time is not a sure thing.

There are more peculiaraities than this, but if we can find causes for what I"ve given you, it might get them all wout making it seem more complicated than it is.I don't think it's in my code; it works - it draws the right thing the right number of times w no compiler errors. But here is the guts of it:

Public Class Form1
Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
e.Graphics.SmoothingMode = Drawing2D.SmoothingMode.HighQuality

[code]....

View 5 Replies

Draw An Image With The Graphics?

Nov 1, 2009

I have a very annoying problem, I am trying to draw an image with the Graphics class but when I do DrawImage, it automatically scales it up! heres some example code

graphics.DrawImage(My.Resources.TestImage, 20, 20)
PictureBox1.Image = My.Resources.TestImage

The picture box image is the correct size whereas the graphics drawn verison is too big!

View 3 Replies

Draw And Save Graphics?

Nov 29, 2011

I need to make a small application in asp.net where user could draw a small drawing and that drawing is saved in the database for later review.

View 2 Replies

Draw Graphics On A Picturebox?

Mar 31, 2010

I have a picturebox on my form and I have added a references picture file into my project.

I need to code the Onpaint event handler for the picturebox so that it causes the picture (that i have added) to be drawn but using the picturebox Graphics object.[code]...

View 12 Replies

How To Draw 3lobes In Graphics

Oct 8, 2010

I have written the below code in my project.Well i am pasting only the piece of code where i am facing the problem.I have written this code with my lot of struggle, but still not getting the accurate image.[code]

View 14 Replies

How To Draw Graphics In A Load Sub

Dec 5, 2011

The problem I am having is that when I make a Paint sub (I have another form adjacent to the one that I am struggling with), when I move one form over the form that has the graphics, it repaints it. This gives me a different result each time, since when it is on hard the grid changes. I would like to know how to paint in the load sub, so this will not happen anymore.

[Code]...

View 2 Replies

Graphics Very Slow With New Video Card?

Jan 7, 2010

I use GDI+ graphics in vb.net (express 2008). A simple ball animation was fast using an old computer and video card, but very slow after upgrading to a new computer with a hi-end GeFoce GFX 260 video card.Windows 7, 64 bit.I have tried adjusting all the video card settings I can find, but still slow.

View 3 Replies

Interface And Graphics :: .NET And Video (re-)encoding?

Apr 11, 2009

I'm considering working on a video encoding framework. Essentially a program to re-encode a video file from one format to another, using codecs which are widely distributed. (Codecs commonly found on the average PC.)Emphasis would be on reformatting - rescaling, cropping - in a visual environment. Is vb.NET a good environment for such an application or would it be wiser to look elsewhere?

View 4 Replies

Interface And Graphics :: Play Video In VB

Jan 18, 2010

Anybody have some resources on how to play video in Visual Basic. net

View 1 Replies

Draw Simple Graphics In Program?

Oct 11, 2009

I'm a unviversity student and for an assignment we have to make a simple project where the user specifies a shape and a color, and then the shape is drawn in some kind of space. So like they choose circle, green, and in this blank space on the form a green circle appears, pretty simple. Anyways we have some kind of msdn alliance thing where we can download Visual Studio for academic purposes, so I downloaded Visual Studio 2008. I spent about an hour going through the tool box trying to figure out what could possibly allow me to draw stuff in it, and I'm really not sure what it could be. On some online tutorials it said something about a function on picture boxes like picturebox.Circle(100,100), 100, vbgreen or something similar, and when I tried making a picturebox and writing this code nothing worked. My friend told me to use a 'canvas' but neither of use know how to actually find such a control (its not in the toolbox).[urls]....

View 14 Replies

Interface And Graphics :: Calling A Draw Sub?

Oct 27, 2011

I've been having some trouble with a draw subroutine in a project I'm working on. The last time I did anything like this in VB, drawing on a form was as simple as calling the Line() function, so I'm not clear on a lot of these things. Here's my code:

Code:
Private Sub drawBox(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles btnDraw.Click
Dim blueBrush As New SolidBrush(Color.Blue)
Dim i, j As Integer

[code]....

The code is just meant to draw a grid of small squares across the form, using the centers() array, which is set up elsewhere. My problem is that I can't figure out how to call this sub. If I use Handles Button.Click or Mouse.Move or something like that, VB returns an error saying that Draw and Mouse functions are incompatible. I can't call it normally, because I don't have values for sender and e.

View 2 Replies

Use E.Graphics To Draw On The Second Instance Of A Form?

Aug 16, 2010

I have a form called frmMain and I created a second instance of the form to display on a second monitor using the code:

Public
frmMain2 as new frmMain

I am trying to prevent flickering when I switch between forms by overriding the OnPaintBackground event and drawing a background image in OnPaint. The OnPaint code works great for frmMain, but any time I use an e.Graphics... command it only applies to frmMain and not frmMain2. I'm thinking I either need to have a separate override for the OnPaint event for frmMain 2 or use e.Graphics.to draw on the second monitor, but I don't know how to do either. I have drawn on the second monitor outside of OnPaint by using:

Dim g as Graphics = CreateGraphics()
Dim g2 as Graphics = frmMain2.CreateGraphics

Then I use g.DrawImage for frmMain and g2.DrawImage for frmMain2. This does not work inside of OnPaint. I tried it and everything gets drawn on the first monitor.

View 10 Replies

Interface And Graphics :: Playing A Video On The Form?

Mar 4, 2009

Ok, i know the simple media controls to play a video file on the control screen, but is there a way to play the video on the form background?

View 2 Replies

VS 2008 Z Axis For Graphics (video Game)?

May 5, 2009

how do i work with the Z axis?If i were to make a video game and i wanted it to be 3D in graphics how is that done?

View 7 Replies

Capture Picture Or Video From Usb Cam?

Jun 3, 2008

capture picture or video from usb cam?

View 8 Replies

Viewing A Video In A Picture Box?

Nov 4, 2009

Is it possible to view video in a Picturebox? if you do know then reply..G peter.

View 3 Replies

Draw Graphics Options In Console Apps

Jan 31, 2010

Is is possible to draw graphics in a console application or is console limited to only text? If possible, where is a guide to the form of the graphics structures.

View 3 Replies

Draw Over Existing Graphics Drawn On The Control?

Jun 15, 2012

how do I draw over existing graphics drawn on the control. This is what I'm using to draw the objects:

'Private paintRect As Rectangle
Private Sub Panel2_MouseDown(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles Panel2.MouseDown
paintRect.Location = e.Location
End Sub

[code]....

View 1 Replies

Interface And Graphics :: Draw 3D Spinning Sphere?

Mar 14, 2011

I am really exhausted because I have been trying to find a way to draw 3D sphere which is spinning and have done nothing yet.. I am using visual basic studio. Part of my project is to draw solar system which includes a star and planets rounding about it and their stem. I want to create a class that create a planet with draw function and delete function to create movement.

I have really try to find something in the network but do nothing at all. First, I have read about XNA, but the tutorials seems to be quite complicated - after all, XNA is used for creating games, I need something more simple. I decided to use the directx libraries, read a lot about them but succeed only in draw rectangle (2D).

View 2 Replies

Interface And Graphics :: Draw A Circle On The Console?

Feb 28, 2012

I am trying to draw a circle on the visual basic console. I have been told that the console is not made for this but i have to use it.

What I want to do is a circle with:

Centre (40,20)
Radius = 10

I know from basic trig that the following will give me the points on the circle:

x= (10 x CosA)+40
y=(10 x SinA) +20
(A) being an angle in radians.

Then combine x & y that will give me a point on the circle.

I want to use the '' Sets the cursor position

Console.SetCursorPosition(x, y)
Console.Write(".") "

To print a point(.) on the given position from the formulas above.

Now heres my question how do I get Visual Basic too calculate:

x= (10 x CosA)+40
y=(10 x SinA) +20

360 times i.e 0rad-2Pirad and then pass the x & y [(x,y)] point to my cursor position code so that a '.' is printed at that position. I.e I will end up with a circle made out of 360 '.'

I would asume that a loop is used and also an array to store the 360 Pi values. I'm finding it extremely hard to even get Vb to calculate the Cos of an angle.

View 6 Replies

Interface And Graphics :: Draw A Dot (with XY Position) In The Radar?

Jun 16, 2010

how to draw a dot (with XY position) in the radar.

Code:
' Draw the radar plot.
Private Sub picCanvas_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles picCanvas.Paint
' Generate coordinates for the points.

[code].....

View 2 Replies

Interface And Graphics :: Draw A Shape From A Button?

Jul 25, 2009

Ok..I think it's very simple but I'm still a begineerI'll try to make it clear I need to draw a rectangle when I click on the button..what is the required code?

Quote:
Public Class Form1
Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)

[code].....

View 1 Replies

Interface And Graphics :: Draw Image From Database?

May 13, 2009

I am trying to draw an image from a MS Access database by use of e.Graphics.DrawImage(New Bitmap()). In my database Row 0 Item 1 holds the path to the image I want to draw.

My current code looks like this:

Code:
Private Sub pnlStart2_Paint(ByVal sender As Object, ByVal e As_ System.Windows.Forms.PaintEventArgs) Handles pnlStart2.Paint
e.Graphics.DrawImage(New Bitmap(ds.Tables("Track1").Rows(0).Item(1)), 3, 3)
End Sub

When I run my program I get the following message in my code: Illegal characters in path how I can draw the image from the database?

View 6 Replies

Recognize A Video File From A Picture?

Feb 19, 2009

which is the best way to recognize programmatically if a file is a video or a picture a part from the fil exstension?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved