Stanley1271's Q&A profile
Visual Basic Root from a URL
I feel this question is a little silly.. I can't seem to find a method to get the root site such as this: http://www.microsoft.com/ from something like this: http://www.microsoft.com/downloads/Browse.aspx displaylang=en&productID=BEAE32B8-4A67-4F78-BF4E-C114F922F1EA So far, I've tried things like this: ToString.IndexOfAny( "/" ) without much luck.. please enlighten me :) Besides Regex you can play with the Uri class as well: Dim webAddy As New Uri(" http://www.microsoft.com/downloads/Browse.aspx displaylang=en&productID=BEAE32B8-4A67-4F78-BF4E-C114F922F1EA ") MessageBox.Show(webAddy.GetComponents(UriComponents.SchemeAndServer, UriFormat ...Show All
Visual Basic Information on working with services
Hello, I was wondering if anyone could point me in the right direction for writing a wrapper app that interacts with a service we're developing. All I'm looking for is a general management program akin to the way Microsoft SQL Service Manager works with the MSSQLSERVER instance, although a more in-depth look at interaction with services would greatly tickle my interest as well. For now, however, just simple syntax on how to start, stop, check the status, etc. of a service would be wonderful. I was wondering if it is possible to use the Site member of ServiceController/ServiceBase class to set the parameters for exchanging between the ServiceController and Service itself. MSMQ seems like a overkill. My ide ...Show All
Visual C# what is the difference between .cer/.spc and .pvk/pfx?
Hello, I'm trying to figure out what is the difference between this keys. regards, .cer - states for Certificate used for storing X.509 sertificate. This certificate contains informations about certificate owner, and also public and private certificate key. .spc - states for Software Publisher Certificate. This is just different representation of certificate in PKCS #7 format. You can generate spc file from cer file. .pvk - states for private key and is a private key from sertificate. you can extract the private key from certificate .cer file. Also you can create a certificate based on .pvk private key file. also file extension used with prevous ones is .ctl and this is certificate trusted list. About pfx ...Show All
Visual Studio Express Editions Web Browser validate URL
ok...i have another question about a simple C# browser... I found out that if i type something like www.google.com into the browser, it has an error, but if i have the "http://" it will work. So my question is, how do i detect if the person has typed "http://" or not, and then have the appropiate responses to those situations...i dont think that was clear :)...let me rephrase, suppose the person types http://www.google.com , i want that to go directly to the browser, but if the person types www.google.com , i want the browser to add "http://" Thanks, paoloTheCool :) try this . http://www.codeproject.com/vb/net/IE7_Clone_VS2005_Browser.asp more i will try by code.. hey i m gl ...Show All
SQL Server Partition object count estimate, and what if it changes a lot?
Hi, I am curious to understand the implication of setting an estimate object count in a partition aggregation setting or let AS do the count itself. What if the actual object count vary a lot from day to day, what if you set an initial cube on a small dataset then wait untill your dataset is 10 times bigger than the initial size while never revisiting the object count I do not get the rationale behind a static object count for objects that require a count. I feel like it will bite me. Could you put an expression instead like entering the default Count measure generated by the cube wizard By the way what is this default count for is it for this purpose Thanks, Philippe You might find som ...Show All
.NET Development XmlDocument System.Net.WebException Error
Here is the code that I have: rssReader = new XmlTextReader( file ); rssDoc = new XmlDocument); //Load the XML rssDoc.Load( rssReader ); If the file doesn't exist on the remote web server I get the System.Net.WebException error. Is there a clean and easy way to detect this page without having an error get thrown I have another project that uses HttpWebRequest.getResponse() but that also throws an error if the web page doesn't exist. I am stuck. Thanks for the quick reply but I wanted a way that wouldn't throw an exception. If the "file" was an actual file on the hard drive I could check File.Exists( file ). I wondered if there was something along those lines for the Web. ...Show All
SQL Server Example of Stored proc conflict resolver?
Hi all, I need to write a custom conflict resolver for an application using merge replication. It's relatively simple logic - compare the two rows from the publisher and the subscriber and the winner is based on the value of one particular column. Reading BOL gives me the input parameter list for the sp, and specifies that the output should be exactly the winning row. What is doesn't give is any example of how to do this, in particular how to access the two rows in conflict so that they can be compared. I can do this by dynamically building SELECT statements, one connecting to the table locally on the publisher and another connecting to the subscriber using the form SERVER.DATABASE.OWNER.TABLE, but this requires me to explicit ...Show All
Visual Studio Code Window Current Member
Hi, is it somehow possible to get notified when the type or member at the current caret position changes (Same information is displayed at the top of the code window - Types and Members). First I tried different things to get notified about changes of the current caret position (IVsTextLinesEvents) but that doesn't do the job. If I would be notified about caret changes I could use CodeElements to get the current symbol - so this would do the job as well. Thanks in advance, Thomas Hotz We do not have any way to do this. The best you can do is to pass the caret position to the code model, but this will not work in all cases since the code model will not return information that is within a method ...Show All
Visual Studio Tools for Office Error when opening VSTO sample project
I just installed Visual Studio Team Edition for Software Developers (with VSTO) and I'm trying to open a sample project I downloaded from Microsoft. When I open the .sln I get this error: Microsoft Office Outlook 2003 SP1 or newer is not installed on this computer. You must install a version of Microsoft Office Outlook 2003 that supports Microsoft Visual Studio 2005 Tools for the Microsoft Office System projects. The problem is that I do have Microsoft Office Outlook 2003 installed. It's SP2, which is what is recommended. It's configured and open. How can I convince VSTO that I really do have Outlook 2003 SP2 installed Thanks! -Jeremy Hi Jeremy Actually, for OUTLOOK I think only y ...Show All
SQL Server how to find vacant slot of rack
Dear All, i want to find no of empty rack(two dimensional ) . i am using sql2000 i have a rack of two dimensional where every slot is recognized by rowno and columnno now in every slot i placed item (captured by itemcode). nOw i want to find slot do not assing any item please give me some idea there is rackmst( where i define max_no_row and max_no_cols). Please help thanks Perhaps something like this would help: CREATE TABLE MyRack ( RowNo int, ColNo int, Slot varchar(10) PRIMARY KEY ( RowNo, ColNo ) ) INSERT INTO MyRack VALUES ( 1, 1, 'a25' ) INSERT INTO MyRack VALUES ( 1, 2, 'a24' ) INSERT INTO MyRack VALUES ( 1, 3, 'a23' ) INSERT INTO MyRack VALUES ( 1, 4, 'a28' ...Show All
SQL Server SSMSEE - simple question
Question: Can I install SQL Server Managment Studio Express Edition on Windows Vista Beta 2 If 'Yes' what steps do we need to take to overcome the ACL excpetions being thrown. Cheers, John I have tried installing SSMS EE available form here: http://go.microsoft.com/fwlink/ LinkId=65110 on Vista Beta 2 and it worked fine. Please make sure you get the question about running in full administrator mode when setup starts. If you do not see it, please save the installation package to your hard drive and than right-click on it and select Run as Administrator. The currently available version of SSMS EE will install and work on Vista for majority of scenarios, however you may experience some problems due to new secu ...Show All
Visual Studio SP1 silent install
How can i install VS2005 SP1 silently (with no prompting) I need this because of the Colossal amount of time it takes for this SP to install. I have to leave it running over night, but in the morning there is another prompt, and it sits there processing again for ages, and i just give up. Running it silently would let it install overnight by itself. Btw, why does it take so long to install (i gave up after like 2 1/2 hours; hit Cancel). Shouldn't it be like: dump the new dll's and content into the install directory using File.Copy :) there is a way to silently install SP1 I believe...but cant locate it! this is the unattended approach, it should be the same thing as the Silent install except this is ...Show All
SQL Server How can you force a password, from a sql login, to expire
How can you force a password, from a sql login, to expire I would like to use the password expiration feature for sql logins in SqlServer 2005. The msdn document provides example code for SqlClient SqlConnection.ChangePassword like in Bob Beauchemin's book. http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.changepassword.aspx There is a modify_date in the system view sys.sql_logins but that is read-only. Thanks, Karl If you enforce password policies from Windows 2003 Server one test should be enough. Just make sure to handle the appropiate codes like 18468 "Password Expired." and 18487 "Password has to be changed at first logon". HT ...Show All
Windows Forms How do I get, or change, the color of a pixel of an existing graphics?
I need to obtain the color of a single pixel of an existing graphics, then change it to something else. I don't want to save the whole graphics, which I assume would take longer. How do I do this You have to draw those graphics to a Bitmap then call Bitmap.GetPixel(X, Y) function it'l retun the color of pixel at specific location, for Changing it you can use Bitmap.SetPixel(X, Y); When you are done simply call Bitmap.Save(.......); to save the changed image to a Stream/File. I hope this will help. Best Regards, Rizwan aka RizwanSharp ...Show All
Visual Studio Express Editions Problem with WebBrowser1
Well, not so much a problem, just something I don't know how to do, if it's possible. I made, wrote, what ever ya call it, a Web browser. It works fine, but on some site when ya click a link or button it opens in a new window, thats when Internet Explorer kicks in. Is it posible to how those open in WebBrowser1 and not have Internet Explorer kick in at all also, how do I add an Add to Favourites to the Browser And if posible, How would do I add an option, if posible, to be able to set the Browser as the Default browser Am still learning program and still got a long way to go. am using visual Basic 2005 Express Edition. Thanx for ya help, very much apreciated. Hello ...Show All
