Deepak Hota's Q&A profile
Visual C# Custom Attribute and it influencing all my controls.
Hi, I have a custom attribute in my library (OnOffAttribute, to turn off or on a property) and it's behaving a little oddly. Basically, all my controls use common classes for their drawing and such. I do not always need certain properties in these common classes, so i created an attribute (which is is used through ICustomTypeDescriptor and a custom TypeDescriptor) to do this based on (very vague) information found on the web. The thing is, that if i set, for example, my "DisplayBorder" property to be 'off', it is off for ALL controls that use the common border class instead of just the control i set it to be off for. The border class is always instantiated in each control using the 'new' command and as thus i figured it'd be off ...Show All
Software Development for Windows Vista Webcam settings
Hi. I'm developing some WebCam-based applications using DirectShow.NET. Now I can't find any information about... window. I guess it's "standard" window (requested trough COM object ). For example, Skype and AMCap shows the same window when requested (well, only title differs, and XP styles...). How it is made Thanks. Are you using the stuff from http://DirectShowNet.SourceForge.Net If so, check out the Capture\DxPropPages sample. --- Co-Author DirectShowNet ...Show All
.NET Development Is this only possible in XPath 2.0
I can't fugure out how to write an xpath to do the following in xpath 1.0: Doc < Plane > < Seats Number =" 1 " Window =" No "/> < Seats Number =" 2 " Window =" Yes "/> </ Plane > I would like to concatinate the @Number & @Window fields on each node set returned Desired Results: 1^NO 2^Yes The problem is if I use concat in xpath 1.0 I only get a single string result. Any ideas I guess this may be simplified to translate(concat( normalize-space(concat(/*/*[1]/@*[1], ' ', /*/*[1]/@*[2])), '
', normalize-space(concat(/*/*[2]/@*[1], ' ', /*/*[2]/@*[2])), '
', normalize-space ...Show All
Internet Explorer Development Window pops up behind parent window
Hello, I'm opening a popup window with Javascript as follows: <script language="Javascript"> function openWin() { window.open('somePage.html', 'newWindow', 'toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=375,height=325'); } </script> <a href=openWin()">click to open window</a> Usually the window opens fine, in front of the parent window, but sometimes it opens up behind the parent window, and users don't know that the window opened up at all. This only occurs intermittently, and only in IE7. I have never encountered this problem in IE6. I do not have any idea what is causing this problem because I seem to be doing the same thing each time. ...Show All
.NET Development IPX under C#
Hello, I have to write an a C' application supporting the IPX protocol - to get a socket I would use _server = new Socket ( AddressFamily .Ipx, SocketType .Dgram, ProtocolType .Ipx); but I'm suckt with the Bind function - how I'm setting the EndPoint for a Networkcard. I'm onliy find the IpEndPoint and so on but nothing for IPX - may someone could help me This is what happens on the bind An unhandled exception of type 'System.NotImplementedException' occurred in system.dll Additional information: This method is not implemented by this class. ...Show All
.NET Development Tranforming XML Column Data to Relational tables
Hi, I want to transform XML data to relation tables. I have a table with XML type column. I have XML schema in XSD file. For reporting purposes i want to extract the data and want to fill it in relational table. Depth of XML tree is 6 (it's using complex type). Some leaf Complex types are enumerations. I am thinking of using SSIS for this purpose. I want help on this issue. how to start wid and which one would be best approcah. All suggestions are welcomed. Thanks in advance. Hi, If I were to load an XML into relational format and if there are few different types of XML files then I would probably won't think about using technologies that are outside .NET. I would rather ...Show All
Visual C++ Cannot read data from Access 2007 database
Hi. I’m trying to read data from an Access 2007 database. I’m working with VS 2005 C++ on Windows XP SP2. I downloaded the 2007 Office System Driver found at http://www.microsoft.com/downloads/details.aspx FamilyID=7554F536-8C28-4598-9B72-EF94E038C891&displaylang=en and installed it. My MDAC version is 2.81.1117.0. I’m using ADO (msado15.dll) to acces the Access database. Here is a simple sample code. void CAccess2007Doc::OnFileOpen() { if (SUCCEEDED(m_oDatabase.CreateInstance(__uuidof(Connection)))) { if (SUCCEEDED(m_oDatabase->Open("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\TestData\\Database1.accdb;Persist Security Info=False", "", "", -1))) { m_oDatabase->CursorL ...Show All
Visual Studio Team System Problem opening Excel Attachments
I can open all types of work item attachments through the work item form without a problem, except for Excel. When I try to open an Excel attachment I get the following errors: " '<filename>.xls' cannot be accessed. The file may be read-only, or you may be trying to access a read-only location. Or, the server the document is stored on may not be responding" (I press cancel) "Cannot access 'AttachFileHandler.ashx'" (I press cancel) same as 1. The item finally opens in IE with Excel toolbars A dialog appears with a link to the Microsoft Office Excel File Repair Log showing the following Errors were detected in file 'C:\Documents and Settings\collingridger\Local Settings\Temporary Internet ...Show All
Visual Studio How to draw BitMap using Co-ordinates
Hi, I want draw a image using X,Y coordinates.(Ex- (88,50)(86,49),(87,48)) Can some body give me idea how to draw a bit map using co-cordinates. Thx & best rgrds Roopesh ...Show All
Visual Basic Val() function returning an error
I am trying to use the Val() function to filter what is supposed to be numeric input from a textbox. In testing various input combinations I came across the strings that generate an Invalid Cast Exception. I am using VS2005 SP1 on both XPSP2 and Vista. This behavior is not documented in the Val() description. Does anyone know why "%" and "&" would cause this error Ex: Dim test as double test = Val("6.5%") test = Val("6.5 %") test Val("6.5&") All of these patterns will cause the error. The basic pattern seems to be a number that has at least 1 decimal place followed by either a "%" or a "&". I have not found any other special characters that generate the same error. Tom ...Show All
Visual Studio How to compile windows app without VS?
Hello, I have a windows application which has multiple forms and classes files and icons made by visual studio 2003 Now i don't have visual studio, but only i have the compiler csc.exe , so how to comile the project ps: can the 2003 project be compiled so that it works with .net framework version 1.0 Regards My experience with it is limited, but as far as I can tell MSBuild is only available with VS2005. You should still be able to do everything using csc compiler though. You can incorporate the icons and such into resource files, then use the /linkresource switch for the compiler to compile it into the assembly. You can find a resource editor at http://www.aisto.com/roeder/dotnet/. Hopefully this will help get you thr ...Show All
Visual Studio 2008 (Pre-release) XNA (Managed DirectX) inside WPF
I am delighted with Windows Presentation Foundation. There are automative layout, animation and so on in there.. Still it's slower then XNA after all. I have to visualize CAD-geometry. I tried to use WPF directly and failed. It was too slow. I can host an WinForms control and initialize XNA on it. But WindowsFormHost have a lot of problems and doesn't suit at all. I see another way to solve this problem. I want to extend WPF. For example I would inherit Brush or another class to draw the content myself using XNA. How I can do something like this SerialSeb wrote: Simply put, it cannot be done. WPF is a directX surface, just like XNA, and there is no interop scenarios supported at the mom ...Show All
Visual Studio installing sp1
When I try to install I get an error message that I must first uninstall web components for web examples. However, I can't find those anywhere. Frankly this is an unnecessary pain in the rear end. A Microsoft installation program should be able to handle that. Can somebody tell me what programs or examples these are referring to, why they don't show up and add/remove, and how I can go about installing the sp1. Thank you very much. dennist685 Thanks for the reply but it doesn't help much. If the web application projects were added during the attempt to install sp1,, then how do I uninstall them and reinstall sp1 I couldn 't find any way of uninstalling the waprojects. dennist685 ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Game Components Demo
I've posted a video of my Game Components demo I did at Gamefest. http://blogs.msdn.com/xna/archive/2006/08/31/734204.aspx Mitch, Nice video (ouch on the file size) it really has me excited to make some components. Those could really help in teaching other and helping others make games. What I mean is when making a tutorial you can drop a component into the program and it is less confusing than dropping copied code. Plus a component can be made a little more general use. ...Show All
Visual Basic &H308 ???
Hi, For hours ive researched, any explanation would be great, nearly any developer knows the answer im sure. take this for example: [code] Private Const WM_CHANGECBCHAIN As Integer = &H30D ... Protected Overrides Sub WndProc( ByRef m As Message) Select Case m.Msg Case Is = WM_CHANGECBCHAIN If m.WParam = CType (mNextClipBoardViewerHWnd, IntPtr) Then mNextClipBoardViewerHWnd = m.LParam Else SendMessage(mNextClipBoardViewerHWnd, m.Msg, m.WParam, m.LParam) End If End Select [/code] this part: Private Const WM_CHANGECBCHAIN As Integer = &H30D The &H30D i know its a hexadecimal value and may re ...Show All
