Greenies's Q&A profile
Visual Studio Team System Any hints of migrating 1.32 custom rules to work with 1.35?
Is there anything i need to do to a 1.32 rules (besides compile it against .Net 2.0) to get it consumed correctly by FxCop 1.35 The rule compiles correctly, but when FxCop trys to load the rule i get the following error Unable to load rule assembly 'c:\program files\microsoft fxcop 1.35\Rules\MyCompany.FxCop.Rules.dll': Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. It loads just fine in FxCop 1.32, on a different server, compiled against .Net 1.1. No offense taken. It has not been a stated goal to ship a stable public API the last 3 - 4 years. We're only now looking at this option for Orcas. So to suggest we're simply slow in getting ...Show All
.NET Development Question about BinaryReader?
when I call a function, say ReadSingle(), will BinaryReader read just 4 bytes from the file or it will read a large chunk of data from the file at a time and cache it and only return what I am asking I am trying to read/write a large file (50-->100MB) from/to a network drive. I am trying to find an optimal way to do it. Any suggestions would be appreciated. Thanks, hdp. I'm sure it does, at a minimum the network driver would need a buffer to store the packets. ...Show All
.NET Development NullReferenceException when using MethodBody in reflection
Hi guys.. I'm going mad! If I run the following code: Imports System.Reflection Module Module1 Sub Main() Dim A As Assembly = Assembly.LoadFrom( "D:\windows\microsoft.net\framework\v2.0.50727\system.drawing.Dll" ) Dim T() As Type = A.GetTypes For Each Ty As Type In T Dim M() As MethodInfo = Ty.GetMethods For Each meth As MethodInfo In M Console.WriteLine(meth.Name) Dim body As MethodBody = meth.GetMethodBody For Each b As Byte In body.GetILAsByteArray() Console.Write( "{0:x}" , b) Next Next Next Console.ReadLine() End Sub End Module I get a NullReferenceException on "body" variable. While de ...Show All
Software Development for Windows Vista WebserviceInput and Enum in interface definition will not bind to properties
I run into the followinf problem using a webserviceInput that implements an interface for me. The interface has the following prototype: public interface ITripApproval { ApprovalStatus ApproveTrip( string from, string to, int cost, TimeSpan duration, TripReason reason); void VoteTrip( string tripid, ApprovalStatus status); ApprovalStatus GetTripApprovalStatus( string tripid); } Now when I want to bind the ApproveTrip method to a webserviceInput activity I will see that it will let me bind the properties for the parameters from, to, cost and duration but the TripReason property will give me an dropdown box where I need to select the value from the enumeration. Now I don't want that parameter to get a fix ...Show All
.NET Development Context.Session is Nothing after Server.Transfer
Hi I am writing some HttpModule code to implement URL redirection, in order to remove querystrings from my URLs, so the search engines won't croak. The server.transfer works fine (in that it transfers me to the correct URL), but within the new page (the one being transferred to), 'context.session' is nothing. If I execute that same code by calling the URL directly (ie, without using the HttpModule to redirect), then context.session is fine. Here's the code for the HttpModule... ************** start of code ****************** Namespace MyNamespace Public Class HelperClass Implements IRequiresSessionState End Class Public Class HttpModule Implements IHttpModule Private m_application As HttpApplication Private ...Show All
Windows Forms DataGridView - Replace column with my DateTimePickerColumn
Hi I have a database with one table containing: - id (int) - name (string) - date (DateTime) Now I fill a DataSet with the data in the database using OleDbDataAdapter . Then I connect the DataTable (inside the DataSet) to my DataGridView: - datagrid.DataSource = dataset.Tables[0]; I then created a DateTimePickerColumn (inherits from DataGridViewColumn ). (The control works fine) Now to my question. How do I replace the "date" column to be a DateTimePickerColumn Do I have to: 1. Hide the "date" column. 2. Add a new column (DateTimePickerColumn) 3. Implement code for copying data between 1. and 2. I want DataSet.Update() to work with DateTimePickerColumn . Anyone :) / K ...Show All
Software Development for Windows Vista What is Windows SDK?
Is that another name for MFC I wrote an MFC application several years ago, and back then, it was easy to get documentation on functions and methods in MFC. Nowadays, it is ridiculuously difficult. All I want is to be able to search for functions and classes in MFC. Why is Microsoft making this so difficult Short answer: to find the answer to questions about using MFC, or really for any Microsoft development technology, MSDN is your best place to look. MSDN has over 500,000 pages of documentation on development of all types. I found the MFC reference beginning here: http://msdn2.microsoft.com/en-us/library/d06h2x6e(VS.80).aspx The Windows SDK is a combination of the former Platform SDK (PSDK) and .NET ...Show All
Visual C++ Using OLE automation to call another application
I am using VS.NET 2005 to build a Windows Form Application (not MFC). I found a ACL editor program from codeproject.com which I want to incorporate in my application. It has two dll files, FilePermsBox.dll and FilePermsBox.Interop.dll In section "16. FilePermsBox API" of the article http://www.codeproject.com/win32/accessctrl4.asp , it was mention that the author has rewritten wrappers to allow the program to be called using OLE automation. I have little knowledge on OLE automation and hence I just tried adding FilePermsBox.Interop.dll as references. This allow me to compile the following code. array <String^>^ fCollection = gcnew array <String^, 1>{ "C:\test.txt" }; ManagedSecurityBoxWrapper::IManagedS ...Show All
Visual Studio Express Editions CType Trouble
I am trying to make a small amount of code save me from having to manually write everything out. What I have is this so far Dim Box As CheckBox = CType (sender, CheckBox) Dim W As Integer = 1 For W = 1 To W = 7 If CType ( Me .Controls( "rC" & Box.Name.Substring(W)), CheckBox).Checked = True Then CType ( Me .Controls( "rW" & Box.Name.Substring(W)), CheckBox).Checked = False ElseIf CType ( Me .Controls( "rW" & Box.Name.Substring(W)), CheckBox).Checked = True Then CType ( Me .Controls( "rC" & Box.Name.Substring(W)), CheckBox).Checked = False End If Next W I want it to check if rW1 is checked, and if it ...Show All
Visual Studio Express Editions MSDATASRC Version 7.0.3300.0
I have written a program that works perfectly on my computer. However, when I try to execute the program on another computer, setup fails because the subject assembly is not found. What do I need to do to get the subject assembly on another's computer Will appreciate any and all help on this. Thank you. Try using the publish features of VB Express to create you setup - which will include .net 2.0 as a requirement and install it if its not already installed. It makes deploying applications much simpler. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Any chance of a Shared Source?
For such a fundamentally awesome framework, I think a lot of people could benefit from seeing a sample implementation of it. Is there any chance of XNA (only the Windows version, of course) being made Shared Source Maybe, but I'm doubtful.. I think your best chance at getting a look at the source is running Dis# or any other MSIL disasambler over the framework.. I've never tried it myself, and I'm sure Microsoft wouldn't be too hapy if you did.. ...Show All
SQL Server How to split a transaction table to create training and testing set for AR
Hi all, I have a transaction table that has a composite key made up of transaction id and product id. where multiple products were purchased under same transaction, transaction ids got repeated. I would like to split the table randomly into 70%, 30% ratio to create training and testing set respectively in such a way that it does not split a same transaction under which multiple products were purchased (rows with same transaction id should not get split). is it possible if possible what is the idea It would be of great help. Thanks. Fakhrul Hi Jamie, are you refering to checksum trick or the SSIS trick In my case, the transaction table is both the 'case' and 'nested' table. Can you pl ...Show All
Software Development for Windows Vista Custom Human Workflow Activity
I am in process of developing my own human workflow activity by extending Activity base class. But there is one scenario that I am unable to solve. Let us suppose we have 2 different human steps in a workflow process, say step A and step B. The workflow gets routed to human step B after completion of human step A. Depending on some business rules I should be able to reactivate step a. How can I achieve this The default activity automaton does not allow an activity to be brough back to Execution status when it is already closed. Thanks for all the help in advance. Bala Thanks for the reply again. But I was wondering if there is a clearner way to do this. This solution might get messy in complex scenarios. I am not s ...Show All
Visual FoxPro How do I creat a print button?
How do I create a print button in Form of VFP9 that will print only the current record Will appreciate and thanks in advance... Thank you very much all of you It works perfect now but what's the right place to write this code before where it say "DELETE" or after.. and also when I double click on grid's record within the Form, it won't show or refresh the Form. (It's a one Table Form that has a grid on one side) Is there any way to update the information in Form by cliking the grid record ...Show All
Windows Forms MULTISELECT ON OPENFILEDIALOG
I have an open file dialog on a form, and have the multiselect set to true, but I can still only select one file at a time. Any ideas Larry Hilley Are you sure you have multiselect property set to true Can you post some code The typical use would be: string [] files; using ( OpenFileDialog dialog = new OpenFileDialog ()) { dialog.Multiselect = true ; if (dialog.ShowDialog() != DialogResult .OK) { return ; } files = dialog.FileNames; } foreach ( string file in files) { // Process files here } Andrej ...Show All
