Strini's Q&A profile
Internet Explorer Development The issue of 'Zoom' of 'Page'
Hi,all, When I try to use zoom in and zoom out of 'Page-Zoom' by pressing Ctrl+"+" and "Ctrl+ "-",elements of form and characters superposed each other. You can try to visite www.google.com and press ctrl+"+" after the page loaded. I have made a simple testing for that. a.Use a table to locate, 'Zoom' will work well:<html> <body> <form> <table border = 1> <tr><td><INPUT type="checkbox">aaaaaaaaaaaaaaaaaa</td><td>aaaaaaaaaaaaaaaaaaaaaaaa</td></tr> </table> </form> </body> </html> b.Don't use table tag to locate. <html> <body> <form> <INPUT type="checkbox">aaaaaaaaaaaaaaaaaa</td><td>aaaaaaa ...Show All
Visual C# How can I replace all occurance of a string except when it's enclosed with a special tag?
Hello, Let's say I have a variable named: someVar which contains the following: href wow nice this <a href="cp.com">cow duck john</a> text etc And I want to replace: "href" with "link". I can't do: someVar.Replace("href", "link"); Because that will change: <a href="cp.com"> ! So, how can I replace all the occurances of "href" when it's not part of an HTML tag Please help. hi, tangfx this will do the job string result = System.Text.RegularExpressions. Regex .Replace(text, @"( <=<\s*[ a ]\s*)href( =[.* ]>)" , "link" , System.Text.RegularExpressions. RegexOptions .IgnoreCase); in the previou ...Show All
Visual C# Calling base-class implementation of interface methods
Hi. Can anybody suggest how I may invoke the base-class implementation of an interface method from a derived class that also implements (overrides) the same interface method If I have this short and simplified situation: interface IMyInterface { void MyMethod1(); void MyMethod2(); } class HelperClass : IMyInterface { void IMyInterface.Method1() { /* Some default implementation */ } void IMyInterface.Method2() { /* Some default implementation */ } } class MyMainClass : HelperClass, IMyInterface { void IMyInterface.Method1() { /* Some specific implementation */ How can I call the base class implementation of this interface method (i.e. HelperClass.IMyInterface.Method1() ) // This ...Show All
Visual Studio 2008 (Pre-release) How to Initialize COM-Object and share it between WCF requests?
Hi all! I created a WCF service, which I host in a windows service. In the methods of the service I create a COM object and use it to get data or modify it. But it takes a long time (2-3 seconds) to create the COM object with the 'new' operator. I don't want to do it for each method call. When I create it in a constructor, then the constructor is also executed for each request. How can I share a COM object between all WCF requests Kaan Ozturk Hi Kaan, You're correct that you can use a singleton service to share data across all requests. You just need to make sure the ServiceBehavior attribute on your service class has InstanceContextMode = InstanceContextMode.Single. You can then initialize your ...Show All
.NET Development Programatically change XP Theme
Is there a way to programatically change the theme used by XP Thank you. Hi, Maybe you can find these articles useful : http://www.codeproject.com/managedcpp/ManagedUxTheme.asp df=100&forumid=16513&exp=0&select=1217662 and this one http://www.codeproject.com/csharp/xptheme.asp Hope this helps ...Show All
Windows Forms DataGridView Header in VS2005 (c#)
Hi, How do i give my DataGridView an overall Header. Ive found examples with row and column headers but i want to give it an overall header. The previous way to do it was using CaptionText for a Datagrid but i cant find a way with DataGridView. Any help would be much appreciated. Thanks. Read this post ...Show All
SharePoint Products and Technologies View Securiy Workaround
We are looking to present a published list of content (mostly documentation) in a SharePoint WSS 3.0 Site (not Portal Server) such that some of the content is open to the public and a subset is available only to internal company users. External users should search through a custom form and see only those records approved for public viewing. Internal users should be able to search through the same form and get results based on the entire population. Ideally there would be only one instance of each document and of each record pointing to the document. This list is meant to be solely a distribution tool and as such we have no use for all the normal “Document Library” functionality (check in / out, version control, etc.) We have ...Show All
Internet Explorer Development All events not fired when dialog box/context menu is shown in IE7
I have noticed that IE7 has different behavior on event handling than IE6. In IE7, the timer in this sample code will no longer be triggered when click on the 'Test' button (which show a dialog box). The timer also freezed when you right click on IE which shows the context menu. In fact, I have tested other events. All will not be fired. Any workaround Sample code: <html> <head> <title>Test</title> </head> <script language="javascript"> function OnTimer() { oCounter.innerText = parseInt(oCounter.innerText) + 1; } window.setInterval("OnTimer()", ...Show All
Visual C++ Ambiguity with protected/private conversion operators
Hi All, The example is (VC++ 2005): class MyClass { private : operator char *(); protected : operator long *(); public : operator int *(); }; int _tmain( int argc, _TCHAR* argv[]) { MyClass instance; instance[0]=0; // results in the following compilation error: /* error C2593: 'operator [' is ambiguous could be 'built-in C++ operator[(char *, int)' or 'built-in C++ operator[(long *, int)' or 'built-in C++ operator[(int *, int)' while trying to match the argument list '(MyClass, int)' */ return 0; } The question is: why does C++ compiler consider the conversion operators which are not available in the usage scope (char* and long* are not available in _tmain as they are in private/protected sections of the c ...Show All
Visual Studio Express Editions Ask a problem,about inheritance :)
Ask a problem,about inheritance :) ****************static DLL***************** <<<<<<<<<CmView.H>>>>>>>>>>> #pragma once class AFX_NOVTABLE CmView :public CView { public: __declspec(dllexport) CmView(); }; <<<<<<<<<CmView.CPP>>>>>>>> #include "stdafx.h" #include "CmView.h" CmView::CmView() { } ******************static EXE****************** <<<<<<<<EXEView.h>>>>>>>>> #pragma once #include "CmView.h" #pragma comment(lib,"dll.lib") class EXEView : public CmView { ........... }; <<<<<<<<<EXEView.Cpp> ...Show All
.NET Development Asynchronous socket reading using BeginRead
I have a question on reading data asynchronously from a socket. How do you know when all of your data has been received Below is a code sample taken from MSDN. This function will be called recursively until all the data is retrieved but how do you know when the last retrieval is Thanks Kurt private static void ReceiveCallback( IAsyncResult ar ) { try { // Retrieve the state object and the client socket // from the asynchronous state object. StateObject state = (StateObject) ar.AsyncState; Socket client = state.workSocket; // Read data from the remote device. int bytesRead = client.EndReceive(ar); if (bytesRead > 0) { // There might be more data, so store the data received so ...Show All
Smart Device Development Get Current Screen Name?
Can Any one please tell how to get the Current Active Screen Name in C#. Hope you can help Thanks Oh, so you just wanted an active window caption... I wonder how it would help you out Why don't you just put out a notification using Microsoft.WindowsCE.Forms.Notification class ...Show All
Visual Studio Team System Is there any way to make GetItems NOT to return itself as a child?
Hi, when I do a GetItems it returns the list of child Items for a particular path in TFS. However, it returns also itself. Is there a way for this NOT to happen Thanks Little tips like this one are unlikely to appear in the official docs. I'll tell you how I found it: I ran tf dir foo\* from a tf.exe window that had logging enabled, then looked at the SOAP call. The wildcard was passed directly to the server, so I knew it would work for the API too. ...Show All
Visual Basic Numbers and date format in Visual Studio Reports (.rdlc)
I am using an english version of visual studio 2005. I am from a spanish spoken country (CHILE!). Until now when I program, I can change the format of numbers and dates to the formats use in my country. The problem is that I need to format numbers in the reports that I create in visual studio. The reports are in the format .rdlc. I need that the numbers have as a decimal separator a comma (,) and as a number separator of thousands a period (.). In the case of date format, instead of showing the report the day "Monday, 12 of Febrary", I need to appear the name "Lunes 12 de febrero". How can I do this in my reports since I have a english version of the program Thanks in advance Mike ...Show All
Visual Basic How do I get number of days between 2 dates?
I have been trying to think of a way to get the number of days between 2 dates, for a program that I have been working on, and can't work it out, so could someone please help me with this. Hi, Example taken from the MSDN library help files. These are the System.Timespan or subtraction operations. [Visual Basic] Dim date1 As New System.DateTime(1996, 6, 3, 22, 15, 0) Dim date2 As New System.DateTime(1996, 12, 6, 13, 2, 0) Dim date3 As New System.DateTime(1996, 10, 12, 8, 42, 0) Dim diff1 As System.TimeSpan ' diff1 gets 185 days, 14 hours, and 47 minutes. diff1 = date2.Subtract(date1) Dim date4 As System.DateTime ' date4 gets 4/9/1996 5:55:00 PM. date4 = date3.Subtract(diff1) Dim diff2 As System.TimeS ...Show All
