dhoops's Q&A profile
Windows Forms How to validate date in the text box?
Hi I have textbox in a windows form. If the user enter the date higher than the present date (today) then message box should display (warning message) to the user. I am using VB.net I don't want to use datetimepicker or calender. The code will be more appreciatable Advance thanks And with exactly which part are you having problems What have you tried so far (Eg: show us code where you handle the TextChangedEvent, DateTime.Parse the text and MessageBox.Show("problem").. (Or add an ErrorProvider to your form...)) ...Show All
Visual Studio 2008 (Pre-release) Hard to do exact positioning.
I've just learned the basics of WPF and XAML but I find it very hard to do exact positioning in my programs. I've found out that you can use a Canvas and then use the item .SetValue( Canvas .LeftProperty, double); -function to place things, but thats a real hassle. Adding another canvas inside a canvas with exact layout doesn't work at all. I'm looking for the easiest way to place things X% from the left (relative from the usercontrols left edge, not the windows) with a width of Y%, i want my programs to work in fullscreen on all resolutions. Could you please give an example of how to animate a percentual ColumnDefinition Width. I had a similar problem like the OP and never managed to get anim ...Show All
SQL Server What is Best way to Count the number of records in a table - Sql Server 2005
I have a table with 54 million records But it take lot of time when i am using Count(*) or Count (ColumnName). What is best way to Count the records in Sql server 2005 Regards Vasanth select count(*) , select count(1) and select count(field) will all be the same. Try it, you will see. I am very happy to be wrong on this though If you want up to the minute counts that return very fast, look at creating an indexed view with the count in, inserts will take longer with this, but it depends on what your requirements are. I have a table with 235525 rows, this is that stats : SQL Server Execution Times: CPU time = 47 ms, elapsed time = 43 ms. (1 row(s) affected) Table 'FilePlanItem'. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Removing Title Bar
I've done some searching but can't find anywhere on how to create a window with no title bar. I've seen windowed applications not have title bars. Is this possible with the XNA Framework and what magic do I need to add to my game There does not appear to be anyway to modify the window style in the beta and since you don't have access to the underlying windows form its tough to hack aroud it. Sounds like a request to add into connect http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=682921&SiteID=1 ...Show All
SQL Server Encryption related overflow?
Recently restored a SQL 2000 database to a SQL 2005 Server. The database contains a series of user stored procs (one calls upto 5 other sps) which are all encrypted using 'WITH ENCRYPTION' clause. When run on SQL 2000 Server this runs without error. When run on SQL 2005 Server it reports an error: Msg 565, Level 18, State 1, Procedure SPDM_MP1_SOURCE59, Line 5143 A stack overflow occurred in the server while compiling the query. Please simplify the query. Investigating the error line reported does not reveal any problems with the sp and the error line number reported is not always consistent. However, altering the stored procs so they are not encrypted and it all runs without error. Is there a compatibility issue running SPs e ...Show All
Software Development for Windows Vista Tracking and Dependency Properties
I have recently changed one of my Custom Activity Properties into a Dependency Property so I can use DataBinding. However, now my tracking is messed up. The same property is used in both UserTracking and ActivityDataExtract, but the actual data that is emitted to tracking is just the Type Name of the property and not the serialized object itself. Now I have also made other changed that could have caused this, but anyone know if this sounds familiar or problematic Thanks, Dave ...Show All
Visual Basic Skipping lines in a test file
I routinely work with text files with well over 3200 lines of text. I am trying to write a routine that will parse the file and skip lines (example every 3 rd line) and save the new smaller text file. I am not a college kid trying to get someone to do his homework for him. I am just trying to teach myself to write simple programs that I find useful. I have 5 or 6 VB.Net books and have not seen this topic in any of these books or the net, does anyone have any tips or pointers to get me moving in the right direction Here is one way to do this: Dim i As Integer = 0 Dim sBuf As String = Nothing Dim fsRead As New StreamReader("BigFile.txt") Dim fsWrite As New StreamWriter("SmallFile.txt") While Not fsRe ...Show All
Visual Studio Crystal Reports
Is there a way to set a report to print automatically and have a date parameter passed in when printing. I don't want to create an .exe if I don't have to.... Cheryl I would try putting Application.StartupPath + "MyReport.rpt" into a string, and making sure that string is the path to the rpt file, if it isn't, it's not gonna work. ...Show All
SQL Server XML source drops data - can I fix in XSD?
XML looks like this: < xml version="1.0" standalone="yes" > <hist key="ABC"> <r date="2006/04/21" time="08:53:04" seq="1029">123</r> <r date="2006/04/21" time="09:21:40" seq="1613">123.25</r> <r date="2006/04/21" time="09:37:22" seq=" 89">194.21</r> <r date="2006/04/21" time="09:37:22" seq=" 91">194.21</r> <r date="2006/04/21" time="09:37:22" seq=" 93">194.22</r> <r date="2006/04/21" time="09:37:22" seq=" 95">194.22</r> </hist> In SSIS it reads all t ...Show All
Software Development for Windows Vista Timers in a Workflow hosted in ASP.Net
Hi I'm building a web based workflow application and need to monitor the progress of the requests entered into the application and if a request hasn't been actioned after a period of time; send a notification email. I've read several posts and bloggs that state the Persistence service is responsible for monitoring Workflows that are in an idle state and then responding to delays within the Workflow that expire. I realise that because of the nature of ASP.Net the runtime is unloaded after each call, so I'm confused as to how, if the service isn't instantiated, it can perform this task. Thanks for any help. DB So if no one is using the application (over night for example) and a delay expires the ...Show All
SQL Server How to manipulate with list field from Code
Hello, I have a question. I need to manipulate with list of fields that dataset returns programatically from Code. Can I do it FE I have stored procedure that for param=1 returns 10 fields, and for param=2,3 returns 5 fields. Is it possible create list of fields programatically Thanks ...Show All
Visual Studio 2008 (Pre-release) Binding TextElement.FontWeightProperty of TextRange to a ToggleButton
Hi, I am trying to bind the TextElement.FontWeightProperty of a TextRange to a ToggleButton which can used to display and also setting/unsetting the FontWeight of the selected text to FontWeights.Bold. But I am unable to figure out how to do this binding, since the FontWeightProperty is not directly on the TextRange object. Would appreciate any useful suggestions on this. Thanks You can use EditingCommands to do this: <Page xmlns ="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x ="http://schemas.microsoft.com/winfx/2006/xaml" > <StackPanel> <Button Content ="Toggle Bold" Command ="EditingCommands.ToggleBold" ...Show All
Visual Studio Express Editions illegal else if statement?
Hi. I'm relatively new to programming and I was making a program for class to display a "receipt". This involved the user to input the amount of cashed tendered and I had an if / else if statement for if the amount was less than the amount owed. However, each time I try to compile, it tells me I have a illegal else if statement and I just can't figure out why! Here's the code, hopefully someone can help me out. Thanks. #include <iostream> #include <string> #include <iomanip> #include <stdlib.h> using namespace std; int main() { //DEFINING VARIABLES string itemOne = " " ; string itemTwo = " " ; string itemThree = " " ; ...Show All
SharePoint Products and Technologies WSS 3.0. Should I upgrade?
Hi, We have got WSS 2.0 installed with TFS v1 installation. Ever since we are using this system for our document library and collaboration. While using the system we discovered many issues in WSS 2.0 that can cause data loss. Given below are two main issues: 1) If a user (intentionally/unintentionally) deletes a document in WSS 2.0, all its versions get deleted with no option to recover. 2) It allows a second user to checkin document that is checked out by first user. That too without first user's knowledge. Now that WSS 3.0 is out, I'm wondering if it makes any sense to upgrade Does it solve issues like above Cheers! D2 Andrew, Thanks for your post. I was going through the various blogs from TFS and WSS ...Show All
Visual Studio VSTudio installation - trial version
I downloaded and burnt the image file to a DVD - the installation page: http://www.microsoft.com/downloads/details.aspx FamilyId=B2C27A7F-D875-47D5-B226-E2578A116E12&displaylang=en says (in additional info) that the file can be extracted by nero but I am unable to extract the file. Any input Thank Do I have to use iso buster - will nero not extract the image file I have VWD express already installed and am trying to edit a very simple website (need to modify menus) that was designed using Visual studio. Will the express version suffice I have not been able to edit changes ie add or delete sub menus in express. So I am trying to install VWD Can the website (designed in asp) be ...Show All
