AndrewBadera's Q&A profile
Visual C# Anonymous Methods & Object Events
I never did like how I HAD to hook an event to a class method signature. If I wanted to hook an event to an object instance within a function, that I only needed in that function, I had to create an event handle in the class. Thanks to anonymous methods, I can create my event handler body in an anonymous method from within my code. The problem is that I don't know how to 'unhook' the handler from the event, because the even doesn't expose the multicast delegate. psuedo-code: [code language=C#] form_OnClick(...) { Something s = new Something(); s.SomeEvent+=delegate(object sender, EventArgs e){this.a = e.a;}; {...} s.SomeEvent.Clear() //How do I do this {...} } [/code] Thanks. ...Show All
Windows Search Technologies Indexing Options Not Retained For Drives
When I open Indexing options there is an Outlook folder. I add 3 hard drives to the Included Locations. WDS 3.0 starts indexing. Life is good until I reboot XPx64. The Indexing options are back to only indexing the Outlook folder. Any ideas Steve Bland Sorry, I thought the settings were being lost on boot, but the last time I restarted XP, WDS did not loose the settings. I will keep watching for a correlation of events, perhaps it is triggered by drive letter reassignment or initiating new drives as I have been doing a bit of that lately. The drives I expected WDS to continue indexing were not re-assigned, so I expected WDS to continue indexing them. ...Show All
Visual Basic Read and write a excel file using Visual Basic 2005
Hi, i need to read and write a excel file using Visual Basic of Visual Studio 2005. I try to do it like i had done before using Visual Basic 6 but it didn't work. Please give some ideas to do this Another article which shows communicating with an Excel spreadsheet is http://support.microsoft.com/kb/q301982/ ...Show All
Game Technologies: DirectX, XNA, XACT, etc. first 3D object
Hi, I was wondering how I can make a box, or any shape using Direct3D. I'm making my project in C# since it's simple and powerful. How do I make my project show a simple shape. Most objects are usually created via some 3d modelling package such as blender which you can get for free or 3d studio max (which is not free). It's how models are created like the ones you see in most of the newer games like Doom, Quake4 and so forth. PS: The other posters are also right on the spot :D I hope this helps. Take care. ...Show All
Visual Studio Team System How to end loadtest when test completes
I have a coded webtest which loops through and pull back information on 500 files. Playback of the single user test runs, on average, in under 15 minutes. Now I want to create loadtests of varying # of users to see how end time of the test run is affected. If I set the duration to 1 hour, the loadtest run for the full hour. Is there any way to end the loadtest after all of the virtual users are finished looping through the 500 files Thanks. ~ Lew 1. From the load test editor, set the Percentage of New Users under the scenario to 100. This property is used to control caching in a load test. For details on this, please read http://msdn.microsoft.com/vstudio/teamsystem/reference/techn ...Show All
Visual Studio Express Editions Serial Port -> How Do I now If it is used?! and Speedproblems
Hello there and happy new year from Germany! I have some troubles with my application whitch uses serial ports..... ....again:) Quite a lot of data are beeing sent through the serial port. When I start the next function while there is still data to be sent, I get an error. The solution would be: Knowing about data traffic on the serial port at the moment.Is there a way I can get the informataion Something like comport.datatobesent or something like that Oh: Yes: I am using 38400 baud at the moment, and not 9600. Is there another way to get the data faster to my serial port device Changing buffers or something I am thankfull for your help and hits... Greetings, Carsten You still haven't given us a good d ...Show All
SQL Server Replication with Dynamic IP
Hello my friends: 1. I want to know if is possible the replication (bidirectional) between several server with dynamic IP under a VPN (OPENVPN). That's recommendable 2. What happend when While the process of replication is run, the connection (between these servers) fall. Thanks 1. It is possible to replicate under a VPN. Please take a look at BOL topic http://msdn2.microsoft.com/en-us/library/ms152569.aspx . 2. If the connection fail, the replication agent will report failures and keep retrying. You should see these failures in agent log and in replication monitor. ...Show All
Visual Studio 2008 (Pre-release) Using Microsoft.Expression.DesignSurface.dll
Hi. Am I allowed to reference Microsoft.Expression.DesignSurface.dll in my project I'm trying to create some PowerPoint like application. The end-user should be able to place and drag elemets on a canvas. I found the framework Adorner implementation problematic for such uses (mouse and performace issues), and I'd like to use the Blend implementation, which includes rich model for it. Thanks. ...Show All
Windows Forms Inserting a Windows Form in the shell context menu
Hi, I've been able to add some simple string items to the windows shell context menu and also to use the user draw feature. Now I'm happy with that, I'd like to insert a VB or C# form to that menu. Can someone give me an idea about how to do it I'd simply need a function or a class name and then I'll go further by myself. Many thanks Bad news: you can't write Shell context menu handlers in .NET. Check this thread for the terrible problems if you do. ...Show All
.NET Development An error has occurred while establishing a connection to the server
We have a couple environments in our company, Local, Dev, Stage and Production. And we are running different technologies on all of them (from ASP to .Net 2.0 and SQL2000 to SQL2005). And only in our .Net 2.0 we get the following exception (only in our production environment) when establishing connections to SQL 2005 without connection pooling: "An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)" All our other application is able to connect to SQL2005 (64-bit) withou ...Show All
Visual C# enterprise library dll signed with strong name
does someone know where can i get the enterprise library dll signed with strong name in order to use it in my solution My solution is a winforms application and I have 3 projects on it: one project for UI, one project for Business Logic and another project for Data Layer,I ve created a strong name which I use for my whole solution, when I add the DLL of EHAB to my DAL project, I get an error which says EHAL dll must be strong name, but I ve already have defined a strong name for my solution, how can i add appropialy the EHAL dll to my project or do i have to add all the source of EHAL project that cames with Enterprise Library Best Regards Joseph Angulo Vega ...Show All
Visual Studio 2008 (Pre-release) winfx wizard framework
Hello, I'm using WPF to develop a wizard to guide users through a setup process. I'm trying to follow the vista guidelines. I came across a few postings on 'WINFX WIZARD FRAMEWORK'. So far I've gathered that it is a mix of WPF and WWF, sound very cool and useful. Would someone please explain what it is When is it going to be released. Is it already part of the CTP I want to know if I should wait for it or go ahead and hand code the wizard. Thanks Houman I had created a basic wizard for adding users using PageFunctions in the "Building WPF Apps" hands on lab for PDC 05. You can look at the sources here . Of course, this does not use Windows Workflow but doesn't have ( ...Show All
SQL Server Many-to-Many MDX
I have a measure called MyMeasure. There is a dimension called Account There is a dimension called AccountGroup that groups many accounts so it references the cube through a Many-to-Many relationship. The account group has a field called Group Level. If for example, I want to know the number of accounts for a region I would do something like this: SELECT {[Account Group].[Account Group].[New South Wales] } ON ROWS , {[Measures].[MyMeasure]} ON COLUMNS FROM [MyCube] WHERE ([Account Group].[Group Level].[Region]) This will give me: -------------------------------------------------------------- | Account Group | &nbs ...Show All
Visual Studio Team System WssTasks.XML and target filename
Hi, I'm trying to customising the filename under < documentLibraries > in the WssTasks.xml file. Is it possible to set the filename to the corresponding project Shortly, I want to prefix my files with project name. I tried to use the $$PROJECTNAME$$ variable the is used in the workitems.xml file, but got an error when uploaded the new template. See the example below: < file source = " Windows SharePoint Services\Test\[Project Name] - Test Plan.doc " documentLibrary = " Test " target = " $$PROJECTNAME$$ - Test Plan.doc " /> It it possible to get this automatically when creating new projects hey...i really confused...i found that the s ...Show All
Windows Forms Datagrid help - events & getting current row etc...
Hi guys, I have successfully added a datagrid to my project and bound it to a datasource. I have set it so that the values of my datagrid can be changed by the user, and this is what I want. The datagrid contains essentially two columns, for x and y coords. Their is a 3rd column on the far left, not sure what its called but it seems to contain the cursor indicating which row is currently selected. What I want to do is this: whenever the user selects a different row I want to set the x and y values in that row to the x and y values of a instance of point class. I am not sure what event to use, and a little hazy on how the code would go. If someone can help point me in the right direction I would really appreciate it. Th ...Show All
