Nicolas2608's Q&A profile
Game Technologies: DirectX, XNA, XACT, etc. A problem with normals and lighting
Hi; I'm using vb.net express and the june 2005 sdk. I've created a simple landscape mesh in the x-z plane with a light directly overhead pointing down (vector(0,-1,0) like the sun. I generate the normals by using mesh.computenormals. The problem is, when I display the mesh, everything is completely lit -- there are no variations of brightness on the hills as you'd expect. So it's hard to see anything at all; the only way you know it's not completely flat is by looking at the edges. I know the normals are there, because if I comment out mesh.computenormals the mesh is very faint, just lit by ambient light. It's as if each normal is set to (0,1,0) -- yet I know they're not. (I examined the values; they're computed ...Show All
Software Development for Windows Vista Forcing the designer to refresh?
I have a custom activity that adds activities to itself at design-time. Specifically, given the class Public Class SelfUpdatingState Inherits StateActivity Private mDummyProperty As String Public Property DummyProperty() As String Get Return mDummyProperty End Get Set(ByVal value As String) mDummyProperty = value PopulateInitializationActivity() End Set End Property Private Sub PopulateInitializationActivity() If Activities.Count = 0 Then Activities.Add(New StateInitializationActivity("InitializationActivity")) End If End Sub End Class However, only if I close the designer tab in VS 2005 and open it up again, does the designer show that the "InitializationActivity" has been added to the workflow. ...Show All
Visual C++ is this the correct/best way to set file size?
Hello everyone, I have verified that the following approach works to set the size of a file (newly created file) to be 100 bytes, but I am not sure whether it is the correct/best way to have a maximum portability (I need to write code on both Windows and Linux). Could anyone give me any comments [CODE] #include <fcntl.h> #include <sys/types.h> #include <sys/stat.h> #include <io.h> #include <stdio.h> int main() { FILE* file = fopen ("foo123", "w+"); fseek (file, 99, SEEK_SET); fprintf (file, "x"); fclose (file); return 0; } [/CODE] thanks in advance, George Thank you einaros, einaros wrote: That sh ...Show All
Smart Device Development How to Load a GIF File into a Bitmap Object?
Hi all, i have a GIF file that is created from a Bitmap object outside CF using: Bitmap bitmap = new Bitmap(640, 480); bitmap.Save("temp.gif", ImageFormat.Gif); If i copy this temp.gif to the emulator and try to load it using: Bitmap bitmap = new Bitmap("temp.gif"); i get an ArgumentException. However, if i save it as a BMP, i.e.: Bitmap bitmap = new Bitmap(640, 480); bitmap.Save("temp.bmp", ImageFormat.Bmp); and load it: Bitmap bitmap = new Bitmap("temp.bmp"); it loads ok. Is it possible to load a GIF in CF If so, how TIA and Regards, Edwin Thanks for the advice Ilya. What formats (compressed) are supported without the need for a seperate decoder B ...Show All
Software Development for Windows Vista FileMaker: Screen Flickering
I installed FileMaker Pro 8.5 on RC2. In FileMaker everytime the screen needs to refresh/redraw it flickers, turning the whole application window black. Is this problem unique to FileMaker or is there any other application that has this problem Thanks. Hello Sir, You can apply a compatibility mode shim on your application by right clicking the application exe, click on properties, select the Compatibility tab, and check the Disable desktop composition option. Hit apply and then try restarting the application. This alone should fix any composition issues you may be having. Please note that if your system does not support or have Aero glass enabled this option will not make any difference in the way the ...Show All
Visual C++ Displaying text in a CListView
Hi, I wiould be grateful if you could explain how to display text in a CListView.I do not want the text in a tabular form.All subsequent text should be added below the previously inserted text(in the next line).The order of the text should be in the order in which they have been inserted in the view(no automatic arrangement). I looked up CListCtrl::InsertItem and CListCtrl::SetItemText,but they are all for tabular data. How can I get my view to function as a ListBox Thanks Hi, In a CListView window, I used Report mode, set one column, call InsertItem( i, pText), the text line are displayed fine. I also used GetListCtrl().SetTextColor(RGB(255,0,0)), for example using Red for odd number lines, Green for even number of line. W hen I ...Show All
SQL Server PERMISSION_SET = EXTERNAL_ACCESS or UNSAFE
I tried to create a sp on one of the databases on my lap top and got this: Pls help i need it bad Msg 10314, Level 16, State 11, Procedure ap_Hello, Line 5 An error occurred in the Microsoft .NET Framework while trying to load assembly id 65695. The server may be running out of resources, or the assembly may not be trusted with PERMISSION_SET = EXTERNAL_ACCESS or UNSAFE. Run the query again, or check documentation to see how to solve the assembly trust issues. For more information about this error: System.IO.FileLoadException: Could not load file or assembly 'vbtriggers, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An error relating to security occurred. (Exception from HRESULT: 0x80131 ...Show All
SharePoint Products and Technologies Project potal right-hand zone missing unable to reinstate
On a "project portal" in WSS associated to a (MVS2005 TFS project) I removed all web parts from the right-hand zone leaving only web parts in the left-hand zone. I'm now unable to re-instate the right-hand zone; I cannot add any web parts. For example: I select "modified shared page" > "add web parts" > "browse"; When draging a web part it is only possible to drop it on the left-hand zone; in the "add to" combo box only one option ,"left", is available. This project portal is associated with business critical source code held in TFS. That's why I haven't reinstalled the project portal because I'm not sure if it will disrupt the source code that developers have to acces ...Show All
SQL Server Removing protected beta files
I cannot install SQL SErver 2005 because of files still on my hard disk from beta version. These include sqlmgmprovider.dll and svrenumapi.dll. The uninstall program is no longer available. How do I get rid of whatever remains of the old beta installation so that the released version of SQL Server 2005 will install What SKU are you trying to install and on what OS If you're going through a command line install, can you supply the command line string If you're going through UI, where is it failing Go ahead and search your install logs in %Program Files%\Microsoft SQL Server\90\Setup Bootstrap\LOG for the text string "value 3" and then copy/paste the 10-20 or so lines above that message. Thi ...Show All
Visual C++ Problems with Char*'s and LPCWSTR need help
I am trying to use the openregistrykeyex or openregistrykey function from the windows.h include file and I have the following code HKEY hKey = NULL; char * temp = "String" ; int len = strlen(temp) +1; wchar_t *wText = new wchar_t [len]; if ( wText == 0) return 0; memset(wText,0,len); ::MultiByteToWideChar(CP_ACP, NULL, temp2.c_str(), -1, wText,len); const wchar_t * test = wText; //long tempResult = RegOpenKey(HKEY_LOCAL_MACHINE, test, &hKey); long tempResult = RegOpenKeyEx(HKEY_LOCAL_MACHINE, test,0, KEY_READ, &hKey); Neither work and I can't understand the cryptic error codes if someone could help me unravel the error codes error code = Error 1 error LNK2028: ...Show All
Visual Studio print without preview formating
I have the print without preview working except for 2 small items. 1. The data is not formated as it is with the preview (IE. with preview aligns the numeric field properly but without preview does left justivied) 2. I have total fields that are sum statements after the table data but it will not total just prints #Error Can someone tell me what routines I need to add to correct for this. Thanks ...Show All
Game Technologies: DirectX, XNA, XACT, etc. BoundingBox.Contains doesn't work after a transform?
Hi All, I have some test code that uses BoundingBox.Contains to see if a vector lies inside the bounding box. It works fine until I transform the point vector and bounding box min/max vectors by a matrix. The coordinates look right, but the function retuns disjoint. I know I must be missing something here, but I can't figure it out. The values after translation are: BoundingBox.Min: 0, 0, 0 BoundingBox.Max: 1, 0.99999999, -1 Point: 0.5, 0.5, -0.5 My test code just replaces the standard game Update() method. You also need to set the game Draw() methods graphics device clear call to graphics.GraphicsDevice.Clear(color); Here's the Update method and color declaration: Color color = new Color ( Color .Yellow.To ...Show All
Visual Studio Express Editions Change colour of Font when text equals certain value
This is the last thing I want to do before building and testing my program. I want the text in my textboxes to change from blue to red when they reach a certain value ie if numbers = 1, 2, 3 etc they stay blue if they reach -1 and below they change to red. Can I do this for all of the textboxes at once or do I need to code each textbox individually. How would I code this Nearly there = yippeeeeee well to do it for all textboxes you would have to loop through the collection of controls, check if its a textbox then do your thing: for each currentControl as Controls in Me.Controls if TypeOf(currentControl) Is TextBox Then Dim theTextBox as Te ...Show All
SQL Server error:no report server found on the specified machine while setting up reporting services configuraion manager
Hello, I have installed sql server 2005 along with reporting services... though i am able to design report using business intelligence studio... i am unable to access the report server.... while trying to start the reporting services configuration manager it says no report server found on the specified machine...Invalid Namespace ... the installation is local ... Due to this problem inspite of designing the entire report i am unable to deploy it on the web..since it is asking for a report server... Can somebody please help me on this... Thanks in advance... Nirupa Hi Jarret, Thanks for your suggestions first, yes I installed IIS and it is running, and I couldn't find any fol ...Show All
Visual Studio VSS Projects and Internal files
Hi, I wanted to know if there is a way to match the projects in VSS with the files that are stored in the VSS database. Thanks RM I posted too early before looking in help. I guess this can be done using the following command. ss PHYSICAL $/Project/file.cpp Thanks ...Show All
