DirectX 2D Drawing With Program?

Sep 28, 2011

I'm using using System.Graphics for my latest project (A simple 2D application). Problem is, it gets a horrible FPS and I'm only drawing 8x8 tiles (usually 10-12 is enough to bring it down to 12FPS).

A friend of mine suggested that I use DirectX. He also suggested XNA but I opposed because I don't want my clients to have to install the XNA distributional. DirectX is common enough (to my knowledge) and I can just include the dll's if I need to.

So, my search began. I've been looking only for DirectX 2D tutorials for VB.net. I've had no solid success thus far. In truth, all I need to do is be able to draw bitmap x at position pos.

I've been using System.Graphics and a hacked up bitmap as my buffer thus far so I'll go for any improvement that I can get.

I'm using VB.net so I'll be ok if you give my one for C#, I'm pretty good at being able to read it (and I have a nice converter too). I would just prefer VB.net to save time.

View 1 Replies


ADVERTISEMENT

VS 2010 Drawing A Line Over DirectX Fullscreen?

Jan 25, 2012

Basically I want to Position a line from The middle of my screen to the bottom right of my screen. But I need to draw over the game to do this. I dont mind if it flickers as long as its there is all i want. Like this VV

View 4 Replies

Use DirectX Audio Functions In Program For WinXP / Vista?

Apr 9, 2012

I've been fighting for weeks now to make a simple music playback program. It would function much like Windows Media Player without the visualisations and playlists. I'm writing this on a Win7 box, but it needs to work on XP and newer.

I say fighting because I'm severely annoyed at how MS has worked some items and it's taken many days to go through everything only to find that it doesn't work.

I started by using WMP in VB Express 2010 and having it play my music. Simple, but not portable. I copied my .exe to a WinXP machine and it blew up. I copied it to a different Win7 machine and it doesn't run (I can double-slick all day, nothing happens,
no log entries, nothing....)

Then I find that there is an issue with the GUID of media player on different computers, and it'll most likely fail to run when you try to use it on other machines than the one the program was built on.

So I gave up on that.

I then figured I'd use DirectX. It's on XP and newer already, and is supposed to be backwards compatibile so if I build my app on Win7 it should still run on XP and such. I did that, and it works fine on the machine I built it with (again). My shuffle works,loop/repeat works, got my own version of a playlist and it all works. I copy that to another Win7 box and it doesn't run at all. It's setup as .NET 3 so I can be sure of compatibilty with WinXP.

For grins, I gutted all the code in my VB app involving calls to Directx and built that. It runs fine on other computers, including my XP test box. So I know the problem revolves around DirectX somehow.[code]...

View 10 Replies

Advanced .Net Drawing Program?

Oct 19, 2011

Im looking to make an advanced drawing program in vb.net as a bit of a project to occupy my time.im looking to make one pretty much like Paint but with gradients and other features, but im at a loss as to where to find such a tutorial.

View 3 Replies

Implement Undo In Drawing Program?

May 13, 2009

I try to implement undo in drawing program I want to save the bitmap after every drawing and push it to stack then when the user click the button it will change the image to the last bitmap saved in the stack here is my code

Private Sub PictureBox1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseUp
Xend = e.X
Yend = e.Y

[code]....

View 3 Replies

Implement Copy, Cut And Paste In Drawing Program?

Feb 28, 2009

I want to implement copy, cut and paste in my drawing program (copy part of an image that is selected)I don't know how to start?

View 10 Replies

Implementing Copy - Cut And Paste In Drawing Program

May 21, 2009

I want to implement copy, cut and paste in my drawing program (copy part of an image that is selected) I don't know how to start

View 5 Replies

Drawing Pixels With Me.creategraphics In System.drawing (yay)?

Jun 3, 2012

draw individual pixels, without resorting to drawing a line and setting it's length to 1. Is there an actual ability to draw a pixel that is just 1 pixel big?

View 2 Replies

Drawing On Picturebox Vs Drawing On Form?

Feb 18, 2012

I need some code to draw a resizable, draggable rectangular cursor (or selection box) on a picturebox. I found some excellent code (albeit rather old) that does just that, but on a form rather than a picturebox. I have tried converting the code - basically moving things to the picturebox events (Paint, MouseDown, MouseMove etc). It nearly works but leaves a trail behind it when you move or resize the cursor. In other words, the selection rectangle is not being erased before being drawn in the new position.

Is there some fundamental difference between drawing graphics on a form and drawing on a picturebox that would cause this behaviour? Something like, when you invalidate a form and cause a redraw it erases what you did last? If not, then I just need to dig a bit further and work out how the cursor is being erased from the previous position.

Here's the original code that works fine on a form:

Private DragRect As New RectangleF(20, 20, 100, 80)
Private Adornments(7) As RectangleF
Private MouseInRect As Boolean = False

[Code]....

View 1 Replies

Click Button To Insert Drawing, Click Drawing To Get Option To Delete - VB Versus Access

Jun 21, 2010

Say I have 3 Buttons, labelled: Unit 1, Unit 2 and Unit 3. When I click on any button I want a drawing of that unit to appear on screen at a pre-specified starting point. Thereafter when I press any other one of the buttons the unit drawings appear alongside each other in a line. So I could end up with:

[Code]...

View 4 Replies

Error: Operator '=' Is Not Defined For Types 'System.Drawing.Image' And 'System.Drawing.Bitmap'

Aug 17, 2009

With this line...

If PictureBox1.Image = My.Resources._2star Then

I get this error: Operator '=' is not defined for types 'System.Drawing.Image' and 'System.Drawing.Bitmap'.Is there another way to say = with images?

View 8 Replies

Convert An Object Form System.Drawing.Graphics To System.Drawing.Image?

May 23, 2009

Is it possible to convert an object form System.Drawing.Graphics to System.Drawing.Image?

View 4 Replies

Error Value Of Type System.Drawing.Image Cannot Be Converted To System.Drawing.Icon

Jan 21, 2010

Here is my favicon code

Dim oURL As Uri = New Uri(e.Uri.AbsoluteUri)
Dim favicon As Image
If oURL.HostNameType = UriHostNameType.Dns Then

[code]....

The error is Value of type System.Drawing.Image cannot be converted to System.Drawing.Icon Is it even possible to make the favicon be the icon of the form?

View 4 Replies

Value Of Type 'System.Drawing.Image' Cannot Be Converted To 'System.Drawing.Printing

Apr 3, 2009

im using an MDI parent form and MDI Child. how can i print the image that's inside a picture box that's inside the Child from a button that's on the Parent?when i try to use print preview or print dialog, i can't get it to recognize that the document is the picure inside the picture box. i've looked up this error message:Value of type 'System.Drawing.Image' cannot be converted to 'System.Drawing.Printing.PrintDocument'.[code]

View 6 Replies

'System.Drawing.Image' Converted To 'System.Drawing.Icon&#

Apr 9, 2012

I am making a web browser using geckofx. I have put the favicon in a picture box but I have changed my mind and now I want it as the form's icon. The code for the favicon is:[code...]

The favicon works fine in the picture box but i think it will look better as an icon. If i change the line Me.PictureBox1.Image = favicon to Form1.icon = favicon I get the error Value of type 'System.Drawing.Image' cannot be converted to 'System.Drawing.Icon'. How can I get this to work?

View 6 Replies

Convert System.Drawing.Graphics To System.Drawing.Image

Jan 20, 2010

I have a System.Drawing.Graphics g, which draw something in a PictureBox. Now I want to export this pGraphics to a new System.DrawingImage pImage (or Bitmap). But how?

Dim pImage As Bitmap
Dim g As Graphics
g = Graphics.FromImage(b)

[Code].....

View 9 Replies

Convert System.Drawing.Graphics To System.Drawing.Image?

Mar 10, 2010

I have two graphics I'm trying to superimpose into one, then display in a DataGridViewImage cell...The Value property of a DataGridViewImage is an Image type.

Dim Image1 As System.Drawing.Image = imgl_Imagelist1.Images(0)
Dim Image2 As New Bitmap(imgl_ImageList2.Images(0))
Dim DualGraphic As Graphics = Graphics.FromImage(Image1)

[code].....

View 3 Replies

IDE :: Add The Directx In VB6?

Mar 9, 2009

i am using windows vista and i have installed visual basic 6 and Microsoft directx SDK 2008 in my computer.I want to use directx in VB6 but i am not able to add it from the reference.There is no reference to directx available there.

View 1 Replies

Set DirectX SDK Up With VB?

May 9, 2009

i am beginning to be better and better to VB express edition 2008, and really really like this language, my goal is to program 3D games.And since i didn't came anywhere in C++ or C#, i believe it's possible to make great 3D in Visual Basic. how to set DirectX SDK up with Visual Basic? and show me some tutorials or books?

View 10 Replies

Using DirectX With VB?

Jul 21, 2009

I have a quick question that needs answering. How can I use DirectX in my VB 2008 application? Most sites I've seen says to write Imports Microsoft.DirectX but it's apparently not there. I have downloaded the DirectX SDK (MArch 2009) but there are only C++ files in there. Can anyone provide insight as to how I could solve this?

View 5 Replies

3D Grid Using DirectX?

Aug 16, 2010

I am using Microsoft's Visual Studio 2005 (VB.Net) to make a basic directx program, which shows the coordinate visually. The idea is to draw the x-y and x-z grid using the line class of the direct3D. The line class has a function to draw line in 3d

Public Sub DrawTransform(ByVal vertexList() As Microsoft.DirectX.Vector3, ByVal transform As Microsoft.DirectX.Matrix, ByVal color As System.Drawing.Color)

View 4 Replies

Hooking DirectX 9

Sep 9, 2009

I'm working on a tool that requires overlays ala X-Fire. I'm hoping to do it in C# or VB.NET rather than resorting to C++, but the only solutions i've found for .NET cause a large performance hit (~20FPS in games). Take a look here: [URL]

View 1 Replies

2008 And DirectX - Display ?

Dec 3, 2009

I'm using Visual Studio 2008 on Windows 7 64-bit and latest DirectX SDK (August 2009). When I run program, window looks like this . The code is from site . Windows Vista 64-bit has the same problem. My graphic cart is Gigabyte GeForce 9400 GT

View 4 Replies

Add A Reference To DirectX In VB 2010?

Mar 21, 2012

If I try to copy/paste simple tutorials such as [URL], Visual Studio freezes indefinitely and I have to force-close it. If I try to use code like the stuff found here
[URL] or even just load up Reed Kimble's XArcade Vengance from this forum, I get this error message:

An error occurred creating the form. See Exception.InnerException for details. The error is: Could not load file or assembly 'Microsoft.DirectX.Direct3D.dll' or one of its dependencies. is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)

[Code]...

View 6 Replies

Add DirectX Capabilities To My Project?

Oct 30, 2010

I want to add DirectX capabilities to my project and I don't feel like messing around to learn WPF at the moment. How can I include DirectX into my project running VS2010 .NET 4.0. I know MS no longer supports managed code for DirectX but is there an API module or something I can get.

View 3 Replies

Cannot Import The Directx Reference

Oct 17, 2011

I've spent a long time bashing my head against my desk and an even longer time trying to get directX to work with vb.net. I've downloaded the June 2010 SDK and installed. I cannot import the directx reference, and it does not even show up in the add references popup. even when manually going into the c:program filesMicrosoft DirectX SDK (June 2010) and search every folder for the correct file it does not exist. What the hell. I'm running Visual Studio 2010 Pro. this is the most frustrating thing.

View 1 Replies

Connect An Unmanaged DirectX To .NET?

Sep 20, 2009

Maybe this is not true ... But how to connect an unmanaged DirectX to VB.NET? For anyone dll I use <DllImport()>, but Unmaged DirectX have interface.... Than I tried use "<ComImport(), Guid(...)...>", but I do not know how to use COM interfaces Maybe I did not really understand COM technolgy... I tried find documentation "how to use com interfaces", but found nothing.

View 1 Replies

DirectX - How To Create 2D Graphics

Aug 20, 2009

I have found an example about how to create 2D Graphics in Visual Basic using DirectX here. I have created a new Windows Application, I have copied the code, but I get errors. The code seems to be OK, but the application refuses to start. I have the nVIDIA 7300LE Graphics Card and I'm using Windows Vista x64 with DirectX 10 and Microsoft .NET Framework 3.5 SP1. I have also downloaded the DirectX Redistributable Package (March 2009) in order to make my application work...

View 10 Replies

DirectX Not Working In .NET FYI And Question

Apr 3, 2010

I decided to add some 3D rendering to my project and found an interesting little quirk. DirectX doesn't like to work under the AnyCPU Platform; it won't run. Instead you have to assign it to a new platform x86 under the Configuration Manager; which makes debugging difficult because if your doing User Controls they won't load.

View 2 Replies

DirectX Scaling / Intensity Changes

Jun 24, 2010

So, I coded a graphics engine for myself. I can make meshes, save them, load them, rotate them, position them, scale them, and light them. Unfortunately, when I scale objects to a size other than it's original size, my lighting intensity changes (seemingly proportionally) with the scale of the object! Ambient light still works correctly though. Any suggestions?

View 4 Replies







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