matsushita's Q&A profile
.NET Development Reading any file format with FileStream
I want to be able to send ANY type of file (Text, .Doc, .Zip,. Etc.) with sockets. Everything seems to be going as planned, except when I read the file, the bytes are little bit different. How can I correctly read (ANY) file, for transferring over sockets Real Line 1 of File: +o[C€‥46( § cgZ C)E xn[y"QO Cp After reading with code below: +o[C (46( ,' cgZ6C)K xn["QS Cp It seems I am reading the file wrong. Only a few characters are not being read correctly. Here is the basic code for reading the file: fs = File.OpenRead(@"c:\mailroot\MENU.pdf"); br = new BinaryReader(fs); byte [] currentBuffer = new byte [1019]; currentBuffer = br.ReadBytes(currentBuffer.Length-5); Logger.Log(Encoding.ASCII.GetS ...Show All
Windows Search Technologies Vista 64 and Searching
It appears that the 64bit version of Vista 64 build 5472 has limited searching facilities. OneNote 2007 for example appears not be be indexed at all even in the application. Searching is important to me so I want to get a bit of a feeling whether I should drop down to 32 bit version Is 64 Bit Vista development going to behind the 32 bit version in areas for some time Agent86oz, Let me check with the OneNote team and see if I can get more information. I know that OneNote developed a specific IFilter to work with the search features in Vista and I'll have to see if development on that IFilter differs between 32 and 64 bit. Paul Nystrom - MSFT ...Show All
Visual C# Variant in C# ?
I’m coding in C# and I am working with a COM object that I earlier in C++ made this call: COleVariant varBeforeEnd(DISP_E_MEMBERNOTFOUND, VT_ERROR); hresult = pTemp->Add(knownObject, &varBeforeEnd ); How do I make the call in C# The IDE in VisualStudio say that the Add(…) function should have parameters like this: Add(KownObject, ref object); Any tip what to do with the second parameter I’ve tried to block some primitive types like int and bool to an object, but I only get exceptions… All tips are welcomed! Have you tried the IntPtr type it has been designed specifically for interop. ...Show All
SQL Server convert word doc to pdf
I have to convert word doc to pdf file use asp net. I think maybe it possible make report in the report services, and then save them in pdf format. but I dont know if I can make report from doc file. and also if I can get the url of the file by query string. Is it possible thanks! Do you have static Word documents that need 1-time conversion, or do you have Word documents that represent report styles or definitions that you want to export to PDF regularly with different data In the first case, I'd say RS is not the right tool. In the second case, I think you'll get good results by designing the report definition from scratch using Report Designer, using the Word documents as prototypes. ...Show All
Windows Forms How to setup an icon for the System Tray to "Always Visible"????
I have a windows form that has an icon in the system tray by using the taskbarNotifier and it works fine. But how would I set it up so that when this window form is installed and used that the icon in the System Tray is "Always Visible" without having to manually make if "Always Visible" via the Taskbar Dialog Do I need to set some sort of registry key I am not sure how it is done, any help would be appreciated. ...Show All
Windows Forms DataGridViewCheckBoxCell problem
Hello I am using DataGridViewCheckBoxCell in datagridview. When i check and uncheck the particular column, the column is marked as checked. The code used is as foreach ( DataGridViewRow row in dgOrders.Rows) { DataGridViewCheckBoxCell include = ( DataGridViewCheckBoxCell )row.Cells[ "Select" ]; if (include != null && include.Value != null ) //if checked { Do processing } } what will be the problem I am sorry to say that the problem still persists. I have set the truevalue of the checkboxcell to true before binding to gridview as DataGridViewCheckBoxColumn chk = new DataGridViewCheckBoxColumn (); chk.HeaderText = "S ...Show All
.NET Development Ping to get location
Hiya. I'm wondering if there's any way to send a ping command to an IP address or URL and be able to pinpoint the location of that address on the Earth. Please answer my question - VB.net would be great. Thanks. http://msdn.microsoft.com/msdnmag/issues/06/09/EarthlyDelights/default.aspx ...Show All
SQL Server Cannot open user default database. Login failed.
Hi I am developing an asp.net application in Visual Studio 2005. The application was displaying in the web browser as expected but now i get the following error appear. Server Error in '/EMPRINT_STREETSIGNS1' Application. The server stores the information of your database. The server is defined (as of definition in SQL Server) as a SQL Server instance. if you have problems connecting to one server (instance), because either the database does not exists (or you have no permissions with the user to access it) and you change the server (instance) name to another server (instance) you probably have the database installed on the latter one. So if you want to use the first instance you will also have to install the database on this machine and ...Show All
Visual C# Guide on Cross Threading
Anyone have a good guide on cross threading Essentially, I'm trying to access a Windows form control outside of the thread it was created in. Any help would be greatly appreciated. im not sure I follow. I basically want to call user.text.enabled = false within a thread but im getting the cross thread error. ...Show All
Visual Studio VS2005 Pro Setup Fails on Vista Ultimate
Trying to install and get the warning "Missing Required Prerequisites: Windows XP Service Pack 2" setup ends. Does anyone have a suggestion. Thanks Well this is getting old. Now fails because: [02/03/07,17:23:16] setup.exe: [2] ISetupComponent::Pre/Post/Install() failed in ISetupManager::InstallManagerHelper() with HRESULT -2147023293. [02/03/07,17:23:17] setup.exe: [2] Component error string not specified in ISetupManager::AddToActionResultCollection() [ 02/03/07,17:23:30] VS70pgui: [2] DepCheck indicates MSXML 6.0 Parser is not installed. [02/03/07,17:23:30] VS70pgui: [2] Unknown component status forMicrosoft Document Explorer 2005 [02/03/07,17:23:30] VS70pgui: [2] DepCheck indicates Mic ...Show All
.NET Development How MDBG process Unhandled Exception
Hi All, I use MDBG to debug a .NET application, which throws Unhandled Exception from some code. MDBG could capture it easily. It give below hints. STOP: Unhandled Exception thrown Exception=... ... ... This is unhandled exception, continuing will end the process But i want to let debuggee popup up an Unhandled Exception Dialog, then give the user a choice about whether continue or quit. It is the default behavior when CLR meet Unhandled Exception. When i debug the application within VS2005, it will popup the dialog. But when i use MDBG debug the application, then type "go", the process will end immediately. So i want to know how to modify MDBG to get the same effect as VS2005 Thanks ...Show All
Visual Basic My applcations always use about 15 MB of the memory ????!!!!
Hello, Every time I develop an application I face a real problem that my appliction is slow to open and it uses alot of megabytes from the memory. I tried an empty application and it used about 15 MB !!! SJWhiteley wrote: . .. you can try C or Assembler. Tell us how you get on in 12 months or so. ho ho! ...Show All
Software Development for Windows Vista Video with SideShow
Is it possible (or realistic) to run full speed streaming video of any kind with a sideshow gadget on an aux display What you are describing is possible, but there are a few considerations to take into account: The most taxing gadget that has been released to date is the Windows Media Player gadget. The now playing page in the WMP gadget is updated once a second to reflect the current track progress of the currently playing track. We have found that all of the Windows SideShow devices we have now can handle this scenario. With that being said, the way you would write a gadget to do what you describe would be by sending all of the images of the tachometer to the device (say 10 or so images), each wit ...Show All
Game Technologies: DirectX, XNA, XACT, etc. XNA - Microsoft lack of vision
Its real sad that Microsoft, once again, shows this lack of vision for a games development tool: 1: Get visual: Don't force users to write such a lot of code to do just very little. It reminds the Charles Petzold's "Hello Window" hell of code days. 2: Provide visual tools: Let users choose the components, change their properties and write just the required code for the events. 3: Quick development means quick prototype and minimum learning curve. XNA has a lot of things to learn. Definetively it is NOT for students and hobbists. We will have to wait until someone encapsulates XNA framework into a group of visual components, that can be easily drag & dropped, inspected and tested very easily without having to learn lots of n ...Show All
Windows Forms Automatic scrolling in Datagrid view
Hi I'm developing application in windows forms . and I'm using a datagridview control in my form. I'm filling it with data. I'm running a thread in the application which will modify the content (ex Status) of the Grid. I want to scroll the datagrid automatically, depends upon updation. Thank u Thanks Gavin But I'm not adding at run time I'm modifying already filled rows. while modifying in other thread, it should automatically scrollled. Thanks in advance ...Show All
