Tony T.'s Q&A profile
Windows Forms Business days
I need to get only the business days of the week between two dates. Here's my code to add 10 days to a given date: string DateDocsRec = txtDateDocsRec.Text; DateTime dateTimeValue; dateTimeValue = Convert.ToDateTime( DateDocsRec ); System.DateTime today = dateTimeValue; System.TimeSpan duration = new System.TimeSpan(10, 0, 0, 0); System.DateTime answer = today.Add(duration); txtRecNED.Text = answer.ToShortDateStri ...Show All
Visual C# Cryptography
System.Web.Security; string value = "3131" in a web app. this function FormsAuthentication.HashPasswordForStoringInConfigFile ( value , "sha1") encryptes into a fantastic string of more than 20 meaningless characters.. I tried the same thing in windows application and it doesn't work. System.Security.Cryptography doesn't have something like that... anyone out there knows and equivalent to this function Yes, you can use System.Web.Security in your WindowsForms project. You just have to add a reference to System.Web to your project ;) HTH. Bye. PS: BTW, System.Web.Security is a namesp ...Show All
Game Technologies: DirectX, XNA, XACT, etc. DirectDraw: Full Screen App loosing focus and I can't restore!
Problem: When DirectX 7.0 app window looses focus and minimizes, I loose my surfaces (that's expected.) When I try to restore my window to full size, and call restore I recreate the DirectDraw flipping surfaces, and reload all my bmp for the surfaces. Before I can do any blt'ing, the window AGAIN minimizes itself and refuses to restore itself. I know it's not just my app. The "Windows 2000 Graphics API Black Book" and my older "Inside DirectX (for DX5.2)" do the same thing when recompiled. Neither is allowed to fully restore the window and usually result in lockup and/or failure. When I run from Visual Stud ...Show All
Visual Studio Express Editions Newbie deployment questions
Hello, Can an experienced developer please help me with a few questions.. 1. Do I need .net installed on computers (XP, 2000, win 98 )running my applications that were created using VBEE or VB 2005 2. Can My application run connected to a slq express db on any platform without the need of installing additional software Platforms include Win 98, XP, 2000 etc If I need to install drivers or other software please provide the details. Is there any otehr tips or tricks we need to know Thanks for your help... Joe The answer is no...when you deploy the application...it will car ...Show All
SQL Server Crystal Reports
I am working on a report in Crystal Report, I have a stored Procedure like this ALTER PROCEDURE [dbo].[usp_cust_by_activity] @carrier as VARCHAR(10) AS --drop table #custA --drop table #custPA --drop table #cdrall --drop table #cdrPrevMonth --SET @carrier = 'PR' --'PR', 'RG' SELECT DISTINCT fld_cust_id INTO #custA FROM tbl_cust_ld WHERE fld_ld_status = 'active' and fld_cust_id in (SELECT fld_cust_id FROM tbl_cust_ld_phone WHERE fld_carrier = @carrier) SELECT fld_cust_id, fld_btn INTO #custPA FROM dbo.tbl_cust_ld_phone WHERE fld_status = 'active' and fld_cust_id in (SELECT fld_cust_id FROM #custA) and fld_carrier = @carrier SEL ...Show All
Visual Studio vs appears to be hung when doing a 'get latest version'
each time i do a 'get latest version', the ide appears to be hung for several minutes. there is absolutely _no_ feedback about ss doing anything. the only indication of anything happening is my machines fan getting louder. when i click anywhere inside the ide, all open windows of the ide turn white. is there anything one can do to improve the performance in this area, or at least to get some kind of feedback about what is going on WM_THX thomas woelfer http://www.die.de/blog fyi: i just installed the ss service manually. works now; however, i haven't checked on the speed of 'get latest version yet'. WM_THX ...Show All
Visual C++ Mixing C and C++ MFC
Hello everyone! I am working on this project where I have to implement a decoder/video player. I have a decoder project written in raw C. It takes an encoded file as input and generates a decoded file. I have another project, a video player, which is an MFC implemented in C++. What I have to do is incorporate these two projects together. I have to decode a single frame and play it on the spot. Anyways, this introduction is just to get you guys in the mood. I already read some articles about mixing C and C++. I am still a newbie in Visual C++, but I pretty much understand whats is a MFC and how it works. Well i managed to fix all the syntax ...Show All
Visual Basic Form: Was using "set" in VB6 to choose form.
I just upgraded my VB6 project to .NET 2005. There is 82 files with 10 of those over 100k. I finally resolve 501 errors, 1488 warnings and I can "build" my code. I am missing one feature that was really important for me, the "set" form. My routine aways call the same form and I use the "set" to select the form depending on some parameter. There are 8 forms with all the same label and text. The only difference is in the presentation. It was very easy for me to copy a form from the original, move label and text around. Change color and some text if needed. And use any form just using the " ...Show All
Windows Forms VB.NET How to use OnMouseMove in independent Thread? Because otherwise, blocking of the other events
In the creation of my component ( a Listview 100 % drawing), I have a function Protected Overrides Sub OnMouseMove(ByVal e As MouseEventArgs) which complies when the mouse passes above. The problem: every time it has the effect of stopping all other active events in this control, Example a timer turns and increments a variable, as soon as I move the mouse&n ...Show All
Smart Device Development "My Company" by default in cab, no matter what Provider is set in ...PPC.inf
Hi, Following: http://msdn.microsoft.com/library/default.asp url=/library/en-us/dnppcgen/html/netcfdeployment.asp I made an installer for my pocket pc application. The application name is Qadds Mobile and I would like to install it as R Limited Qadds Mobile on the Pocket PC. For this I set the QaddsPocket_PPC.inf: [Version] Signature="$Windows NT$" Provider="R Limited" CESignature="$Windows CE$" [CEStrings] AppName="QaddsMobile" InstallDir=%CE1%\%AppName% Now I create the cab files, then create the installer and running it, I see that on the Pocket PC it is installing: My Company Qadds Mobile. Checking in the contents of the cab files, ...Show All
.NET Development How to Serialize a non Sertilizable object into Binary?
Hi , I have an object ObjXML of type XmlDocument (object may be of any non serializable class). I have to Serialize it into Binary. I know that XmlDocument does not implement ISerializeable. That's why according to framework we cannot serialize it. So is there anyway around to get this object (ObjXML) into Binary. I will be highly obliged to your help. Regards Muhammad Waqas Bashir The following uses a MemoryStream (just another way of doing it) [ Serializable ()] public class Custom ...Show All
Visual Studio Team System TF10216: Team Foundation services are currently unavailable
I finished the TFS install, with a lot of problems. I can connect to the server, however, if I go to "Team Foundation Server Settings | Security" I receive the following errors: Failed to query the source control global permissions for [SERVER]\Service Accounts Team Foundation Server foundation does not exist or is not accessible at this time. Technical information (for administrator) HTTP code 503: TF30059: Fatal error while initializing web service I also get error TF30177: Team Project Creation Failed when attempting to create a new project. ------------ Event Type: Error Event Source: TFS Version Control Event C ...Show All
Visual Studio Help reinstalling VS .NET 2003
I had Visual Studio .NET 2003 installed on my PC. I then wanted to install 2005 beta but it would not install until I uninstalled 2003. Now I need 2003 .NET installed again but now I can't. The "Windows Component Update for Visual Studio "NET" went ok. But when running setup I get this screen with nothing to select. http://img106.imageshack.us/img106/9174/vs1ow.jpg I tried running "Repair" but it said that it "could not access the network location \Msdn" Why it's trying to accss the network I don't know. Any ideas I really need to get 2003 installed and working. Thanks! ...Show All
Visual Basic Comparing 2 strings at character level
I am looking for a way to compare 2 strings and calculate the number of differences between them using visual basic Example compare "THE NETHERLANDS" WITH "THA NOTTHERLENDS" should give back an value of 4 based on 1) "E" in first string position 3 does not match with "A" in second string position 3 2) "E" in first string position 6 does not match with "O" in second string position 6 3) Extra character "T" found on position 8 of string 2 4) "A" in first string position 12 does not match with "E" in second string position 13 Can anyon ...Show All
Visual Studio Express Editions Buttons and Data Sheets
This project that I am trying to create was fairly easy for me to do in excel, however not knowing vb well I am having a hell of a time doing it in vb but this is a very fun and learning opportunity. Now on to the next portion of my project. I want to create 2 buttons: One button that will create a column that will combine with column3-5 and be added to the equation of Column 6 The other will create a column that will be added to other columns of its type and then create a Column of its averages. example: Cell 1 Job name Cell 2 Cat name Cell 3 A numeric value created by button 1 Cell 4 A numeric value created by button 1 Cell 5 A numeric va ...Show All
