Arun C's Q&A profile
.NET Development CLR and thread deadlocks
Hello, I'm hosting the CLR (.NET 2.0) in an unmanaged C++ app. The CLR is used for calling C# plugin functions through IDispatch. The C# plugins are COM visible classes and are created from the app main UI thread. They are mostly used for accessing the app through a COM primary interop assembly generated with TLBIMP.EXE. The interop between C# and the app is achieved through the default Microsoft COM wrappers. This is all working fine but I'm having a problem when the C# functions are called by the app from a worker thread. At this point the CLR attempts to interop with the app via the UI main thread which is causing a deadlock because that thread is locked while the worker thread is executing. From what I see in the call stack (b ...Show All
Windows Forms Change Tab Page Shape
Hi, I want my winform Tab control to have the top portion look like the ones in the VS.Net windows..that is have a differrent shape from the existing rectangle ..How do i do this..i want differrent back colors based on which tab is selected ...All i need is a differrent shape and color.. Thanks Jith it is possible: take a look at TabControl.DrawItem Event . there is example too Note: When you set the DrawMode property to OwnerDrawFixed , the TabControl raises the DrawItem event whenever it needs to paint one of its tabs. To customize the appearance of the tabs, provide your own painting code in a handler for the DrawItem event. By drawing it by yourself you can do whatever you want hope ...Show All
Visual FoxPro Win 2K vs Win XP Pro SP2
Hi, Just wondering if anyone has changed the development platform from Win 2K to Win XP SP2 Any problems encountered >>changed the development platform from Win 2K to Win XP SP2 Yes, I did this some time ago now, (when XP SP1 was released) and have not had any specific problems with VFP and XP. Everything seems to work just as expected. ...Show All
Smart Device Development wierd c# compilation error
Hi Can anyone explain to me why the following code compiles ok in a PocketPC 2003 project but not in a Windows smartphone 2003 project fails with the error error CS0654: Method 'VerifyUI.PageAreaItemButton.DoRequestRepaint()' referenced without parentheses I am using VS 2005 public delegate void RequestRepaint(); private RequestRepaint requestRepaintDelegate = DoRequestRepaint; private void DoRequestRepaint() {} I would guess you see that because you're using different compilers for SP 2003/NETCF V1, C# 1.1 compiler; and PPC 03/NETCF V2 C# V2 compiler. Fix has been suggested already. ...Show All
Visual Studio Express Editions Limit ColorDialog to named colors
I'm trying to solicit named colors from the user. ColorDialog1.AnyColor = False ColorDialog1.AllowFullOpen = False ColorDialog1.FullOpen = False ColorDialog1.SolidColorOnly = True If ColorDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then MsgBox(ColorDialog1.Color.ToString) ........... Some return readable names, some return ARGB numbers. I only want readable names type colors. Suuuuuuuuuuggggggeeeeeeeesssssssstions I was just working on that yesterday (color combobox ). Here's what I came up with: Private mColors As List(Of Color) ... mColors = New List(Of Color) Dim reflect As System.Array = [Enum].GetValues(GetType(KnownColor)) Dim known(reflect.Length) As KnownColor A ...Show All
SQL Server Limiting large queries in AS2005?
Does anyone know of a way to stop large queries from running on an AS2005 instance, similar to the SQL2005 'query governor cost limit' configuration option I want to stop users running large queries from apps like Excel, and bringing the server to a grinding halt. Thanks The only thing that I am aware of that comes close to this is the query timeout parameter see: http://cwebbbi.spaces.live.com/blog/cns!7B84B0F2C239489A!932.entry unfortunately it is retrospective in that it will not evaluate the cost of the query before it runs, rather if the query has been running for too long it will kill it. ...Show All
SQL Server How to use Excel's XIRR function in StoredProcedure????
Hi All, Is it possible to use excel's XIRR function In SQL 2000 StoredProcedure....Or Is there any function available like XIRR that I can use in SQL 2000. Thank you, Balwant Patel. I think you should implement the XIRR function yourself A sample code is available here at http://www.geocities.com/alexgutierrezotero/ hoping this could give you enough idea to work on. - Jignesh ...Show All
Game Technologies: DirectX, XNA, XACT, etc. TotalRealTime behaviour
I've used GameTime.TotalRealTime.TotalMilliseconds to access the wall clock time and it looks like it pauses when I drag the game window using mouse. Is it right and is it good :) In my case I need to keep the projectile going even in this case because my game is a network one and if the player drags the window all projectiles should fly in a synchronized manner on both PCs. I use DateTime.Now.Ticks as workaround and get what I need, but anyway I wanted to let you know about this effect. same thing happens after you click the window icon in the top left the screen pauses while the move,size, close etc menu is up. It may be just a case of the draw calls are skipped and the updates are called as per normal ...Show All
.NET Development Nortal SDK No Connection Could be made because the target machine actively refused it.
I have a problem I am working on Nortal.CCT integation, I am using remoting to do some tasks, In the application we are using Nortal SDK which is also developed in .Net Remoting to notify the client with events. Problem is when i am integrating my application with nortal sdk. i am getting events but i am not able to receive the data along with the data. When i Comment the following statement in my application RemotingConfiguration.Configure("Myapp.exe.config"); i am able to receive the data from Nortal CCT server. when i am enabling the RemotingConfiguration.Configure("Myapp.exe.config"); statement i am able to receive the events but application throughing exception when i am tr ...Show All
.NET Development About Cryptography.RSACryptoServiceProvider's behavior
Hi, every one. I have searched/used Cryptography.RSACryptoServiceProvider for a while and found a interesting behavior: When you create a pair of keys(private+public, short for "private", obtained by ToXmlString(true); public only, short for "public", obtained by ToXmlString(false) ), then you can encrypt/decrypt data. I found that if I encrypt with public, then decrypt with private, no error pop up. But when I encrypt with private, decrypt with public, then error popup, said "bad key". I saw some articles said: if you encrypt data with one key, you have to decrypt with other key. and my test shows one direction result. Maybe what I thought is wrong Any one has similar experiences ...Show All
Visual Studio 2008 (Pre-release) Adorner cannot show upon WindowsFormsHost
Hi all, I have two questions: There are two ways to display Adorner upon a WPF UIElement. One is to call AdornerLayer.GetAdornerLayer() function to get AdornerLayer for the visual element and then add a custom Adnorner to that layer. The other one is taking advantage of Cider extensibility and add an AdnornerProvider. My problem is Adorner cannot show upon WindowsFormsHost using either of above ways. In SDK, I was told that any UIElement can have adorners on it and WindowsFormshost is of course a UIElement. Actually I find another description about WindowsFormsHost, which is this control is drawn on top of any Adorner. So I just post this topic to comfirm my understanding that WindowsFormsHost can not have any adorners on ...Show All
SQL Server Complex Self Join
This is a very complex query and i have tried everything with no sucess. I'm having 3 Tables, Orders which is having fields like CustomerID, ManufactureID, MerchID :- These all ID Fields (around 6) are foreign key of Contacts and Address Tables. Address Table is having AddrID(Primary Key), ShortName Contacts is having ContID (Primary Key), AddrID (Foreign Key), PersonName I want to retreieve info in a single query which can return a single row with following columns :- OrderNo, CustomerName, ManufactureName, MerchName etc. (all 6 columns) by joining these 3 tables can anybody help in this. Could you use one IDE (for example, Design Query in Editor in SQL Server 2005) to do this Yo ...Show All
Visual Basic animate system tray
I can animate the system tray while my program still do events (for example: while program query database and fill all listboxes, the system tray will have a animated icon) Yes, you can use a timer to control this. You will want to make sure though (possibly through DoEvents() that you long running background work is giving a chance (from time to time) to the timer to do its work and the UI to be drawn. ...Show All
Visual Basic VB picking up old version of Framework
I have version 2.0 of the .Net Framework on my machine but when I try to add references, only version 1.1 namespaces are present. How do I get VB to use version 2.0 Thanks. I hate being a newbie!! Yes, you are right, that's what I'm doing. I'm working on a project remotely with another guy, trying to compile his classes and he is obviously using VS2005, whereas I'm using VS2003. Was unaware of the relationship with the Framework versions. Looks like I need an upgrade. Thanks spotty :) ...Show All
Visual Studio Tools for Office Word Objects Within XmlNode
I sow some examples of adding plain text into SmartDocument's XmlNode (amounts, addresses etc.). What I'm trying to do is to insert Word Table into XmlNode - by some reason it puts Word Table outside of the tag. Is there any way to insert Word objects right into the XmlNode as its contents Also how do I control it at the data schema level Thanks. You've posted to a very old message thread, one marked as an answer. A much better tactic is to post a new question message, with a link to any older, relevant thread. It will get much better exposure, that way :-) And then please provide more information about what you're trying to do, and with which version of VSTO :-) ...Show All
