RafaDom's Q&A profile
Visual Studio 2008 (Pre-release) Threading suggestions by experts
I have the following delegate: delegate void ImageQuery (); And I have the following code in a button click: ImageQuery iq = new ImageQuery (PerformImageQuery); iq.BeginInvoke( new AsyncCallback (QueryCompleted), null ); Works fine. The PerformImageQuery gets fired off in a seperate thread. It goes and grabs a bunch of URIs to various images on the internet. QueryCompleted is called once it is finished. Inside QueryCompleted I have this: bmi = new BitmapImage (); bmi.BeginInit(); bmi.UriSource = new Uri (queryImage.Url); bmi.EndInit(); bmi.DownloadCompleted += new EventHandler (bmi_DownloadCompleted); bmi.DownloadProgress += new EventHandler < ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Problems with SurfaceFormat.Bgra1010102 on the XBOX360
graphics . PreferredBackBufferFormat = SurfaceFormat . Bgra1010102; If I have the above line right after I create my GraphicsDeviceManager, anything I render to the screen comes out as total garbage in terms of color values *except* while one of the 360's panels (or whatever they're called - the ones the big X button brings up) is rendering. In that case everything renders fine. Simple example, I render out a farily heavily tessellated quad who's verts range from -32 to +32 in world space (in both X and Z directions, Y = 0). My vertex shader passes abs( worldPos.xz ) into the pixel shader as a texture coordinate and the pixel shader returns float4( frac( texCoord ), 0, 1 ) . I expect this to give me a r ...Show All
Visual Studio Team System What's the correct process to archive the final, shipped stuff
When my project was shipped, I need to backup these shipped stuff. Here is my process, 1. Create a branch; 2. Move the stuff under 'current' tree to 'branch\release\1.0' 3. Set the 'READ ONLY' permission on 'branch\release\1.0' is that okay Do I miss sth Thx. Paths like "c:\project\trunk\components" are called absolute paths. Paths like "../../components" are considered relative paths. The best thing for you to do in your situation is to update your IS paths to be relative. This way, it doesn't matter if you are building from "c:\project\trunk" or "c:\project\branches\1.0" because the contents of those two folders would be the same. If ...Show All
Visual Studio How to? : (ReportViewer + asp.net + .rdlc + print button)
I s there a way to add a Print button to the ReportViewer control in an .aspx page when using .rdlc file Would the Print button displayed and enabled if I use remote reports(.rdl) instead of local ones(.rdlc) Response is very much appreciated. Thanks, S Yes, here is is: http://msdn2.microsoft.com/en-us/library/ms252091(VS.80).aspx Or, just google "print from reportviewer control" ...Show All
Visual C++ Can't link a managed wrapper (mixed managed/native) assembly to a static lib???
Unless I'm missing something, this seems like a fairly major limitation... I have a mixed manage and native "wrapper" assembly project that wraps a third party's static library. We do not have a DLL version of the third party library, just the .lib. In VS 2003 with managed extensions for C++, the project compiled and linked fine. Now, after having converted all the managed extension stuff to C++/CLI, I have it all compiling. However, it does not link because of multiply defined symbols (LNK2005 error). It appears the static library had linked (statically) to libcmt.lib When linking my project I get 20 or so linker errors like this: libcmt.lib(fflush.obj) : error LNK2005: _fflush already defined in MSVCRTD.lib(MSVCR80D.dll) My ...Show All
.NET Development EOF not set with StreamWriter
Hello, When I execute the following code the EOF marker is not being set correctly. I've tried flush and that doesn't seem to work. StreamWriter FPFileOut; FileStream FavoritesFS; FavoritesFS = new FileStream ( "FavoritePrograms.txt" , FileMode .OpenOrCreate, FileAccess .Write); FavoriteProgramsRecord FPRecord = new FavoriteProgramsRecord (); FPFileOut = new StreamWriter (FavoritesFS); for ( int i = 0; i < FavoritesArray.Count; i++) FPFileOut.WriteLine(FavoritesArray ); FPFileOut.Close(); FavoritesFS.Close(); } Originally my file contains ABC Heroes Jericho After I programmatically remove Heroes from the FavoritesArray (using FavoritesArray.Remove) lea ...Show All
Smart Device Development Messages Sent to Foreground Window when Device Wakes Up
Can anyone tell me what messages get sent to a foreground window when a device wakes up I have an app that needs to detect when it becomes active on wakeup when using CeRunAppAtTime(). I am able to detect: 1. When the app has been shut down and forced to start up again. OnActivate() works in this case. 2. When the app is in the background and is brought to the foreground when the device wakes up with CeRunAppAtTime(). OnActivate() also works here. However, if the app is in the foreground already when the device wakes up, OnActivate() does NOT work. I don't know what message to use to detect that it is running again. Is there a WM_PAINT message that I can detect Thanks. Scott Anthony San Francisco It a ...Show All
Visual Basic Looking for a property creater
Hi, Just curious to wether there is a quicker way to create properties in 2005, I've seen the code snippet for properties but I'm wondering if there is anything that can do it quicker. An idea would be to only have to define the variables and then a macro of some sort would create the Properties. Any ideas Mat I think snippet is the fastest way. Macro is another good idea, but you have to write yourself to access VS accessibility layer (DTE stuff) which may not be very easy to code. . ...Show All
Visual C# active directory objectSID value not displaying?
Hi mates, I'm trying to access active directory SID value. Now the value is coming but its not displaying. My code is working fine till when i display value and it is just SID value, any other value is displaying fine. I want to know how it will display the value When i first display it, it was giving "system.byte[ ]. so i try to use these codes, for (int i =0; i <= objectSID.Length-1; i++) { Response.Write(objectSID[ i ]); } This is displaying the value but its not the correct value. then i put this code string objectSID =System.Text.Encoding.ASCII.GetString((byte[])result.Properties["ObjectSID"][0]); but still no luck. any ideas Hi, I have solved it myself here is the way to do it. ...Show All
Visual Studio Team System Save default constraints in a separate file
Hi I have just installed the VS TS DB Pro and it seems really nice to me, however I would like to know if its possible (or will be in comming releases) to save the default constraints in a different file from the table deffinition. Currently each time we have a new release from our software for upgrading the databases of previous versions we drop all objects except from the tables (to save the user's data), and then we create all the objects again: constraints, indexes, stores procedures, etc. It will be very useful to us to have the constraints in a different file, so that when we upgrade a database we use all the scripts except for the table defintions. Thanks Hi I imported t ...Show All
Game Technologies: DirectX, XNA, XACT, etc. 16000 hz
Hey, I was just wondering, I am making a game; will a microphone that records at up to 16000 hz provide speaking clear enough for a game, or will it sound at all moughled If it is extremely clear, how is it that I play a sound on directsound or directmusic that isn't at a standard hz, such as 22050, or 44100 If that isn't extremely clear (clarity wise), could you point me to a relatively cheap headset that is, and tell me how to play a not standard hz sound please thanks for your help. Thanks. How would I go about recording at 44100 with an exciter also, could you point me to one One other thing: This sounds like it is sort of like overclocking a cpu from what I understand , (or am I totall ...Show All
Windows Forms Refreshing combobox after updating list referenced by datasource
Hi, I wonder if anyone can help me with this: I have a combobox in a windows form connected to an ArrayList through a dataSource. At first, the combo works fine, it displays the list content perfectly. The problem is when I update the Arraylist (insert or remove items), the combobox doesn’t reflect those changes. I tried all the refresh methods (combobox,winForm) and got no results. I'm missing something for shure, can anyone tel me what Thanks in advance The simples way was to inherit from BindigList http://msdn.microsoft.com/library/default.asp url=/library/en-us/dnforms/html/winforms02152005.asp take a look in this. Pini. ...Show All
Visual Basic Long Numbers and LOG arithmetic math or maths.
Hi, I would like to write applications, such as calculating pi, generating Mandelbrot Sets, factoring large numbers or prime hunts, which use extremely long numbers. I'm not talking about the measly 32 decimal places of the Decimal variable. I'm talking about two or three thousand decimal places. I've written a couple long number calculators which are, quite frankly, crude, cumbersome and slow. My approach has been to create arrays of byte characters, assign one digit to each byte, and then try to program the whole thing to handle addition, subtraction, multiplication and division; all the while trying to keep track of decimal places and polarities. It seems to me that there has to be a better way. Anyone know if it is possible to ...Show All
Commerce Server Longhorn and IIS7
I'm unsure if this is the right location for this post but here goes. I'm trying to do some testing with the Longhorn and II7, which it seem to be running fine but somehow it will not execute anything that is .exe in my CGI directory(Scripts), it just wants to download them or save it. I know it must be something that needs to be activate to allow the cgi to execute but I cannot find anything. I've activated all the roles possible and do see the ISAP and CGI restriction screen but there is nothing in there that tells me to allow the cgi. In Windows 2003 server the IIS6 had an option under the web service extension where you could allow the Unkonwn cgi extensions. If you have any suggestions it is more than welcome. Thanks, ...Show All
Game Technologies: DirectX, XNA, XACT, etc. XBox 360 controllers for the PC
Hi, I had a question about controllers that plug into the PC. I understand that only XBox 360 controllers are supported by XNA. I also understand (I think) that wired only controllers work as they need to be plugged into the USB port on the PC. Actually the last point is now not valid since I discovered the wireless controller for Windows and 360. But this isn't available until 2007. Does anyone know if this wireless controller is an actual controller or just a receiver for an existing wireless controller Cheers, Steve Ben Vanik wrote: Maybe the MSFT guys can do some recon on the hardware division and see what their release date is Maybe get Creator Club members a discount :) ...Show All
