Chris Lang's Q&A profile
Visual Basic Region/Xml-comment Text Color Bug
I found this weird bug the other day, which colors the text describing a #Region or an Xml-comment that is collapsed. The bug can be recreated like this: 1. Create a Project(e.g. VB Windows Application, the only one I tried) . 2. Create a #Region in the code and name it something, preferably a long string for more colors. 3. Collapse the region so that only the name of it is visible. 4. Place the input cursor above or in front of the region. 5. Press Ctrl+X until the line containing the collapsed region is cut to the clipboard. 6. Finally press Ctrl+Z to undo the deletion. -The description of the region should now be colored. Note: I have not found this bug to cause any damage to the project or source files. The coloring will disappe ...Show All
Windows Forms formating an excel column when exporting a data grid
I used code from msdn to create an export of a datagridview and a microsoft help desk tech helped me fix a problem with the export to form all fields to a "Text" type Dim oCol As Object oCol = oSheet.cells.item(1, hc).EntireColumn oCol.NumberFormat = "@" But I need to format some of the columns to a Number id if hc = "passcnt" then format it as a number not a text where can I find info on the different values for numberformat for the xls object Open up Excel to a blank sheet, on the menu click Format > Cells... and make sure the Number tab is displayed. Pick one of the predefined formats and then click Custom at the bottom of the list to se ...Show All
Software Development for Windows Vista Custom composite activity
I am trying to build an activity that contains some default business logic, but also includes the option for users to drop more activities into it. The problem is that I want to hide the default business logic activities, while still showing the user added activities. I have created this as a composite activity and have tried many designers. The closest solution so far has been a composite activity with a SequentialActivityDesigner. This allows activates to be added to it by users, but if I then add my business logic activities with my ActivityToolboxItem CreateComponentsCore, they will show on the activity. I have tried making my business logic activities hidden by overriding the isVisible property, but the still take up ...Show All
Visual C++ Directory select popup window
how can i get a directory select popup window in VC++... also i need to split a pathname into directory and file name ... is tere any function available.... thanks viorel... actually i was developing an appln.. in which i should get user choice by displaying a directory select popup window... i couldnt get ur answer ... iam developing my appln by c++ coding... so pls tell me briefly ... ...Show All
.NET Development How to find the last occurence of <p> within a textblock tiltled <h2>??
I have html files with the following structure: <h2>article title</h2> <p>paragraph 1 - bladiblah di blahblah</p> <p>paragraph 2 - bladiblah di blahblah</p> <p>paragraph 3 - bladiblah di blahblah</p> <p>paragraph 4 - bladiblah di blahblah</p> <p>paragraph 5 - bladiblah di blahblah</p> <h2>article title</h2> <p>paragraph 1 - bladiblah di blahblah</p> <p>paragraph 2 - bladiblah di blahblah</p> <h2>article title</h2> <p>paragraph 1 - bladiblah di blahblah</p> <p>paragraph 2 - bladiblah di blahblah</p> <p>paragraph 3 - bladiblah di blahblah& ...Show All
Visual Studio 2008 (Pre-release) Input validation
Hi, I would like to perform input validation before a service method is called. I have attributes on the MessageContract of the service that decides how validation should be performed, but would like to perform this before the actual method is called. I cannot do validation before the request values have been put inside an object of my MessageContract type. Is there an event that is suitable for this An interface I can implement Some samples on the net If you're using MessageContract's, you can define its members as properties instead of fields, and do the validation in its setters, like in the example below. Is it the case [ MessageContract ] public class MyMC { int age; [ MessageBodyMember ] public int ...Show All
Visual Studio Express Editions Accept-encoding : gzip
How can I utilise the Accept-encoding : gzip in the following bit of code when i attempt to put it in the with loop it gives a "Operator '-' is not defined for type 'System.Text.ASCIIEncoding'. " error message Code Dim LoginReq As Net.HttpWebRequest = Net.WebRequest.Create(domain & "/gamex/DepositFundsPopup.do;jsessionid=56q4bge77qwj2" ) With LoginReq .Method = "POST" .Accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*" .ContentType = "application/x-www-form-urlencoded" .UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0 ...Show All
Software Development for Windows Vista Intel(R) 82801ER SATA RAID Controller
When I want setup Vista RC1 from DOS, I will need to install raid driver. When I put floppy into floppy-drive, setup begin copy driver-files to HDD, when I will seen "blue screen" with error. This driver was worked correctly in Vista Beta 2. How can I correct this problem. Hello, What is happening is a ‘name collision’ where the Intel(R) 82801ER name is the same as used by iastor.sys. When the collision occurs we sub in the Vista driver and in this case the machine would bugcheck with a 7E. The good news is this has been bugged and addressed in a later build. Thanks, Louis Shanks ...Show All
Visual C# Generating all possible character combinations
Hi everyone, I just wanted to know if you have better ideas on generating all possible 4-character string combinations in C#. Something like: aaaa aaab aaac ... zzzz What i have in mind right now are nested for loops. I wonder if there is a .Net function for automatically incrementing characters/string. Thanks a lot. -Ver Thanks for the tip, anomolous. Yes, I did try that solution using Stringbuilder but somehow, I still would need to use nested for loops. Nothing wrong with that but I guess I couldn't generate a dynamic number of characters with the algorithm. Currently I have this block, where alphabet is a char[] and tester is a String. ...Show All
SQL Server 2 sql server
Hi In the company i work for we have 2 net and 2 server (server 2003) In the same net we have a net-harddisk where server 1 and server 2 can save data and so on we have a sql server on server1 and another sqlserver on server2 Now is the question: Can i have a database on the net-harddisk and then attach this dabase to sql1 and sql2 Regards Alvin Hi, one slight correction / addition, it is possible, but as H. already said not preferable to do this. You could enable la trace flag to make it working, but as network storages are in comparison to a local storage unreliable you should consider storing the data on a local hard disk driver or a certified SAN rather than a plain Shared folder on a network st ...Show All
Visual Basic click and drag, howto?
How to click and drag a component, such as textbox for windows application and smartdevice app I'm sorry..but it still got an error 'Location' is not a member of 'System.Windows.Forms.MouseEventArgs'. I try to change e.location with textbox1.location > no error! but I can't find the the textbox events such as MouseMove, MouseDown, Mouse Up still need help, thx ...Show All
Smart Device Development Deleting Folder
Hi, I am newbie. i want to delete the folder. suppose folder contain subfolder and files. when i use the RemoveDirectory function it delete the folder when it is empty. and DeleteFolder function need namespace IStoreNamespace. how i use namespace in MFC windows device application (C++.2005). is there any other Method for deleting the fill folder Thanks -Salman hi, how to use rmdir _rmdir( \\My Documents\\abc\\ ); i wrote this line in the code and include direct.h file but it give the linker error like test.obj : error LNK2019: unresolved external symbol _rmdir referenced in function wmain Windows Mobile 5.0 Smartphone SDK (ARMV4I)\Debug/test.exe : fatal error LNK1120: 1 unreso ...Show All
SQL Server Retrieving description from DTS
Hi, I try to retrieve information about Package Stored in Meta Data Services . I don't have any problem with those who are in stored in SQL SERVER but I'm not able to get thoses in Meta Dta Service Packages Could you help me please ...Show All
Visual Basic Help - cant refresh rows in datagridview!
Im struggling to refresh my datagrid after updating its datasource from a different form. On Double click of the datagrid a new form is opened to edit the record, once the details in the form have been changed I need to get the datagrid to refresh and show the new detaisl(either a new row or changed record). I know the database has been changed but it will not reflect in the datagrid(note I have tried datagrid.refresh), I have also tried calling the sub which populates the datagrid but with no luck. Any ideas Hi, Thanks for the reply. Unfortunately this isnt working for me, ive managed to set the reference to the baseform ok however when I try and call my populate dataset code from within the child ...Show All
SQL Server Type mismatch when deploying AdventureWorks Analysis Project
I get the following error when I try to deploy the sample AdventureWorks Analysis Project solution - Error 3 OLE DB error: OLE DB or ODBC error: The following system error occurred: Type mismatch. .; The following system error occurred: Type mismatch. .; The following system error occurred: Type mismatch. .; The following system error occurred: Type mismatch. .; The following system error occurred: Type mismatch. .; The following system error occurred: Type mismatch. .; The following system error occurred: Type mismatch. .; The following system error occurred: Type mismatch. .; The following system error occurred: Type mismatch. .; The following system error occurred:& ...Show All
