GetCode's Q&A profile
Visual Basic Read VB6 variant from a binary file with .net
I need read from my .net application a binary file written with VB6. I can get longs and string written with VB6 with .net BinaryReader class ut how can I read vb6 variants Do you know how variants are save in binarry file how much bytes do they take Thanks in advance Here you are: The date is saved in a double format, so you can do the following: Call stmStream.ReadByte() 'Advance one Byte Call MsgBox(DateTime.FromOADate(stmStream.ReadDouble())) Hope this can help! Best Regards, ...Show All
Visual Studio Express Editions Help Clearing All Textboxes and All Comboboxes
Greetings: I found this helpful code elsewhere on the forum, but it is only working on the Combo Boxes and not the text boxes on my Form1. Currently I have 4 textboxes and 3 comboboxes on my form. In the editor, when I hover my mouse over "ComboBox" it says "Class ComboBox" and when I hover my mouse over "TextBox" it says "Interface TextBox." Any ideas or help is greatly appreciated. Thanks Glenn Public Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click For Each c As Control In Me .Controls If TypeOf c Is TextBox Then ...Show All
Visual Studio Team System Who wants a FxCop VS2005 add-in?
Hello, I have written a simple add-in for VS 2005 to enhance integration with the IDE for those who are not using the Team System version of the product. I am planning to release it to the open source community but I'm wondering whether there is much interest in doing so. Currently the add-in does the following things: Select one or more FxCop warnings in the Error List then right-click to copy C# code for SuppressMessage attributes to the clipboard. Select one or more FxCop warnings in the Error List then right-click in the code editor window to insert C# code for SuppressMessage attributes at the current insertion point. (Saves the work of copying to clipboard, then clicking back to the editor and pasting.) Double-click on ...Show All
SQL Server Merge Replication not replicating updates
I have an issue that is only occurring in a production environment. The architecture is filtered merge replication between two SQL Server 2000 SP4 databases. The publisher is standard edition and the subscriber is personal edition. The issue is that is I update certain rows on the subscriber the data is not replicated to the publisher. Inserts and deletes seem to replicate correctly. The issue is specific to certain rows in some tables. If I update other rows the updates replicate correctly. The subscription has been re-initialized once and it did not fix the issue. The replication process indicates that there was not data to merge and the subscriber updates remain and are at that point different form the publisher row values af ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Translating C# DirectX example to C++/CLI
Hi, I try to convert/use a DirectX C# sample in C++/CLI but got stuck on following C# statement: vb = new VertexBuffer(typeof(CustomVertex.PositionColored), 3, device, Usage.Dynamic | Usage.WriteOnly, CustomVertex.PositionColored.Format, Pool.Default); How would you convert this statement to C++/CLI I couldn't go farther than this. vb = gcnew VertexBuffer(CustomVertex::PositionColored::GetType, 3, device, Usage::Dynamic | Usage::WriteOnly, CustomVertex::PositionColored::Format, Pool::Default); Seems that I don't have the right equivalent expression for "typeof"... Any hint Thanks for help, Stephane ...Show All
Visual Basic New Printform 1.0 Powerpack question
My company currently uses NTsvr.ocx to run a window's form's application as a service. In these applications we have some form that are printed as Batch sheets for our printers to run jobs. This is done with the old vb6 printform method. Yes, this ocx no longer supported by Microsoft. Yes, this is not a good implementation. That is not my problem. My problem is I'm trying to upgrade the services into a VS 2005 Windows service and in doing so I'm losing the ability to use the VB6 printform method without the powerpack. I've installed the powerpack but I am still having issues. So far I've only been able to get the powerpack to print an active and open form. The problem is if the application is installed as a Windows service. There ...Show All
.NET Development Retrieving data from Excell 2003 - Could not find installable ISAM.
I am trying to access some data in a Excel 2003 file and import it to a dataset using a oledb provider.Here is the code : string cnxString = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=C:\\TEST.xls;" + "Extended Properties=Excel 8.0;"; this.excelConnection.ConnectionString = cnxString; this.excelConnection.Open();I keep getting this error :A first chance exception of type 'System.Data.OleDb.OleDbException' occurred in System.Data.dllSystem.Data.OleDb.OleDbException: Could not find installable ISAM.I have search everywhere there is a space between data and source. I have read the KB articles but nothing seems to be doing it. Any help would be greatly appreciated.Thanks. ...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. OK Mr. Watte, anyway thanks for the attention. I did the update with the version ...Show All
SQL Server stored procedures, compile or not
I am writing stored procedures to retrieve data from an OLTP application that will be adding several hundred thousand transactions a day. The user will be presented a screen to select up to a dozen or so search criteria; date range, color, size, processing plant, etc. They may select all criteria, one or two, or none. Currently I am creating a stored procedure "on the fly" by replacing temp vars with search criteria, compiling and executing. My option would be to compile the stored procedure, pass it parameters, and run the precompiled stored procedure. I am wondering, as the database is changing so much, if I am better off to compile the procedure every time it is run. Or if stored procedures are always the best way to ...Show All
Windows Forms Can't sign assembly (ClickOnce: Publisher cannot be verified)
I'm attempting to deploy a ClickOnce app and realize that I must sign the assembly as well as the ClickOnce manifests (AFAIK) to get rid of that "Publisher cannot be verified" and the Install and Don't Install buttons. (someone correct me if I'm wrong here). The problem is, I am using the famous "Microsoft.Msdn.Samples.BITS" dll found here ( http://msdn2.microsoft.com/en-us/library/ms997639.aspx ) in the application. When I sign the assembly within VS2005 and go to do a build, I get the following error: Error 1 Unable to emit assembly: Referenced assembly 'BackgroundCopyManager' does not have a strong name This occurs in the BITS project that contains a reference to 'BackgroundCopyManager.dll'. Unde ...Show All
Visual Studio Team System how to delete a folder???
hi guys I have created a folder under the project. I need to delete this folder. the problem is that I can't delete it at all !!! even that I'm the site administrator. just to explain the scenario, let's say that I have the project "Proj1" under this project I have a folder "Folder1" that contains the project's files. I have added a new folder by adding another project to the same project but under another folder "Folder2" I could delete the files and folders under "Folder2" but I need to delete the folder. how to do this one more thing, how to create and manipulate folder is there a reference thanx in advance But why delete option is disabled at your machine ...Show All
SQL Server WSUS MSDE Problem
Hi All Im a new comer to the site and wsus. I inherited a functional wsus server it was great but due to a demand for improved reporting features I attempted to install the Wsus rollup reporting sample. Im uncertain as to how but I hashed up the installation to the extent that it corrupted the MSDE installation. It was suggested I remove wsus and reinstall. At this point I made another error. I was told that WSUS 3 had improved reporting features (and indeed it does, its infinitely better in that respect) so I signed up with Microsoft and downloaded the installation file. WSUS 3 uses SQL 2005 for Windows so my back up of the MDF & log files were rendered useless. I have since removed WSUS 3 reinstalled a fresh copy of WSUS Sp1 and run ...Show All
.NET Development Marshaling unmanaged C 2D array
How to access this: __declspec(dllexport) void __stdcall TestArray(int nI, int nJ, double** arr1, double** arr2) { int x1; int x2; for(x1 = 0; x1 < nI; x1++) { for(x2 = 0; x2 < nJ; x2++) { arr1[x1][x2] = 5; arr2[x1][x2] = arr1[x1][x2]; } } return; from c# i tried with: using System; using System.Collections.Generic; using System.Text; using System.Runtime.InteropServices; namespace Runner { class Program { [DllImport("../../../debug/testArraysUnmanaged.dll")] public static extern void TestArray(int i, int j, double[,] arr1, double[,] arr2); static void Main(string[] args) { int nI = 100; int nJ = 50; double[,] array1 = new double[nI, nJ]; double[,] ...Show All
SQL Server slq reporting 2005
is there any sampel web site where i can learn how to create a reports in sql server 2005 i'm interested in: 1) how to pass parameters to report thanks. Hi, Here is an example in using report parameters: http://www.odetocode.com/Articles/156.aspx Greetz, Geert Geert Verhoeven Consultant @ Ausy Belgium My Personal Blog ...Show All
Visual C# DLL shared by two application instances - How does this work?
I'm fairly new to C#. I am developing an application that uses a multiport communication board that is supported by an older style DLL. The application code uses a statement : [DllImport("PCIDX.dll")] when declaring the DLL function prototypes. The application .exe and DLL's are located in the same directory. We plan to load an instance of the application for each port we wish to use. When the first application instance is loaded it makes a DLL call to get a handle for the adapter and is able to use this handle in subsequent DLL calls. When a second instance of the application is loaded, the open fails, indicating the adapter is already in use. No biggy, I just use the handle number obtained from the first application i ...Show All
