pmak's Q&A profile
.NET Development [Best Practice] Verify a value is part of an enumeration
What would be the best way for verifying, upon converting an int to an enumerated type, that the value actually exists in the enumeration Ideally, this would work with [Flags] and non-[Flags] enumerated types. A case statement would work, but is clearly undesirable, unless one does some sort of code generation. Perhaps checking int.TryParse((EnumeratedType){int value}, out dummy).ToString()) would work, but that seems awfully kludgy. I'm not particularly thrilled with using reflection to test enum values, so I think I'm back to either manually coding verification routines or using some sort of code generation. What would be really nice is an option to have the compiler turn Enum.IsDefined into the most ef ...Show All
Visual Studio 2008 (Pre-release) Cider Release Strategy
Is Cider (and all the .Net 3.0 project support) going to be released as an addin to VS 2005 or is it only going to be released in the next version of VS (Orcas) Steve Marco Goertz - MSFT wrote: No, Cider is not included in the full VS Orcas September CTP, but we are about to transition into the VS Orcas branch soon. As Mark said, new functionality in Cider will become available in future VS Orcas CTPs, but I cannot tell you at this point when they will start to include Cider. The continuing Fidalgo CTPs are supposed to help bridge that gap and deliver versions of Cider that are compatible with the corresponding WPF CTPs. Does this mean I can't code for WPF anymore using VS 2005 T ...Show All
Visual C++ The problem is : after I install this driver protocol, I can not find it in the system service of control panel.
I am using windows 2000 DDK to develop a network protocol driver program in vc, I build a proto.sys , then I install this proto.sys as a network card protocol in the native connection property. The problem is : after I install this driver protocol, I can not find it in the system service of control panel. Can you tell me where I can find it and how to start it and stop it manually Thanks. Please use the newsgroups at http://msdn.microsoft.com/newsgroups for such issues. Folks there should be more familiar of similar topics. OTP Thanks, Ayman Shoukry VC++ Team ...Show All
Visual Studio Express Editions Getting and displaying the build version
Hi, I am semi new to VB.net and am building a program that actually works! What I want to do is to display the build version in my form that VB gives the form automatically. How do I do this I dont want anything fancy just build:1.0.0.1 or what ever it is at the time. Thanks Actually, if you use Windows explorer and find the file, doing a properties on the "exe" should show two things: Both File Version and Assembly version under the version tab. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Are these videos still usefull?
http://www.microsoft.com/events/series/msdnvideodev.mspx Are those videos still usefull for using XNA (the basics) and will there be similar XNA videos released Thank you for your time. Yeah Im pumped. I remember filling out a survey from Gamedev about MS and asking about what I knew about tourqe, since then I guessed MS was doing something like it. Will be exciting! ...Show All
Visual Basic Collection key regional settings german umlaute
Hi newsgroup, greetings from Germany. I've a simple vb.net 2005 code-snippet: Dim x As New Collection x.Add(0, "Muller" ) x.Add(0, "Mueller" ) I found out, that sometimes the snippet runs (as compiled exe) without any problems, sometimes not. Adding an item with the key Mueller, when the key Muller exists, may raise an exception. It depends on the regional settings (German Windows XP Regions- und Sprachoptionen). The sort-option Telefonbuch (DIN) raises the error, Worterbuch doesn't. Is this behaviour a bug I think so, because a string should not be converted into a system string using a special sort-setting before it is used in a collection key. What do you think about it Sorry, but I do ...Show All
SQL Server Invalid Row Handle and Row Data Can Not Be Sent Errors
SqlCeReplication repl = null; try { String strDBFile = Path.GetFullPath("xxx.sdf"); repl = new SqlCeReplication(); repl.InternetUrl = "http://xxx/tempsqlce/sscesa20.dll"; repl.InternetLogin = "xxx"; repl.InternetPassword = "xxx"; repl.Publisher = "xxx"; repl.PublisherDatabase = "xxx"; repl.PublisherLogin = "xxx"; repl.PublisherPassword = "xxx"; repl.Publication = "xxxx"; repl.Subscriber = "xxx"; repl.SubscriberConnectionString = "Data Source=xxxx.sdf"; repl.PublisherSecurityMode = SecurityType.DBAuthentication; ...Show All
SQL Server My "On Update" Trigger reacts also "on delete"
In SQL Server 2005 Express I created a trigger which should edit a value in another table when a special tupel column has been updated. The funny thing is, that it also fires on delete...of course not what I wanted. what did I do wrong Thanks in advance! ALTER TRIGGER dbo.update_history_users ON dbo.[user] AFTER UPDATE AS IF UPDATE ([name]) BEGIN DECLARE @old_value nvarchar ( MAX ), @new_value nvarchar ( MAX ); SELECT @old_value = name FROM DELETED ; SELECT @new_value = name FROM INSERTED ; UPDATE dbo.history SET user_name = @new_value WHERE user_name = @old_value; END The source could also be found in the data layer of your appli ...Show All
Visual Studio Vss data store
When Vss will use sql server like data store How Can I set up Visual Source Safe 6.0 into Visual Studio 2005 (ASP.NET 2.0 Project) Ever Since I start referring on it I always got references to MTFS (MS Team Foundation Services) and/or Visual Source Safe 2005. Imagine I just wanted to work the same way as I did in VS2003 by integrating VSS6 into it, so that I don't need to open VSS6 day in day out. And can be able to checkin/checkout/getlatest from VS2005 itself. ...Show All
Visual Studio Tools for Office Ok... resolution...
Hi. I've been developing Office solutions int .Net for about a year now. My company had some proprietary code that was letting us place user controls in Word (Document Map) but it's time to phase that hack out with Office 2007 coming. So I downloaded VSTO (the version currently distributed) and installed it. Then I started looking around for code samples how to attach a custom Actions Pane. It appears that if I start an Word 2007 project in VS2005 there is ActionsPane but if the project is for Word 2003 - there is no such property and no obvious way of getting a public property that would do. I'm not sure if I'm doing something incorrectly and it seems more and more frustrating after 3 days of digging around. After initial atte ...Show All
Windows Forms My Question about virtual drive
I'm sorry if this is a stupid question. I want to create a virtual drive, then I use it as a remote file drive (my file is hosted on ASP.NET server) by using Web Service. But I don't know how to do this in .NET. Can you help me I'm waiting for all answers... This question has nothing to do with Windows Forms programming. Please post at forums.asp.net ...Show All
SQL Server database diagram in server explorer
I've created a connection to an SQL 2000 server in an asp.net 2.0 web application using Visual Studio 2005. When I view the database node in the server explorer, it doesn't show the database diagram node. Is there something I need to load to make this node appear Thanks. You might want to post this question to the Visual Studio group. I can't recall if this facility is version dependent. They would be able to better answer your question. Terrence Nevins SQL Server Program Manager ...Show All
Visual Studio Express Editions How to create a LIB
Hi VB experts, I'm creating a series if small programs that will use several classes and user controls that I've created. I'm at a loss on how to package these together so that they can easily be used in the programs. From what I've read, I believe that I should create a library to contain all these elements. I am also confused as to how this is related to a namespace. I need a kick start on how to create a library in VB Express. Your assistance would be greatly appreciated, thanks. Hi Grandpa, I'd create a new project and make it a DLL project. For you multitude of applications give then a reference to you new DLL. The DLL will have a NameSpace Like Grandpa If yyou have a Class call textWrite it's addressed eve ...Show All
Visual C++ label1->Text
Form1 got 1 label, then i create another class, there have 2 files that class.cpp and class.h. Ifi want to change the label1->Text = S"ABC" in Form1. How do i can use label1->Text in class.cpp to change the label1->Text = S"XYZ" I think there is an alternative: either pass the label to your function, like this: class MyClass { public: void MyFunction(Label ^ label) { label->Text = “My text”; } }; Sample usage: MyClass c; c.MyFunction(label1); Or make a function which returns the text, and let the caller to set the label’s text, like this: class MyClass { public: string MyFunction() ...Show All
Smart Device Development Needs to support ARM DSP opcodes out of the box (or, Welcome to the 21st Century)
The DeviceEmulator 2.0 Community Tech. Preview has gone live, at http://www.microsoft.com/downloads/details.aspx FamilyId=13F5DE85-30CD-4506-9C5B-A2068FA1EE9E&displaylang=en . V2 has: Much improved performance DEComInterfaces.idl - the COM interface to the emulator, along with sample code showing how to use DMA to communicate between a Windows app and an app or driver running inside the emulator. This is the DeviceEmulator's equivalent of the "Building DMA Drivers for the Windows CE.NET Emulator" article at http://msdn.microsoft.com/library/default.asp url=/library/en-us/dncenet/html/builddmadriver.asp . An eXDI driver for Windows CE Platform Builder 5.0, giving you a hardware debugger interface to the emul ...Show All
