Badhris's Q&A profile
Windows Forms If designer with new control crashes -what to do?
I modified control, that was already instantiated on the form. After rebuild solution, form designer can not open form - due to exception that it cannot deserialize control. how to handle this situation thanks To avoid losing work, you obviously need to find out what is wrong with the new control that causes the designer to crash. AFAIK, normal Windows controls persist in the CodeDOM generated code, not resources. I wouldn't know about the custom control that crashes of course. Deleting any reference to the control in the designer file should work. There's usually a line at the top of InitializeComponents to create the control and several lines below it to set its properties. Plus a Friend d ...Show All
Visual Basic Coerce a byte string to a structure?
I have a file that contains a series of packets. I've created a set of structures that map the elements of the packets. My question... Is there a technique in VB to map the string of bytes read from the file to the structures In 'C' this would be simple. In VB.NET I don't know. Suggestions are appreciated. Thanks, Johnny Johnny, there is something in the Interopservices that you may be able to use. I'm not sure what the overhead will be compared to just bitconverting the values out. Also, having arrays in your structure will be a problem / unknown length Anyways, this technique copies your managed bytes back to unmanaged memory and marshals them back into a managed structure. That goes something like this: Imports ...Show All
Visual Basic Uncompress zip files using a dll
Hi, i want to ask what dll can i use for a simple descompression of zip files, and how to use it...... is simple.. sometimes i have to work with files that comes compressed, and i want my program to automatically uncompress them Thanks ;) Of course i use the full path and the filename, but the error is given already when i type DecompressFile ...Show All
Windows Forms Problem with DataGridView Cell Focus
Hello, I have a Winform DataGridView (VB.NET, VS2005) with following columns - ItemID ItemName ItemDescription Qty Rate What I want to achieve is after user enters the value in ItemID I want focus to move to "Qty" column, I have tried setting the CurrentCell as - DataGridView1.CurrentCell = DataGridView1.Item("Qty", DataGridView1.CurrentCell.RowIndex) In CellEndEdit Event, here focus goes to Qty olumn & comes back In CellLeave Event, here it repeatedly enter in this event In CurrentCellChanged Event, Gives Error Pls help me in how to achieve this. Thanks in advance. Hi hrubesh, Thank you for your feedback I was just wondering is there ...Show All
SQL Server Cannot install SQL Server Express
My system had a beta version of Visual Studio 2005 Express on it which I uninstalled. Apparently not correctly, as I can not install SQL Server 2005 Express. I have tried to removal procedures which either give me an error message or I cannot find the items in the Add/Remove program list that are requested. That is, it looks like the system should accept SQL Server 2005 Express, but it does not. I have successfully installed Visual C++ 2005 Express. I have no clue as to what to do next and there is no documentation on what to do. I have looked at the various postings here, tried several of them, to no avail. When I search the registry there are some 70 entries that have the string “SQLEXPRESS” in the entry. I am u ...Show All
Visual Studio Team System Application Verifier with Unit Test projects
I find the Application Verfifer a very useful tool. I also like the Unit Testing support that comes with Visual Studio 2005 so we write our tests using managed C++ which calls our unmanaged C++ code which is built as a static library. However, we can't find a way of running a Unit Test through the Application Verifier in the VS 2005 IDE. Is this possible We resort to doing it outside of the IDE by using the standalone version 3.3 of Application Verifier to instrument mstest.exe itself and then run the Unit Tests from the command line i.e. C:\Program Files\Microsoft Visual Studio 8\VC>mstest /testcontainer:"\TestProject1.dll" /noisolation Is there another way Application Ver ...Show All
.NET Development .NET 2.0 framework changes with VS2005 SP1 install?
Are there any updates to the framework with the SP1 install ...Show All
Smart Device Development Getting own Phone Number using C#
Hi, Is there a way to get the Phone Number of my pocket pc device without having to use c++. I would really like retrieve this information using C#. Any help would be greatly appreciated. Regards, Jesse Hi, Apparently my searching abilities are not up to snuff. I found this: http://msdn.microsoft.com/library/default.asp url=/library/en-us/dnnetcomp/html/netcfphoneapi.asp Arg.... ...Show All
Windows Forms ParentControlDesigner.OnDragDrop: BehaviorDataObject?
I've implemented a custom ContainerControl (designed by a custom ParentControlDesigner). My design environment consists of the standard DesignSurface hosting my root component, a custom Form (designed by a custom DocumentDesigner). I need to be able to drag/drop controls as well as string objects onto my ContainerControl so I've overridden ParentControlDesigner.OnDragDrop to check which is being dropped onto it. Dragging from the toolbar to the form works fine, as I use GetData(typeof(ToolboxItem)) to deserialize. The problem I've encountered is I cannot drag a custom control already in the surface onto another of my custom controls. The IDataObject in the DragEventArgs always returns 0 formats from ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Unable to load content && X360 Club sub question
Hi, I'm creating a demo on the windows version atm, but it refuses to load any content - A couple of textures in this case. I created a folder in the project called Sprites, then added two existing items, one a jpg off the net, the other a bmp created in paint. I named the assets "Sign1" and "Metal1" but when I went to load them, Texture2D spr = content.Load<Texture2D>("Sign1") it threw a contentnotfound exception. I've tried everything I could think of, including turning on copy to output dir, and by referecning them by their actual filenames. all the same exception. Is it a bug or am I doing it wrong Also, getting a 360 in a week or so and want to do coding on it, but i have no credit card, will i be ...Show All
SQL Server MDX help
Hi All, I have a calculated measure in my OLAP cube which is a distinct count of one of the keys in the Fact table. This is a semi-additive measure so I need Distinct count of the last child of this measure. How can I do this Is there a built-in function to handle this. I am using AS 2005. Any help would be greatly appreciated. Rohit Hi Paul, I tried your suggestion but it did not work. I might be missing something. Let me explain my scenario in more detail. I have the following dimensions - DimTime - Hierarchy is Year - Quarter - Month (This dimension table has a granularity of date but I have set the granularity for this dimension in the cube to month level. Would this be a ...Show All
Windows Forms App. runs on Win XP, not on Win 2000
I created an VS 2005 application that runs on a Win XP SP2 computer. But xcopied to Win 2000 SP4, it silently fails to run, with no error messages. Both computers have .net 2.0 re-distributable installed. Any help Can you provide further information about the application Also, have you tested a simple 'Hello, World' app to try and isolate the problem ...Show All
Smart Device Development Inserted/updated/deleted records from application were not preserved permanently in Mobile database, .sdf file?
Scenario: Iinserted or updated records from query analyzer to local Mobile database (sample.sdf) were preserved in permanently. If I insert, update or delete records from application using basic insert/update statements, inserted/updated records are loading to grid still I close the application. Every time execute non-query get succeeded and non query returning number of records inserted or else. Problem: Once I restart application, I couldn't see the inserted/updated records on application display grid. Then I came to know that inserted, updated, and deleted records from my application were not preserved in mobile database ( .sdf database attached to solution explorer and add to solution by selecting add -> SQL Mobile database ...Show All
Smart Device Development Connection over ActiveSync
Hi, I need to establish a connection between my desktop and ppc application so they can exchange data. I want the desktop application to connect to the ppc application and I want it to be done over ActiveSync. I do not want to use TCP over ActiveSync. That feature is already available in my app, but users complain that its to complicated to setup. Is there any nice and complete ActiveSync:ish reference out there, both for the desktop and the PPC Thanks in advance, Nille You need to use one of the interprocess communication techniques. Depending on the kind and amount of data that needs to be transferred, it could be something simple like SendMessage(WM_COPYDATA), or more complicated such as Poi ...Show All
Software Development for Windows Vista Still confused - installing machine wide data for read/write all users
Okay guys, Where in the world am I suppose to put our shared machine wide database on VISTA so that all users can read/write to it It is just a simple Access 2000 file. It shouldn't be this hard to put a file on a computer so all users can write to it. Thats all we want to do. I posted this about 3 or 4 days ago in another forum and a user said that we should be putting the database in CSIDL_COMMON_APPDATA if we want to share it with all users. So I followed these instructions and implemented the SHGetFolderPath API and I utilized this location (which maps to c:\programdata on VISTA) to store our database in c:\programdata\[ourApplicationName] Even though my data is written to this location each user that accesses the file r ...Show All
