YaktheHairy's Q&A profile
Visual C# Bitwise operators
I am really new to C# and am still learning its many idiosyncrasies. While learning how to code for the RichTextbox control (I'm reading the book "Beginning Visual C# 2005" from Wrox Press, I ran across this piece of code that has me rather stumped. I know it works but I don't have any idea how it works. After reading about bitwise operators it got me even more confused. The code checks the selected text and changes the FontStyle to Bold if the style is Regular or vice versa if the style is Bold. Can anyone please tell me what the bitwise And and the bitwise Or are doing I know there are "cleaner" and easier understood ways ...Show All
Visual Studio Express Editions Pretty listing (reformatting) of code
In VB6, I used to declare my variables like this: Dim x As Integer Dim iLongName As Integer i.e. All the types tabbed to line up. When I click "Pretty listing (reformatting) of code" in settings, it won't let me do this - and without "Pretty" switched on, the code is a mess (as a VB programmer, I'm not used to having to do things myself). Is there any way to configure this all or nothing option so I can get the best of both worlds John PS. Sorry if this sounds trivial. i guess the best place to ask this is vb ide forum http://forums.microsoft.com/MSDN/ShowFor ...Show All
Software Development for Windows Vista HowTo make a StateMachine Workflow wait for multiple responses
I have a state machine workflow. One possible state for the workflow is VerificationPending. Before I can leave the VerificationPending state, I need to wait for responses from multiple external systems. Once all of the external responses have been received, I need to check all responses internally and make a decision internally about what the next state should be. What would be the best set of actions to use in order to implement this solution I have done something similar by wrapping the SetState activities in an if-else activity. The condition on the if can evaluate your decision logic. One of the Se ...Show All
Visual Studio Team System Moving Team Foundation Server
Our organization is in the process of redesigning the server/network architecture, but since it is a very large organization the process moves extremely slow. My development team would like to go ahead and deploy Team Foundation Server within the current server architecture, but my question is how easy would it be to move to completely new servers when the time comes We would like to begin using the source control and process guidance capabilities with our current VS 2003 projects, and also begin to wet our feet with VS 2005. I realize that this is a Beta version with inherent risks, and that we need a golive license to ma ...Show All
Smart Device Development CF doesn't handle new lines as \r\n ??
I wrote a simple control which used the Graphics.DrawString method to draw some text. When the text contained a newline "\r\n" it would only display correctly when I ran the app on my desktop, but when I ran it on the Pocket PC emulator it displayed the newline as 2 square boxes. Unfortunately Enviroment.NewLine doesn't exist in the CF and I even tried using the Stringbuilder.AppendLine (it doesn't exist in the CF) or anything that could get me a valid newline. Is it that Graphics.DrawString() method in the compact framework that cannot handle newlines tried that already before, it does not ...Show All
Visual Basic DataGrid and Decimal with 0 value
I want to know how can I display the decimal type column in a DataGrid, when the value is 0, it can display "" (space). It now display the "0.00" Thank you. I am using DataGrid not DataGridView. Also where Can I find DataGridView Thank you. ...Show All
Windows Forms What happened to control array?
I've got a VB6 app which controls running multiple applications on a timer. Each app shares multiple identical settings, so many textboxs/labels/tabs etc, are in control arrays so it's dead easy to loop and save all the shared settings. It's also easy to add a new app, by doing not much more than adding 1 to the array I can't do that in vb.net!!! Any ideas how to do the same thing now This is a serious backward step! You mean I've got to write code to do it What a pain! Why was such a useful feature dropped It's going to take me a day at least to re-write this; Thanks Microsoft, you ...Show All
Visual Studio Team System Developer as a Persona
We are creating complicated component which will be used by other developers and by end users. Developers will embed this component into their applications, and end users will use this component by working directly with it. We have mapped groups of users to appropriate Persons, but the question is: should we describe developers as Persons In my opinion we should because developers just another kind of users of our component, am I right If they are your customers, you should! I want to take this opportunity to expand on the role of the business analyst and personas. If you have one customer (I mean a single ...Show All
Windows Forms New installation issues
Hi, I downloaded the server (Beta 1) for Terrarium. I am checking both the database and web site checkboxes on the installation wizard. The installation starts and I get a progress bar that moves along. However before I get to the end of the installation I get the following error: "Exception occured while initializing the installation: System.IO.FileNotFound ...Show All
.NET Development Exporting COM+ 1.5 Problem
Hi all, I have developed a C#2 .Net COM+ Server Application using System.EntrpriseServices.ServicedComponent. It is a server application and it uses Role Based Security. It also uses a couple of 'private components'. All are working fine on the development machine. But when I tried to use the Component Services' Application Export Wizard to deploy to another machine, it gave the following error when I tried to generate the MSI (I am exporting this as a server application): "An Error occurred while processing the last operation. Error code 800706BE - The remote procedure call failed. The event log may contain additional troubleshooting inform ...Show All
Windows Forms Stored Procedure Failure
I have the following stored procedure to insert new users into a database. CREATE PROCEDURE spWebUsersInsert @strUserID char(10), @strPassword char (10), @strDescription varchar (50), @strAccessLevel varchar(20) AS INSERT INTO WebUsers Values(@strUserID ,@strPassword ,@strDescription ,@strAccessLevel) GO I'm using the following code to submit the data to the stored procedur ...Show All
Visual Studio Team System Backing Up Team Foundation Server
Now that we've actually gone live with TFS, we need to back up all our data. I'm trying to follow the instructions here , but when I try to go to: http://teamsystem:8080/bisserver/Registration.asmx it comes up with: Server Error in '/' Application. The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. Requested URL: /bisserver/Registration.asmx The name of our Team Foundation System server is "TeamSystem". I sup ...Show All
Windows Forms Adding nodes to a treeview dynamically
Hi I have a main Form with a treeView...and some nodes which are populated from a database....I have an Add New Node Form with an add method that adds a new node to the database...Obviously I have to reload from the database before I see the new node added. Now I want the node to be added dynamically...... This is in the Add form that&n ...Show All
SQL Server I want make table 4 like this one in SQL server 2005
I Have 3 table Like this: Table 1: Name = Tbl_Mian_code M_Code Master_Code Master_Name Main_Type Main_Gruop Main_Txt 1001 1001 Bank 01 01 1002 1002 Cash 01 02 1003 1003 Good's 02 01 Table 2: Name = Tbl_Mian_code Id_2 Main_Code Sub_Code Master_Code Master_Name Sub_Txt 1 1001 0001 1001 0001 Bank_Visa 4 1001 0002 1001 0002 Bank_234 5 1002 0001 1002 0001 Cash_1 6 1002 0002 1002 0002 Cash_2 7 1003 0001 1003 0001 Nokia 9 ...Show All
Visual FoxPro Select Statement
Basically i want to create a view that calculate the stock end balance using moving average. On entry invoice the prg would create txn on a table item_txns that store all txns that affects the balance. The problem is the sale txns only store the qty but does not store the cost of good sold. This would be calculated on the fly when users query and want to see the cost of good sold . I want to do this using SELECT statement, The fields are common for stock txns date itemid txn_type qty   ...Show All
