hazz's Q&A profile
Visual Studio Team System checking event raise method
Basically I want to create a custom rule that checks that event raising method have the following structure (As you will see, we didn't see the point with the object sender, EventArgs e thing, so we decided to skip that...) protected void OnFoo( int foo, int bar) { FooEventHandler handler = Foo; if (handler != null ) { try { handler(foo, bar); } catch ( Exception e) { m_logger.Error( "Failed to do foo" , e); } } } For this, I figured that I'd override Check(Member member) cast to Method, then walk trough .Instructions Specific questions: - how do I know that the callvirt Invoke to handler(foo, bar) is in fact an event raising operation and not let' ...Show All
Visual Basic IDE adds decimals
Hi! This odd behavior started the other day and I can't seem to find why this is happening. Let's say I have a "dim myVar as single" When I type : myVar = 0.8F The IDE changes it to : myVar = 0.800000012F Any idea why this happens Thx! What addins do you have running What is the Regional format of your PC I can not find anything in the IDE that would cause this behavior ...Show All
Visual Studio Dates Changing to mm/dd/yyyy
I've got a report that i've done which has a formula that calculates the last sunday of each month. When i run this report in Crystal Reports XI:R2 the date displays as dd/mm/yyyy But when the report is run from an ASP page only that formula date changes to mm/dd/yyyy Any Ideas why it does this Have you checked the "regional and language options" settings in Control Panel (the icon that looks like a globe) Go to "Regional Options" tab -> "Customize" button -> "Date" tab -> and "Short Date Time" format. You might have different datetime format settings for your local machine and the server machine running ASP pages ...Show All
Software Development for Windows Vista Problems when designing Workflows "top down"
Over the last few days I have been getting to grips with windows workflow foundation for some "non trival" business workflows. I tend to take a top down approach, creating some stubbed out activities, dropping them into workflows then continuing to update the workflows and the activities that they contain at the same time. The trouble is, WF in visual studio doesent seem to like this approach. I get some particularly nasty errors if I do things like rename the workflow file or add new dependency properties to an activity after I have dropped it onto a workflow. I have had to resort to hacking thew xoml to try and delete activities from the design surface (which is no doubt making my problems worse). At the moment I am struggl ...Show All
Windows Forms J# request while installing a deployment project
Hi, I have prepared a deployment project for my C# project, but when i ran the setup, setup request VS J# redistributable package although I havent used J#. Why was this problem occured and how can i solve this thanks Weird. I would check the prerequisites and make sure J# is not selected. There was a bug in the Express products where there was an incorrect J# item listed. Another thing to check is whether you have any referenced .DLL's that are built using J#. ...Show All
Visual Studio Printing without viewing Rendering error
Getting desperate!!!!!!! I have been trying to print without preview and always receive an inner exception regarding no data source providede I am using visual studio 2005 standard edition using visual basic and have installed the Service pack 1. (program failed before installation and after installation. Data is coming from an Access 2000 data base The report displays and prints as advertised using the PrintPreview form, but fails without it. I copied code from walkthough and always get an inner exception on the line : report.Render("Image", deviceInfo, AddressOf CreateStream, _ warnings) The walkthough says: From the list box displayed on the .NET tab, select System.Drawing, System.Windows.Forms, an ...Show All
Smart Device Development how to create file
hi how to create a file at sd or mmc card The develop platform is c# .net cf 2.0. the sample code is better. thank you For Each directory As String In System.IO.Directory.GetDirectories( "\" ) ' E numerating all subfolders in a root folder... If (( New System.IO.DirectoryInfo(directory)).Attributes And IO.FileAttributes.Temporary) <> 0 Then ' P icking folders with Temporary attribute set... Console.WriteLine( "Found storage card: {0}" , directory) End If Next ...Show All
Visual Basic conversion wizard 2005
I downloaded the 101 code samples from the microsoft site. I went to load a few of them and the conversion wizard runs each time. I let it run and after it is done the solution is unavailable. There are no errors or warnings or any other indication to tell me what may be wrong. 1 or 2 of the files say converted but the project has not been converted. I am running 2005 standard edition. I admit I am a newbie to vs, but not to programming. Please lead me down a path that will shed some light on this problem. There are two sets of samples one for 03 and one for 05.....if you download the ones for 05 there should not be any conversion: 101 Code Samples for VB 2005 101 Code Samples for VB 2003 ...Show All
Visual C# problem about treeview in Dot net 2.0
When a treeview have too many node(more than 65536,maybe), it can not diplay it! I write a small programm to test it, the code is below: You can create a new window application and copy the code to test it. If the child node number is 65535 or 65536, the scrollbar of treeview is gone and the treeview acts strange! If the numer is 100000, id only display just mor than 30000 nodes. I have searched msdn for the information of this problem, but got nothing. Does treeview have limitation on number of its child nodes Or the problem is caused by the scrollbar of the treeview private void InitializeComponent() { this .components = new System.ComponentModel. Container (); this .AutoScaleMode = System.Windows.Forms. AutoSc ...Show All
SQL Server sp4 on dev edition 2k
I'm running SQL Server 2000 (Developer Edition) on an XP machine. I'm trying to apply Service Pack 4, which, though I haven't service packed SQL Server 2000 in a couple years (most recently working more in 2005), I have installed SPs against SQL Server without difficulty in the past. I've downloaded the x86 SP4 exe. I extact the package ... but when I got to run setupsql.exe from a command prompt, I get nothing -- no dialog, no apparent install. silent switch is NOT specified. Hi, I donot remember the threads but earlier i see the threads asking how to remove / delete registry information which is still their after Uninstallation , so i would suggest you to refer below links for Manual Install & ...Show All
SQL Server Overlay of textboxes are not rendering properly
In the page header I have a rectangle that has 2 textboxes on the same line and both are the full length of the page. One textbox has text centered and the other has text right justified. When I render report in Studio or print it, the text appears on the same line and justified like I want, but when the report is rendered when I call the report by URL, the textboxes wrap, like it's taking the width of each textbox in account. Has anyone seen this Any suggestions on how to overlay text on the same line and the text keep their own individual characteristics I am having this problem too. I have a template with a standard heading including one image and 4 textboxes. The template includes a boolean parameter ...Show All
Visual C# Exception Breakpoint on Application Termination
I am using C# 2005 Express edition. My application runs fine but on closing I get the following message (for some reason I can't take a screenshot of the dialog) The exception breakpoint A breakpoint has been reached (0x80000003) occurred in the application at location 0x7c90130 This happens in the debug version and release version. My first reaction was that I had left a breakpoint in the program, my second that it is related to the debug version. I am new to C#2005 and could not find any swicth to change the build type from debug to release so don't know if calling for a Build automatically created a Build version. I would like to get rid of it since it would be annoying for my users Thanks in ad ...Show All
SQL Server COLUMN GRAND TOTALS ARE INCORRECT FOR CALCULATED FIELDS IN VIRTUAL CUBE
Hello, We have migrated some cubes from sqlserver 2000 to 2005 with success. The applicaticon contains one virtual cube made up from 6 other cubes. On the virtual cube level we specified calculated fields. The calculation contains elements from different cubes which shares dimensions. while browsing the cube from within sql server management studio or from excel using OLEDb 9.0 Provider we discovered that the column grand totals for these calculated fields are incorrect. The row grand totals are fine. Searching the internet (google) i have found a hotfix describing the problem SQL MSAS 2005 ( http://support.microsoft.com/kb/918251 ). We have installed this hotfix on top of SP1 but without results. Is somebody familiar with this ...Show All
Smart Device Development static constructors in compact framework - size limit?
If anyone has seen this before, I would appreciate some advice or a workaround. I'm trying to use a static constructor in a class using several jagged arrays. I can add a few of them, and it works okay, but after a certain limit, the application either throws a "System.NotSupportedException" or a fatal application error 0xC00000005. I haven't found anything on the web, and the application runs fine on the desktop. I trimmed this down to make the jagged arrays readable, but it looks like a textbook example of static constructors. public class MainClass { static void Main() { huffcodetab.inithuff(); } } public class huffcodetab { private static int[][] ValTab0; private static int[][] ValTab1; ...Show All
.NET Development Debugging a windows service in VS 2005
HI All, I am having problems when debugging a windows in VS 2005 . Basically i created a simple widows service by adding a timer control to the service designer setting enabled to true and interval to 10 secs. On the timer tick event it just intializes variables etc. Added an installer , and altered the settings of the ServiceProcessInstaller1 to localsytem. Complied the .vbproj and through the VS 2005 Command prompt inserting the command installutil "path of windows service.exe" to install the service. Started the service from the server explorer and placed a breakpoint at the the timer1_tick event. The problem is that the event is never triggered. I also created a windows service in VS 2003 and all worked fi ...Show All
