Mehmet Metin Altuntas's Q&A profile
Game Technologies: DirectX, XNA, XACT, etc. Texture2D.GetData fails on 500x500 texture
Hi, i am reading of a Texture2D the given colors to extract my height data of a heightmap image. Therefor i use this code: Int32[] data = new Int32[heightMap.Width * heightMap.Height]; heightMap.GetData<Int32>(data); heightMap is a Texture2D object with a width and height of 500, so the data-array gets at runtime a size of 250.000. Fine but it fails on getting the data from the Texture2D by using the GetData function with this error: The type you are using for T in this method is an invalid size for this resource. I found something with google where people switched to Color instead of Int32 but for me it doesn't work it's returns the same error I used a smaller heightmap before with a resolution of 128x128 this works!! D ...Show All
Windows Forms Export datagridview to MS Word
Hi All, I need to export a number of datagridviews (all dynamically created) into a Word document. All of these have unique Column & Row Header information, and cells are colored based on value. Pairs of dgvs must be exported to each Word page - doing some research, but not sure where to even start with this one. Any guidance would be sincerely appreciated - thank you in advance. Cheers, - James anyone could REEEEAAAALLLLYYY use some help here... researching suggests that the Report.rldc object might be a place to start (I'm not familiar with this). Does that sound like the right path Some people did offer help, though their solution looked to be ASP/web form based - could anyone he ...Show All
Software Development for Windows Vista How do you host WWF 3.0 as a webservice (instead of using ASP.NET as a host)?
Tom/Vihang/All WWF Gurus, Can someone please provide an example of how to host WWF 3.0 workflows as a webservice, instead of using IIS (ASP.NET) to call and host XOML only workflows Tom has provided examples of ASP.NET hosting and calling XOML only workflows (using tracking and persistence). I need to do the same with a centralized web service. The labs provided with WWF 3.0 are very similar to WWF 2.0 labs. I cannot find any examples that offer samples on how to host workflow runtime services via a webservice that can be consumed by one or more websites (on one or more webservers). MS suggests using a centralized webservice to host workflow runtime services, instead of using IIS. Unfortunately I did not find any code examples (I ...Show All
.NET Development How to insert date into postgres
Hi all, I had declared creationDate as "timestamp without time zone" in my postgres database. But when I wanted to insert the creationDate to the database, it gives me an error [0] {ERROR: 42703: column "creationdate" of relation "employee" does not exist} object {Npgsql.NpgsqlError} My code is as follow: today = DateTime .Now; NpgsqlCommand command = new NpgsqlCommand ( "insert into employee (username,password, email, dept, creationDate) values('" +NewUserID+ "','" +NewUserPwd+ "','" +Email+ "','" +Dept+ "','" +today+ "')" , conn); Int32 rowsaffected; try { rowsaffected = command.ExecuteNonQuery(); lblEr ...Show All
Visual Studio Team System Error when Team Build Runs Web Service Tests: "target machine actively refused"
I get this error: System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it. And it seems to be specific to the Team Build machine. When I switch and use a different team build machine for the Build Type the tests run and pass. I can also run the tests manually through VS on the failing machine....AND they pass. I am at a loss -Ken Hi Abutthara, So the build service is running under the Domain user we setup. amsa\tfsservice The user is an admin on build machine1 and it doesn't make a difference. You mention permissions on the web service Where are you talking about th ...Show All
Game Technologies: DirectX, XNA, XACT, etc. ? Beginners
My friends and I have no experience with coding or anything like that but have taken an interest in XNA and have some ideas that we would like to try to create. How easy is XNA going to be to use to make a simple 2d game just for fun I know it uses C# and I am going to start trying to learn, but is this going to be something where only experts can use this program, or is someone like myself going to be able to create at least simple games and not have to spend hundreds of years doing it I am also a beginner on Visual C#, but with the help of the absolute beginners videos wich are also on the microsoft site, you can learn a lot, so i have taken the oppurtunity to watch those lessons, and trying something ou ...Show All
Smart Device Development random TypeLoadException
I am having real issues with a TypeLoadException that occurs generally randomly. I've been working on a .NETCF 2.0 app all day, debugging and generally being productive. All of a sudden, with no changes to the assemblies, I get a TypeLoadException on one of the types in one of my referenced assemblies. It's one of my own assemblies, and I checked the manifest and didn't notice anything untoward. // Metadata version: v2.0.50727 .assembly extern mscorlib { .publickeytoken = (96 9D B8 05 3D 33 22 AC ) // ....=3". .ver 2:0:0:0 } .assembly extern retargetable System.Data { .publickeytoken = (96 9D B8 05 3D 33 22 AC ) // ....=3". .ver 2:0:0:0 } .assembly extern retargetable System.Xml { .publickeytoken = (96 9D B8 05 3D 33 22 AC ) ...Show All
Visual Studio 2008 (Pre-release) Problem when using CollectionViewSource filter with DispatchingNotifyingCollection?
Hi, I am using DispatchingNotifyingCollection with CollectionViewSource. The code looks like this _wrapperCollection = new DispatchingNotifyingCollection < ObservableCollection < Item >, Item >(Dispatcher, _underlyingCollection); ICollectionVIew view = new CollectionView CollectionViewSource .GetDefaultView(_wrapperCollection) as ICollectionView _listBox.ItemsSource = _view; _view.Filter = new Predicate < object >(filtercode); bool filtercode( object de) { return true; //if return false, it will crash. } The problem if this only works if the filter code didn't filter out any element, if the filter code filters out any element (say I changed it to return false to f ...Show All
.NET Development Custom Collections and Custom Events in Web Services
Hi, I have a Web Service that returns a Custom Collection. So my Web Services client proxy class that was autogenerated has a array of objects that correspond to my custom collection on the server. This is working fine for me. My question is: I have a requirement that when some specific changes occur in the object array on the client side, I should be able to catch that change. Suppose I have a CustomCollection on server called 'EmployeeCollection' (Collection of Employee). Employee has only two attributes EmployeeID and Salary. So when I generate a client proxy, I get a Employee class on the client and an Employee[] that corresponds to EmployeeCollection. Now at runtime, when Employee[] on the client is populated and if ...Show All
Visual Studio Installing .net framwork on windows xp pro sp2
When i was trying to install .NET framwork 2.0 on "windows XP professional service pack 2" i recieve this error message: Component .NET Framework 2.0 has failed to install with the following error message: "Fatal error during installation. " The following components failed to install: - .NET Framework 2.0 See the setup log file located at '...' for more information. in log file : Process exited with code 1603 please help me. From msdn I found this error message explanation: 1603 The file [2][3] is being held in use by the following process: Name: [4], Id: [5], Window Title: '[six]'. Regards, Timo ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Displaying Videoframes with DirectX
I use a open source codec/video library (libavcodec). This lib exposes the video frames as 24_bit RGB bitmaps in memory. All I want to do now, is displaying those frames in a window as fast as possible. I tried a very naive approach: for ( unsigned int i = 0 ; i < Framenumber; i++ ) { Load->get_nth_frame( ID, i , RGBFrame ); DXDev->BeginScene(); Backbuffer->LockRect( &LR, NULL, 0); // [ memblit Copies RGBFrame pixelwise to Backbuffer , same function as //D3DXLoadSurfaceFromMemory ( Backbuffer, NULL, &SrcRect, RGBFrame, //D3DFMT_R8G8B8, Pitch, NULL, &SrcRect, D3DX_FILTER_NONE, 0);] memblit ( RGBFrame, (char*)LR.pBits, w, h, LR.Pitch ); Backbuffer->UnlockRect( ); DXDev->EndScene(); DXDev ...Show All
Visual C++ C# or C++/CLI ??
GRRRRRRRRRRRRRRRRR!!!!!!!!!!!! Im so double minded on whether to go with C++/CLI or C#. I dont know what to do.. :( Any advice guys Im looking to develop Windows Forms App's with Power and ease. I have C++ Knowledge but seeing that there arent many resources for C++/CLI, im thinking about going with C# like the many C++ Programmers out there who are...Not that i dont like C++/CLI or C++, its just that C# is a "pure" .NET Language and will always be supported by Microsoft.I also feel as if im being left out of the crowd by continueing with C++/CLI seeing that C# is what many C++ Programmers are moving to. IntMain, unless dependencies and performance concerns become a concern, I'd go with C#. But k ...Show All
Visual Studio Express Editions UGH....Save Function
I am not getting why this is not working. I have tried to get this to work, TallDude has done a great deal to help me better understand this all. But I am still having trouble to get this to work. I want to understand how the NotePad FIle>Save works. I am thinking, as TallDude as suggested, that they use StreamReader/Writer. So in that thinking I am strying to get the File>Save Function to work. Here is the entire code: Imports System.IO Public Class Form1 Public FilePath As String = "" 'Open Option Private Sub mnuOpen_Click( ByVal sender As Object , _ ByVal e As System.EventArgs) Handles mnuOpen.Click Dim open1 As New OpenFileDialog 'display only text files ...Show All
Visual Studio Team System Error 403 - Forbidden When Trying to Verify Operation After Restore
I've just been through the steps in the "How to: Move Your Team Foundation Server from One Hardware Configuration to Another" document to move my Team Foundation Server - Workgroup Edition from one machine to another machine. However, when I browse to http://localhost:8080/WorkItemTracking/v1.0/ClientService.asmx to verify operation, I get Error 403 - Forbidden - You are not authorized to view this page. In order to find out where the link above stopped working, I ran the procedure on another machine and periodically checked the link. The link gets broken after the command "tfsadminutil activateat newteamfoundationappliationtierservername" Note: This is a single server deployment moving to another single server dep ...Show All
Smart Device Development how to compress sound pcm data to another format?
now i can send sound pcm data between PPC via serial port of bluetooth, but it makes too much delay. i would like to compress pcm data to another format and send. when another PPC recieve data , it have to decompress and play sound pcm data. do u have any suggestion , reference or sample code i use C#(vs 2005) to implement this. pls... You could be using the free SharpZipLib to compress the data junks before sending them over the wire. ...Show All
