Sarguna's Q&A profile
Windows Forms View Designer Error message!
When I load a WinForm Application, it runs successfully. But When I switch the sorce code page to Designer Page, it throws the error message like below: One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project, while others may require code changes. Value cannot be null. Parameter name: serviceInstance Hide at System.ComponentModel.Design.ServiceContainer.AddService(Type serviceType, Object serviceInstance, Boolean promote) at System.ComponentModel.Design.ServiceContainer.AddService(Type serviceType, Object serviceInstance) at Microsoft.VSDesigner.VSDesignerPackage.VSDesignerPackage.ReplaceServices(IDesignerHost ...Show All
Windows Forms DataGridViewComboBoxColumn Problem
"My" DataGridView consists of only two ComboBoxColumns. As the form loads I bind the DataGridView.DataSource to a DataTable. And the DataGridView.DataGridViewComboBoxColumn.DataSources to their respective DataTables. Next the user clicks the "Add" button and I allow him to add and edit rows, set as it follows: DataGridView.AllowUserToAddRows = true ; DataGridView.EditMode = System.Windows.Forms. DataGridViewEditMode .EditOnEnter; If news values are selected, the changes are saved and I set the DataGridView state back to normal: DataGridView.AllowUserToAddRows = false ; DataGridView.EditMode = System.Windows.Forms. DataGridViewEditMode .EditProgrammactically; If no new values are selected, no ac ...Show All
Visual C++ How to open a file on a network drive
Hello All! I have code which uses CreateFile() to open files on the C:\ drive just fine. When I try to open files on a network mount (i.e. the Z:\ drive) it does not work. I tried converting the drive path to UNC using WNetGetUniversalName(), but CreateFile() still will not open it. Is there any way to open a file on a mounted network drive in C++ Thank you! -Anton For such issues, the win32 dev newsgroups at http://msdn.microsoft.com/newsgroups is the proper location. OTP Thanks, Ayman Shoukry VC++ Team ...Show All
Visual Studio Express Editions using api in vb.net
Hi, I am migrating an application from VB6 to VB.NET at the moment. There is a Windows API call in one of the subroutine which will not run through, see below (words in red are added by VB.NET): Private Sub hook() ' UPGRADE_WARNING: Add a delegate for AddressOf WindowProc Click for more:... lpPrevWndProc = SetWindowLong(gWH, GWL_WNDPROC, AddressOf WindowProc) End Sub my question is how can i add a delegate for windowProc how does a delegate work Thanks actually "Address of " is from the VB6, it is not inserted by VB.NET, and now i think the delegate is not a problem as the program can go pass it...sorry, my mistake.. ...Show All
SQL Server SQL2005 Performance problem with updating subscribers with identities
Since we've upgraded to 2005 we've had major performance problems with updating subscriber tables that contain identity PK columns set to manual or auto range management. If a table has identity range management set to 'None' (the "old" 2000 way), the peformance is fine. Below are sample tables: CREATE TABLE [dbo].[ID_RANGE_TEST]( [ID] [int] IDENTITY(1,1) NOT FOR REPLICATION NOT NULL, [DATA] [int] NULL CONSTRAINT [PK_ID_RANGE_TEST] PRIMARY KEY CLUSTERED ( [ID] ASC )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] ) ON [PRIMARY] GO CREATE TABLE [dbo].[ID_NONE_TEST]( [ID] [int] IDENTITY(1,1) NOT NULL, [DATA] [int] NULL CONSTRAINT [PK_ID_NONE_TEST] PRIMARY KEY CLUSTERED ( [ID] ASC )WITH (PAD_INDEX = OFF, IGNORE_DUP_KE ...Show All
.NET Development Find out if we are Inserting or Updating a record
in the edit of a field i want to 'sense' if we are inserting a new record or editing an existing. This is for a application on a Tablet pc, so with a own soft-numeric keyboard. If the users cancels depending on what we are Inserting/updating different actions have to be taken. I could do this by settings flags but i wonder if there is no better way. If you are using a DataSet, the flags already exist on the record. Look at the RowState property of the row in which the value is contained. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Adding a simple shader to render a ModelMesh
I'm trying to figure out how to render with a shader instead of the default render style. I have quite a bit of experience with CG shaders from NVidia so I know the concepts, but when I'm trying to use XNA's HLSL, nothing is showing up. Here's what I'm doing. Any ideas what's wrong I'd like to note that I HAVE been following the help files, but the help files go into DrawIndexedPrimitive rather than mesh.Draw(), which I know isn't required and only helps to confuse me with the idea of applying a shader effect. On Load: shaderEffect = content.Load<Effect>("Content\\Shaders\\simple"); shaderEffect.CurrentTechnique = shaderEffect.Techniques["TransformTechnique"]; effectParam_wvp = shaderEffect.Pa ...Show All
Visual Studio Wierd Switch Expression Behaviour
Hi, What am I doing wrong I'm trying to calulate a percentage using the following expression. =IIF(y > 0, x/y, 0 ) When y = 0 the cell report #Error If I replace the code with the following it works as expected ( not desired behavior, but evaluation appears to be working ) =IIF(y>0, 1, 0) I can work around this, but this should work Unfortunately y may be a value between 0 and 1; Also that didn't seem to work. The problem appears to be that even if the condition is false it still attempts to evaluate the expression which causes an error. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. kW X-porter is updated for 3ds Max 9
I have finally had time to build and test the kW X-porter plug-in to export .X files from 3ds Max 9. This exporter does better than the DirectX SDK exporter (like, it actually does multiple animations), and has a few more bells and whistles than the PandaSoft exporter. Also, with 3ds max 9, the stock IGame.dll file is not overwritten, as the right version is included from Autodesk. http://www.mindcontrol.org/~hplus/graphics/kwxport.html Note: most users claim kW works fine for them, and some users get crashes. I can look at the crashes and fix them if I get a copy of the .max file. The e-mail for questions is found in the installed documentation. Hello Mr. Watte, I am new to game programming and such and I want to do every thing in ...Show All
SQL Server Transactional replication: commands are not applying to subscriber
Hi! The distributor was down for a long time (neer the week) and after that the commands stop applying to subscriber, while they successfully collected from publisher and stored into distributor. Replication agent on distributor reports that initial snapshot is not available. It seems subscription is expired. But all commands from the point distributor down I have. How can I make distr agent to resume activity without reinitialize snapshot You right, it expires. I try to update status field in mssubscriptions table to value 2, but an agent anyway cannot apply commands. It seems distribution clean up job removed many commands and that is why distr agent cannot apply them. I think distribution clea ...Show All
SQL Server Getting only the first member when isAggregatable=false
Hello, I am using AS 2005 and trying not to get the "All" member in the cube browser. I changed the value of isAggregatable to false of the highest level in the dimension. than, I change the the AttributeHierarchyEnabled of the children to false (otherwise the cube could not be deployed). than I tried to view the dimension in the cube browser, and I could see only the first member of the dimension. Is there any way to see all the members without the "all" member I would appreciate any help! I tried that, and it didn't help. I have noticed that if i have one dimension in the cube, than it works fine - but My situation is that I have 2 dimensions, the first one is related to a table and the second one is relat ...Show All
SQL Server Report Builder - Numeric Aggregate Aggravation
So I'm building a report model containing several 8 or so numeric amounts. All amounts are numeric(10,2), and there is nothing that would differentiate the columns other than their names. One of the columns WILL NOT generate any aggregates. It just appears as an attribute. It's inexplicable. I've even tried to build a model containing just this one numeric attribute, and it still does not work!! VS just hates this one element! Anyone seen anything like this I'm running VS 2005 Sp1. WHAAAAAAAAAAAAAAATTTTTT What genius came up with that! Any why would an ID field be numeric 10,2!! Thank you thank you ...Show All
Smart Device Development create a directshow filter
Hi, I'd like to create a directshow filter to run on a pocket PC under SDK, and I'd like to know where I can find documentation for that Thanks a lot Regards Writing directshow filters for Windows CE is no different than for Windows. The only issue there is that the Pocket PC SDK does not give you BaseClasses library (strmbas(d).dll). Those are a part of Platform builder samples. You could obtain an evaluation version of Platform Builder and pull the library from there. ...Show All
Windows Forms public event - pass along data with the event
I am having some problem understanding publishing and subscribing to events. My test code today is below: Form2-code public event EventHandler NewCustomerNumber; private int customerNumber; //a propertie that is available for entire form2 and is set in another method private void NewCustomer(int customerNumber) { if (NewCustomerNumber != null ) NewCustomerNumber(this, EventArgs .Empty); } Form1-code: Form2 newForm = new Form2(); newForm.show(); newForm.NewCustomerNumber += new EventHandler(DisplayNewCustomerNumber); private void DisplayNewCustomerNumber(object sender, eventArgs e) { Form2 customerForm = (Form2)sender; if (customerForm.customerNumber > 0) messagebox.show(customerForm.customerNumber.tostring ...Show All
.NET Development FileSystemWatcher watcher.NotifyFilter issue
Hi all, I am using the example from the MSDN Library for the FileSystemWatcher class with only a single change watcher.NotifyFilter = (NotifyFilters.LastWrite) ' Or ' NotifyFilters.LastAccess Or _ ' NotifyFilters.FileName Or _ ' NotifyFilters.DirectoryName) that is - I am only watching for changed events...(to text files). My problem is that when opening and saving the file the event is being executed 3 times for no obvious reason. I have read everything about the class notify filters etc. but cannot see anything wrong, can someone help I have disabled Windows Desktop Search/AntiVirus (security department not happy) etc etc etc but still get three executions - all one after the other. Can anyone shed ...Show All
