.net - Casting From Int32 To 'Microsoft.DirectX.Direct3D.VertexShader'?
Mar 4, 2010
How to solved error Unable to cast object of type 'System.Int32' to type 'Microsoft.DirectX.Direct3D.VertexShader'
We want to case ''System.Int32' value into 'Microsoft.DirectX.Direct3D.VertexShader'
I tried with CType but not working.Also tried mD3DDevice.VertexShader = CObj(D3DFVF_CUSTOMVERTEX_BOX)
View 1 Replies
ADVERTISEMENT
Apr 9, 2009
this error seems to be an error on Microsoft's part with Windows 7 and DirectX9. DirectX11 on Windows 7 should be able to run DirectX9, but it says it can't find the assembly called "Microsoft.DirectX.Direct3D.dll". I know for a fact that he can play Assasins Creed on Windows 7 which uses DirectX9.. Why does that game work but not my application? I'm using VB.NET btw.
[Code].....
View 6 Replies
Mar 12, 2011
SI like doing random things like 3D objects inside a windows form. With that said, I'm creating an application that will, eventually, write the code for me, after I do it myself visually.If you run the app it will make some more sense I guess.Now, to rotate the cubes, I'm using
.Transform.World = Matrix.RotationYawPitchRoll(CSng(CubeRx(1) / 10), CSng(-CubeRy(1) / 10), CSng(CubeRz(1) / 10))
now I do not want the world to rotate, just my individual cubes.Here's an example of me referring to my cube in action
If howmanycubes >= 1 Then
' vb2 = New VertexBuffer(GetType(CustomVertex.PositionNormalColored), 36, d, Usage.Dynamic And Usage.WriteOnly, CustomVertex.PositionColored.Format, Pool.Default)
[code]....
how to apply textures to the cube.instructions:When running the program, type in values on right side and click create cube.before you click create cube again, those same text boxes will adjust your current cube.Then when you click create new, it places another cube ontop of your current cube, so you'll need to give it new values.Not much validation is going on so some bad values will cause crashes.
View 1 Replies
Oct 9, 2010
I'm trying to play a music file. When I went to add reference and clicked on Microsoft.DirectX.AudioVideoPlayback.dll, it won't load. How do I resolve this problem?
Is this the preferred method for playing audio files?
View 8 Replies
Apr 29, 2012
how can i create a buffer with BufferCaps.ControlEffects set to false in order to clone it? Here's the documentation
Public AudioData(7, 15) As SecondaryBuffer
Dim dev As New Device
Public Sub LoadAllData(ByVal ph As IntP
[code]....
View 2 Replies
Dec 23, 2009
Why can't i find "Microsoft.DirectX.AudioVideoPlayback" library in VB 2010 .NET References ? Is it because its BETA program?
View 1 Replies
Nov 2, 2010
To be able to sort a dictionary by value I'm using this code:
Dim idCurrentJobs As IDictionary(Of String, Int32) = New Dictionary(Of String, Int32)
'The string in the dictionary represents a jobname and the integer is a counter for how many jobs im currently are running in the application'
idCurrentJobs.Add("JobName1", 2)
[code]....
View 2 Replies
Jan 23, 2010
I'm making a scripter to allow the user to add locations for Direct3D Icons, but I'm trying to make a sub for it...
Public Sub icoadd(ByVal mod1 As String, ByVal mod2 As String)
loc.X = defined.Location.X
loc.Y = defined.Location.Y
[Code].....
View 4 Replies
Jul 13, 2009
OK, I've read everything I could find about this loader lock exception: DLL <name>.dll' is attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang.
Just turning off the loader lock exception in the managaged debugging assistants doesn't work (my real application then hangs), and all the work-arounds are for doing things in C++ that I can't do in VB (like setting linker options). So, can anyone tell me how to make this simple blank form (with two additional lines of code in the constructor) avoid a loaderlock execption under VS2008? (If I know what to do to fix this toy example, I can probably fix my real app.)
[Code]...
View 10 Replies
Jun 20, 2009
i'm working on a simple 3D CAD to create complex 3D objects. This application uses:
1. Direct3D to render the objects
2.The methods contained in the Mesh class (such as Mesh.Box(...)) to create them
3.The Matrix class to apply some basic transformations (such as Translation or Rotation)
My issue is to do a boolean subtraction of a Mesh to another one to create a more complex Mesh, for example a Mesh with holes.
View 3 Replies
Mar 20, 2010
Im currently working my way through understanding direct3D with visual basic for windows mobile. So far I have managed to write a fairly decent engine that allows me to create and transform any number of 3D primitives and 2D sprites. However I cant seem to figure out how to get Direct3D to apply any sort of shading to my meshes. Regardless of what angle they are to the camera, or their position in 3D space, they remain a solid flat color on every single polygon of the mesh.
[Code]...
View 3 Replies
Oct 13, 2009
whats do Or operator in Vb do when it is applied as follows eg
Dim returnValue As UInt32
Public Const RMA_VC_RET_NULL_PTR_PARAMETER = 1
returnValue = returnValue Or RMA_VC_RET_NULL_PTR_PARAMETER
what does the 3rd statement do?
View 1 Replies
Dec 13, 2009
I want to reflect the bit patterns in 2 x int16 (an upper and lower 16 bits) into a single int 32. how can this be done, is bit converter what I am looking for?
View 2 Replies
May 13, 2009
what does the convert command do in vb.net? and could you tell me what difference is between int32 and int64?
for example
dim h as integer
h=convert.toint32(textbox1.text)
View 5 Replies
Jun 1, 2009
I have writen a program in Visual Studio 2005 professional. Part of the program functions is to store customers details. Part of this details include a phone number. I can add a customer and include his/her telephone no. which is 12 digits long. But when retreiving this customer I get the following error.Value was either too large or too small for an Int32. Couldn't store <+23320805060> in Phone Column.Expected type is Int32.The program runs fine If the phone numer is less than or = 9 digits. The datatype i am using is for the phone column is varchar(50). I have tried to change the data type to bigint, int and nvarchar(50) but the problem seems to persist. I am using the SQL database but i seem to be hitting a brick wall on this matter.
View 10 Replies
Aug 31, 2010
I'm getting following error while compiling my application. Overflow Exception .... CheckErrorStatus(Int32). It has something to do with my drawing. The strange thing that my computer (where I made the application) doesn't give any error, but my clients-computer gives an error. Strange...I really don't know what could give the error...and some solutions. I've been working for one full year on the application and it works great...except not on the clients pc
View 10 Replies
Apr 20, 2012
I'm having a problem regarding DataGridView. It keeps getting an error about "Object must be of type Int32". Here's my code:
rivate Function NumStrings(ByVal sSource As String, ByVal sMatch As String) As Long
NumStrings = (Len(sSource) - Len(Replace(sSource, sMatch, vbNullString))) Len(sMatch)
End Function
[code].....
View 3 Replies
Jan 27, 2010
I am playing around building a VB.net windows forms app.Mostly going well, but when I do executenonquery I am getting the error:Failed to convert parameter value from string to int32. I am unclear where the problem is but here is my code......
Private Sub cmdClockIn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdClockIn.Click
Dim empNum As Integer = Convert.ToInt32(frmMain.txtEmpID.Text)
[code]....
View 2 Replies
Nov 5, 2010
I'm getting this error
Unable to cast object of type 'System.Int32' to type 'System.String'.
when doing a routine LINQ to SQL query:
Return (
From n In DbContext.Newsletters
Where n.NewsletterID = NewsletterID
[Code]....
How is it possible that an Int32 can't be cast to String? How can I debug something this? Since it all happens deep in the bowels of LINQ, I can't even get any indication what field this is angry about.
View 4 Replies
Oct 8, 2011
I'm currently doing a project that includes access 2010 My question will be what driver can I use for an access 2010 *.accdb type file? For a *.mdb it works perfectly well with
ConnString ="Driver={Microsoft Access Driver (*.mdb)};Dbq=" & Application.StartupPath & "\CITSDB.mdb;Uid=Admin;Pwd=123;"
But, when I changed the mbd to accdb:
ConnString ="Driver={Microsoft Access Driver (*.accdb)};Dbq=" & Application.StartupPath & "\CITSDB.accdb;Uid=Admin;Pwd=123;"
It resulted in errors:
ERROR[HY000][Microsoft][ODBC Microsoft Access Driver]Could not find file '(unknown)'.
ERROR[IM006][Microsoft][ODBC Driver Manager]SQLSetConnetAttr failed
ERROR[HY000][Microsoft][ODBC Microsoft Access Driver]Could not find file '(unknown)'
And then it shows me that my code for
If dsLogin.Tables(0).Rows.Count = 1 Then
IndexOutOfRangeException was unhandled
Cannot find table 0
I knew it must be the driver but I don't know what accdb driver I can use for the connstring.
View 3 Replies
Aug 7, 2009
I have a database with one table.I'd like to populate an array with the values in the table so that I can work with the data.How do I copy the data from the table to the array?I am able to view the data with a DataGridView but can't find any info on extracting the data to an array or variable.
View 2 Replies
Apr 21, 2009
I have an update query and I'm receiving the error "Failed to convert parameter value from a String to a Int32."
I'm assuming this is because of a format issue... I'm using Text and Date formats. I've tried a few things but I'm not sure exactly what is causing this error.[code]...
View 8 Replies
Apr 15, 2012
i am trying to save data from unbound datagridview to sql database.Failed to convert parameter value from a String to a Int32. The following is my
Private Sub btnPlace_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPlace.Click
' Modify the following code to correctly connect to your SQL Server.
[code].....
View 21 Replies
Jan 28, 2011
I'd like to see what is about to be sent to the SQL Server from my SqlCommand before SQLCmd.ExecuteNonQuery() runs.
I'm trying to debug because I am receiving the following error:
System.FormatException: Failed to convert parameter value from a String to a Int32.
Normally, I would use SQL Server Profiler to view what is being sent to SQL Server, but my statement is not making it that far. Is there a way to determine what it is trying to convert? I am having problems determining which parameter is causing the error.
View 2 Replies
May 1, 2011
i trying to seek 78 from beginning and get the int32 in binary mode..
View 1 Replies
Dec 7, 2011
I have an error ERROR [22018] [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression. and I've been trying to solve this but unfortunately I couldn't get the hack of this error. I'm a newbie in dotNet.
Public Sub LogInContinue(ByVal senter As Object, ByVal e As EventArgs)
Dim LibDS As DataSet = New DataSet
Dim LibDA As OdbcDataAdapter = New OdbcDataAdapter("SELECT * FROM tblUserAccount WHERE Uname='" & txtUserName.Text & "'", LibConn)
[code]......
View 2 Replies
Aug 7, 2009
I am building a VB 2008 Express Edition application.I have built a database (with a single table) using SQL Server Compact 3.5 and have connected it to the project. I am able to view and edit the data using a DataGridView on a second form (tutorial made this very easy). I need to work with the data in the table within the application. how to easily load the entire table into an array or even read the table a row or cell at a time so that I can make all of the data available for manipulation within the application (the tutorials only seem to show how to display the data).
View 7 Replies
May 8, 2011
I am developing a database system using Microsoft Visual Basic 2010 and Microsoft SQL Server 2008 R2. Honestly i don't have any knowledge on how to connect the data in VB to Microsoft SQL Server 2008 R2, so kindly anyone could support me with tutorial videos or ebook or any reference
View 4 Replies
Sep 21, 2009
This question is based on VS 2008 using VB I have a detail Window form which is bound to a SQLServer table using a BindingSource &TableAdapter. The Table is mostly Text & Date fields with the Table Key has an Identity field
[Code]...
View 3 Replies
Feb 3, 2011
Will that detect whether the integer should be int64 or int32? What about if we run the program twice. Once we use small numbers and latter we'll use big numbers?
Let's look at this for example: vb.net Dim vector1 As List(Of Int64)Dim vector2 As List(Of Int64) vector1.Sort()vector2.Sort(Function(x As Int64, y As Int64) As Int64Return y - x
What about if I do: vb.net vector1.Sort()vector2.Sort(Function(x As Int64, y As Int64) As Int64Return y - x
[URL]
View 3 Replies