0xDEAD's Q&A profile
Visual C# Disposable Pattern: disposing at finalize-time
According to the Ressource Management Whitepaper and the disposable pattern described there: public void Dispose() { Dispose( true ); GC .SuppressFinalize( this ); } ~MyType() { Dispose( false ); } protected virtual void Dispose( bool disposing) { if (disposing) { //dispose-time cleanup } //finalize-time cleanup } it seems to hint, that I should not call someMember.Dispose() at finalize-time but only at dispose-time. If someMember is a TextWriter how can I make sure that TextWriter.Dispose() or TextWriter.Close() is actually called if the user of MyType forgets to call Dispose(). This is imporant since the TextWriter might still contain data that has not ...Show All
Audio and Video Development Does anybody know how to create wipe effect?
Does anybody know how to create wipe effect I have a menu page with button animation and would like to create an effect to unmask the buttons from left to right when coming into the menu. I have tried animating width of the button_div, but not working. The buttons shows up as soon as the page get loaded. Thank you. It works now. But the width doesn't hold. My xml: when EFFECT button is on focused <cue select="id('Menu')" dur="2s" fill="hold"> <animate style:width="1px;1920px" /> </cue> Note: Menu is menu button div that has initial width=1px ...Show All
Visual Studio Tools for Office Word MAil Merge Automation (MailMerge.execute)
In the following code If I use WordDoc.MailMerge.Execute() it opens up another documet named FormLetters, Question is what's use of WordDoc.MailMerge.execute Private Sub DoMailMerge() Dim WordApp As New Word.Application Dim WordDoc As New Word.Document Try WordApp.Visible = True WordDoc = WordApp.Documents.Open("c:\mydoc.dot") ' Template no merge inside this document only fields WordDoc.MailMerge.OpenDataSource(Name:= "c:\sqlserver.odc") 'Perform Merge 'WordDoc.MailMerge.Execute() 'Do I Need this statement. Mail merge still works without this WordDoc.SaveAs(strFileName) Catch Finally WordDoc.Close(False) WordApp.Quit(False) WordDoc = Nothing WordApp = Nothin ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Where is the Directx forum gone ?
Can someone help me to find the "real" msdn directx (graphic, sound, ...) forum I used to work with it but I cannot find the link anymore. A few weeks ago, there was a link to it on the main dx page. I've got threads still open on those forums. Thanks These DirectX forums have been going for over a year - I'm not sure what you mean by the real forums. If you mean the newsgroups microsoft.public.win32.programmer.directx.* then you can find them with outlook express or google groups http://groups.google.com/groups/dir &sel=33607115&expand=1 ...Show All
SQL Server How to convert a bit string to 0x number?
hi, I have a bit string like '000111010101101110000111' , how to convert it to varbinary format like 0x1D5B83 Thanks. If you have a table of numbers then you can do this easily in a SELECT statement. Here is some code to create such a table and two solutions: one general SQL Server version and another using CTE. select top 8000 identity(int, 0, 1) as N into Numbers from sysobjects as o1 cross join sysobjects as o2 cross join sysobjects as o3; alter table Numbers add primary key (N); -- General SQL Server version: select '0x' + max(case hb1.p when 5 then hb1.v else '' end) + max(case hb1.p when 4 then hb1.v else '' end) + max(case hb1.p when 3 then hb1.v else '' end) + ...Show All
Visual Studio What are the limitations on evaluating expressions in 2003? (and now VS2005)
Hi everyone, Here's what I'm trying to do: I have a lot of static/global data in a given project that I'd like to access from a type-inspection addin DLL (used through autoexp.dat). There are plenty of examples of how to add your own inspection routines, but none of them cover how to augment that output with some other data from the program. For example: imagine a string table that is accessed by index. I'd like to intercept the index type and spit out the associated string from the table. I'm pretty sure there isn't a direct way to do this from the addin DLL since I don't have an address for the global table to query. There's the VSHelper code on CodeProject that uses a VS addin and EnvDTE to query a known global memory array ...Show All
Visual C# Difference between VisualC#.NET and C#
Hello All, Just a basic question. I am seeing several books called VisualC#.NET , C#, C#.NET What is the actual difference between those What is the relation ship between C# and dotnet. Please give me the concept Thanks, John C# is a langauge. It is not, intrinsically, specific to any vendor or platform (provided garbage collection is available) Micrsoft Visual C#.Net is one compiler for that language, one written by Microsoft for use creating .Net applications (Console, WinForm & WebForm) Essentially, it's the difference between a "Car" and a "Ford Tarsus". The one really caveat to that is the fact that Micrsoft Visual C#.N ...Show All
Windows Forms Enumerate types in designed form's assembly
Hello. I'm creating a control which has a System.Type property. I would like there to be a dropdown in the property grid listing available types. Is it possible, from inside my derived UITypeEditor class, to get a reference to the assembly of the form shown in the designer so I can enumerate the types in it using reflection ...Show All
Visual Studio Tools for Office State of Confusion
Problem I have a VSTO application fully working and actively used since March on a consumer's desktop. Recently the VSTO application, an Excel document with the VSTO custom Action Pane using Remote assemblies has failed on that desktop. Yet works on another computer as well as my development machine. The problem manifests itself as if the machine does not have prerequisites for VSTO installed. I get the cannot find File or assembly name Microsoft.VisualStudio.Tools.Applications.Runtime and the Action Pane never comes alive. The only thing I can think of is that the user installed a third party add-in to Excel and that may be blocking...but it shouldn't..... Any Thoughts See actions tried so far. Factors File or assembly name Microsof ...Show All
Visual Studio 2008 (Pre-release) TemplateBinding or the other binding?
Hello, I want to define a button template. I need to paint a rectangle with the same width and height as the button using this template. But the XAML below does not work. If I set rectangle width and height to absolute values, it works, but I need to have it bound to canvas width and height. What binding do I have to use Thanx RostaB < Style x:Key = " ButtonStyler " TargetType = " {x:Type Button} " > < Setter Property = " Template " > < Setter.Value > < ControlTemplate TargetType = " {x:Type Button} " > < Canvas Name = " Canvas " Width = " {TemplateBinding Property=Width} " Height = " {Templa ...Show All
Game Technologies: DirectX, XNA, XACT, etc. PIX and ID3DXSkinInfo::ConvertToIndexedBlendedMesh
Hi When I run my application through PIX ID3DXSkinInfo::ConvertToIndexedBlendedMesh fails with: ConvertToIndexedBlendedMesh: The input mesh, pMesh, does not have the same number of vertices as the skin info class But it does not fail in Debug mode or release mode. Is this a bug somewhere or am I doing something wrong Hello, PIX seems to have problems with some of the Mesh APIs. I will look into this and try to get it fixed for a future release. Thanks, -Mike Anderson PIX Development Team ...Show All
Smart Device Development Installing VMNet
Hi, Searched the forum but can't find an answer to what is probably a simple problem. I am trying to run the Standalone Device Emulator 1.0. It requires installation of the VMNet device emulator. I installed the driver, it shows up in the Add/Remove program list, but it doesn't appear in the network connections. When I run the emulator, I don't have an option to connect to VMNet, so it appears the service has not started. I don't see a VMNet service listed, so I don't know how to start it. I'm missing something here. Your help would be appreciated. Jeff There will no adapter there listed VMNet. VMNet driver takes its name from current network card name. You are connected to correct network card. You can v ...Show All
.NET Development Server connection timeout
Hi guys, I am using the code below to connect to a server. This works fine on all the machines I have ever tried to connect to but a new server has recently been added on which it seems to timeout randomly. It would normally take 8secs to connect & retrieve information from a server but this takes 2 minutes on those random occasions. I believe that it may be the server timing out & responding a bit late as it might be busy or something.How could I possibly work around this and find out what is wrong I am using a third party SSH library to connect. I would appreciate any help StringBuilder output = new StringBuilder(); //SSH connection from 3rd party library (SSH2) //SSH Reader from 3rd party Socket s = new ...Show All
Smart Device Development Creating your own icon
I used the VS2005 icon editor to replace the MFC icon with an icon for my app, that shows up when I see the large icon (programs list), however when it's a little icon (file explorer) it's still the MFC icon. How do I change the little Icon to match my big icon no replies Do you not understand Is it not possible (unlikely) Please tell me what information you need me to clairfy to solve this issue ...Show All
Visual Studio Tools for Office Office add-ins not running on clients
Hi I've recently developed a office add-in for powerpoint but the add-in doesn't load, I'm using the installer included in the package and the client does have vstor and interop assemblies installed. If I make an application on the client using visual studio and making a debug or release, it runs fine. Thanks // Lasse Most probably your application on the client is not granted the permissions to run. Here is the latest link to VSTO deployment guide: http://msdn2.microsoft.com/en-us/library/aa537173(office.11).aspx ...Show All
