永清吾心's Q&A profile
Visual C# Thread Synchronization C# --> C++
Hello I have a little native dll written in C++. I call it's functions from C#, but I have some problems that I can't afford. I have no unerstanding in multi-threading at all, so your help will be appreciated. I have a C# class which uses BackgroundWorker. It calls the dll's function to determine some changes and if one found, it must trigger associated event. But the problem is that I call Connect() function from the BackgroundWorker's DoWork event (in some seconds interval) which is said not to be Thread Safe and I call the same function from Main Thread, so some times an AccessViolationException raises saing "Attempted to read ...Show All
Windows Live Developer Forums MSN Hotmail Calendar
Hi, I'd like to write something that synchronises my MSN Hotmail Calendar with my Windows Mobile 5 Smartphone. I've had a quick look over the MSN API's and can't find anything that may help. Maybe that someone has already written something Anyone able to point me in the right direction Thanks Hi Dj, I haven't started anything yet, but I might have another look into this again. If I find anything useful I'll post it here. ...Show All
Windows Forms Double click on a row in datagrid, winapp .net
I am using the Datagrid control. I am trying to capture the double click event on clicking a cell in a row of the datagrid. The double click event fires only upon clicking the row header. Double click event does not fire upon double clicking on a cell. What am i missing Need help urgently. Thanks. A few questions for you: 1. Is this DataGrid on a standard form (System.Windows.Forms.Form) 2. Have you specified a different style for the DataGrid columns or do you have the default DataGridTextBoxColumn style (editing with TextBox's). 3. Are you using VS .Net 2005 or 2003. ...Show All
SQL Server Foreach loop for DBASE IV problem
I've followed the steps on how to use the ForEach loop container using a Flat Text file and it's working fine. I tried reading the text file and put it in my SQL table. However, I have some DBF files as well and the ForEach loop does not work at all with my DBF files. Here is my scenario: A connection manager pointed to C:\DBF_FILES On the Control Flow: a Foreach loop container with Foreach file enumerator. (checks for IFUL*.DBF files and retrieves the Fully qualified name. Within the foreach loop container is my DataFlow (import) Within the dataflow: OLEDB datasource data access mode: Table name or View Name variable ...Show All
Windows Forms user32.dll Threads Issue from Upgrading from Vb6 to vb.net
Hi I have a module that handles threading with user32.dll Api. The problem comes when each window calls this pSetForegroundWindow subrrutine to set the Foreground thread. The windows is displayed active but is not refreshed or painted, stays unresponsive. Why is that Can someone help Would I have to declare a system.threading instance to substitute this module functionality And not use user32.dll in vb.net How can I do that I have an idea how threading works but this is the first time working with it See Code Below ************************************* module******************************************** Option Strict Off Option ...Show All
.NET Development Were to store user options/data
What is the best way to store user information. I know how to save values to the registry but besides that, their has to be a better more secure way to save information from a windows form. Thanks for your help. If you are looking for secure then you can encrypt using the cryptography class to a db field (and even encrypt the db)or to your own file (ini, binary, text...)... ...Show All
.NET Development System.Transaction - nested Required within Suppress scope
It seems that changes are not rolled back when a connection opened inside a Suppress TransactionScope is used like this in nested Required scopes: Using noTransx As New TransactionScope(TransactionScopeOption.Suppress) Using sqlcon As SqlClient.SqlConnection = New SqlClient.SqlConnection(constr) 'do some initial SQL statements here using shared sqlcon object Using transxScope1 As New TransactionScope(TransactionScopeOption.Required) 'do some more initial SQL statements here using shared sqlcon object Using transxScope11 As New Transactio ...Show All
Visual Studio Team System TFS Explorer and Solution Explorer - how they compare?
Hi folks, i've been struggling with the idea of the TFS explorer and the Solution explorer. I've been programming with VS2002 and then VS2003 and have no problems understanding the Solution explorer in that piece of software. For example, we have 4 class libraries and 2 web applications in my main solution i use. Now with TFS explorer installed in my VS2005, i'm confussed between the two and the relationship of sourcesafe. For example, previously i could have my own solution that contains various projects found in sourcesafe. My collegue could have their own solution which could contain _some_ of my sourcesafe projects, and o ...Show All
SQL Server SQL Server 2005 takes longer time to cancel a query
Cancelling queries takes longer than it used to in SQL Server 2K Dont know why ... Is it a new feature I press the upper right X on the query window to close the query window where the query is executing. It stops it immediately. But, you are right, it takes A LOT longer now. It's frustrating. ...Show All
SQL Server SSMSE Only Installs to the C Drive
I was not given the chance to select the destination for the SSMSE installation. The C drive was used. SQL Server Express was already installed on the D drive. You would have had to have Books-online, the SQL Server SDK, or full Management Studio installed to the C drive prior to installing SSMSE. MSDE doesn't set the install directory for Management Studio. ...Show All
Visual C# Failing to retrieve the values from app.config when called by other application.
Hi, I want to get a named setting created in app.config in my class library. It is working fine as an assembly. But, when this assembly method is invoked by some application, I am getting : Object reference not set to an object for the app setting I am referencing. I tried copying app.config in the directory of the application that is invoking my assembly. But still getting the same error. Any help is highly appreciated. Thanks, ex: Case 1: Test1.dll ---> This assembly has a app.config file which has one named key,value. I have a class method (in the dll) wherein I use this value a ...Show All
Visual Studio constrain the number of a specific shape
hi, i have three different shapes that i could 'drag&drop' from the toolbox: shapeA, shapeB, shapeC how can i constrain if there is already a shapeA within my designer workspace, that a second shapeA cannot be drag&dropped to the designer workspace The constraint should be, that only one shapeA within the designer workspace is allowed. Any ideas Thanks! Assuming that your shape is mapped to a concept that is directly embedded in the root class of your model, change the maximum multiplicity of this embedding to 1. That should do what you want. Steve Cook [MSFT] ...Show All
Windows Forms Question about UserControl
If I have a usercontrol that inherit from TextBox (myControl). It's possible when myControl is drag into the form (from the toolbox), to add a label control too Thanks. Yes, you can do this with a custom ToolboxItem. Below is an example: /// <summary> /// This custom ToolboxItem displays a simple dialog asking whether to /// initialize a certain value. /// </summary> class MyToolboxItem : ToolboxItem { const int IDYES = 6; protected override IComponent[] CreateComponentsCore(IDesignerHost host, IDictionary defaultValues) { return RunWizard(host, base.CreateComponentsCore(host, defaul ...Show All
Visual Studio Team System manually remove a (failed creation) project
Hi, I tried to create a new tfs-project, but got a very strange error message (see below). But I need to be able to reuse the name! So how can I manually delete all traces of this project-name (or rename it in the DB, so the name is not recognized anymore ). I think there is some kind of project-removal console-app, but last time I tried that, it could not remove such zombie-projects. ---begin Exception entry--- Time: 13.01.2006 17:20:39 Module: Engine Event Description: TF30162: Task "VersionControlTask" from Group "VersionControl" failed Exception Type: Microsoft.TeamFoundation.Client.PcwException Exception Messag ...Show All
.NET Development Simple TSQL called by ADO fails
(SQL 2005) I have a program using ADO that sends a line of text to SQL Server to be executed. the line is essentially: if exists(select 1) DELETE C_Codes WHERE category=13; I can't get the DELETE clause to execute in ADO even when the if exists clause is clearly true (works fine when manually executed in Management Studio). Can someone explain why this doesn't work, and what I need to do to make it work Thanks. hi there, create an sp and call the sp from ado hope this works. It looks like a batch to me rather than a single query ...Show All
