Johnny Aywah's Q&A profile
.NET Development VB.NET Regular Expressions
What namespace or library must be referenced (imported ) to be able to use regular expressions in VB.NET I've seen references that they exist, but don't know how to reach out to use them. Class Regex doesn't have properties Pattern and IgnoreCase. You should use something like this regEx = New Regex( patrn , RegexOptions.IgnoreCase) retVal = regEx.Test(strng) ...Show All
Visual Basic StringTokenizer in VB.NET and highlighting
Is there anything like a StringTokenizer in VB.NET e.g. If I've got a String "artificial intelligence", how to divide it into two strings Another question is about highlighting particular words. e.g If I have a short text "He is a professor" in a Label. What I need to is to highlight the word "professor" by displaying it using different colour. split(" ") would split on spaces, for example. IT's a method on the string class. regex is your other option, but overkill here. To highlight, you probalby need to cut the string into three, and use the Measu ...Show All
Visual Basic Validating Event - Compare Current to Prior value
Does anyone know the procedure for finding the previous value of a field then running a validation event I want to be able to Compare the Current value to the Prior value. This is on Visual Studio 2005 - Visual Basic. Thanks You need to use the DataRowVersion method it has the following const: Current Default Original Proposed Public Enum DataRowVersion As Integer Member of: System . Data Summary: Describes the version of a System.Data.DataRow. This will allow you to compare the Current, original, and proposed values to be used in the datarow Hope that helps! ...Show All
SQL Server Results to File
Hi, I am using SQL 2K5 Enterprise and whenever I run a query and have the results spit out to a file the query takes a long time. Running a complex query and showing the results to grid takes 3 mins; having that same query run with results to file takes like 2hrs 45 mins. Anything special that is being done for the results to spit to a file Thanks When results are shown in the grid, the grid shows the first few rows that are returned as soon as possible while the rest of the results are spooled to disk in the background. This can make the query look deceptively small or fast. When results are se ...Show All
Game Technologies: DirectX, XNA, XACT, etc. DirectX 9, Internet Explorer and Security Exceptions
Hi all I originally had a difficulty with authoring a .net control derived from System.Windows.Forms.UserControl. My problem came when attempting to use the authoured control on a web page. The control would instantiate perfectly happpily but would throw a security exception evertime I tried to do anything with DirectX. Precise message was The action that failed was: Demand The type of the first permission that failed was: Microsoft.DirectX.Security.GraphicsPermission Which was thrown in response to Manager.CheckDeviceFormat( Manager.Adapters.Default.Adapter, DeviceType.Hardware, ...Show All
Visual Studio Team System Adopting Team System
HI We are a diverse Consultation firm operating in pakistan.We are opting for CMMI Level 2 . We are considering RUP and Team System for our processe improvement activities. Now we see following shortcomings in Team System: 1- It is is not yet stable,will get time to get stable ,about an year. 2- Final is to be realased at the end of this year and we can't wait..... Please clearify above assumptions . Hi, 1. IMHO, The first version of any new product is bound to have some issues - so I agree - it will take sometime for this product to stabilize. 2. Thats correct, VSTS is expected to be released in Q1 2006. Regards, Vikram ...Show All
SQL Server SQL Server Profiler and Sysmon monitoring local vs. remote
Most people have heard the suggestion to monitor a SQL Server from another machine because Profiler and Sysmon consume a lot of resources. Monitoring a server locally also introduces a Heisenberg uncertainty principle type of problem where the act of measurement alters the state of what is attempting to be measured. I heard a SQL Server MVP making a case for not monitoring remotely because of the network bandwidth demands. Are there situations where monitoring should be done locally Is there an exception to the rule of using another machine to monitor If network traffic becomes an issue then probably SQL Se ...Show All
Visual C++ Can I write a file longer than 2gb on ntfs disk using fputc etc. in VC++ 2003?
Can I write a file longer than 2gb on ntfs disk using fputc etc. in VC++ 2003 I have created AVI files larger than 2gb on XP-ntfs disk but none of the media programs (WMplayer. VirtualDub) can read them. Any suggestions where to start looking for the problem. Thanks, RON C I would suggest for starters that unless it gives you this ability especially, that you should not use fputc ( unless you're coding in C ). Use iostreams instead. I've done the same ,written files > 2GB and found they could not be read. The tail end of your question makes me wonder if you're really asking if the files you create can later be read ...Show All
Visual Studio 2008 (Pre-release) Canvas, Shapes, and Events. What's happening here?
I've noticed some interesting behaviour with events on a Canvas, and I was just wondering what is going on. I have a custom GridControl with a Canvas on it, that has a handler for the Canvas MouseDown event. uiElement.MouseDown += new System.Windows.Input. MouseButtonEventHandler (uiElement_MouseDown); I've added some PolyLines to the canvas, and I've noticed that if I click on the lines, then my event handler doesn't get called. So ok I add an event handler to the PreviewMouseDown event to see if I can get the event before it gets to the Shape, but that doesn't work. OK, I put a transparent Canvas over the top of it all, and I ...Show All
Windows Forms Install Error : The parameter is incorrect. (taskvisionsource_1.1.0.0.msi)
When installing taskvisionsource_1.1.0.0.msi, I'm getting this errormessage: "The parameter is incorrect". The installer then rolls back. MACHINE CONFIG: * Windows Server 2003 Standard RC2 Application Server mode : IIS 6.0, ASP.NET and FPSE working fine. * SQL Server 2000 Developer Edition * Visual Studio 2003 Final Beta PREREQUISITES: * I am Administrator on the local machine.  ...Show All
Visual Studio Express Editions Unable to update the database
Hi. I am trying to insert data in a form and the data is saved in the database. Currently, im using the VS 2005 Express edition. I used the connection string. Everything works well, but it seemed that the updated data is not saved in the database. Is there anyone who knows any solution to this problem This worked for me as well....What is up with this spuratic error ...Show All
Visual Studio Reportviewer doesn't print first time I click print button
I use a WindowsForm Reportviewer. C# 2.0 I generate the report and all is OK but when the user try to print (print button in toolbar), the application open the printdialog, I select the printer and press Ok. But the application doesn't generate a document. When I try again, all work fine. If I close the application and restart, occurs the same (first doesn't works, second works, all time works). somebody have any idea Thanks form Spain. Are you using the RTM version of the controls and of the 2.0 framework We saw iss ...Show All
Visual Studio 2008 (Pre-release) Username credential without windows account
Hi, I'm looking at the SupportingToken sample. The sample uses client and server certificates and then add a username password "on top" of this. The username and password must be those of a user on the client machine. My "users" will not be the a windows user on their machines.I s it possible to use an arbitrary username/pass Thanks If you want a username/password pair that's not a Windows account then you will need to subclass the UserNamePasswordValidator and override the Validate method: public class MyPasswordValidator : UserNamePasswordValidator { private ...Show All
Windows Forms Bindingsource.Filter Problem
I have a Windows Forms app with about 20 combobox controls on one form that are databound to a dataset from a SQL 2005 Express db. In addition to the comboboxes, I have one DataGridView that uses a bindingsource (MaintenanceBindingSource) as its datasource. I want to use the filter property of the bindingsource to filter records from the dataset based upon the value (text) of the SerialNoComboBox and display them in the DataGridView. I've tried the examples of the following code in the TextChanged event of SerialNoComboBox, but none seem to work: Me .MaintenanceBindingSource.Filter = SerialNoComboBox.Text MaintenanceBindingSource.Fil ...Show All
.NET Development recieve data from Thread
C++ .NET 2005 I used Thread with function of connecting to internet. And at first it was very good. I did so: using namespace System::Threading; static void myClass::connectToInet( void ){...} Thread *oThread = new Thread( new ThreadStart(0, &myClass::connectToInet)); But now I want "myClass::connectToInet" to return an int-variable. I changed the second string to static int myClass::connectToInet( void ){...} After that I have a mistake and can not compile my program: 'int myClass::connectToInet(void)' : the specified function does not match the delegate type 'void (void)' What shall I do So, the ques ...Show All
