CTARP2's Q&A profile
.NET Development Bool write with Interlocked ? (dispose pattern)
In my application I frequently encounter situation where I would like to use the Interlocked class with bool objects. The most common case that I am encountering is the IDisposable implementation. As pointed out, Dispose is not threadsafe . Therefore, the common dispose implementation pattern is public void Dispose() { lock (disposeLock) { if (!isDisposed) { isDisposed = true ; // snipped } } } & ...Show All
Visual Basic Published in Beta
Hi, I have created a program in Visual Basic 2005 Express Edition BETA 2, I have .net runtime beta 2 installed. When my program is published, will the end user have to install a new .net runtime. Will it work on 1, Beta 2, or 2 itself What will they have to install (if anything ). Thanks alot... I have uninstalled everything I am meant to, yet it still will not work!!!! it just will not load the setup downloader!! Thanks anyway though ! ...Show All
Visual C++ Question about WaitForMultipleObjects() behavior
I've been reading up on WaitForMultipleObjects() for use in serial communications programming; however, all the documentation I've seen leaves me with one nagging question. My question is this: When WaitForMultipleObjects() is employed to block pending signal activation of 1 of N events, the documentation clearly indicates that more than one signal may be activated during this call. Furthermore, the documentation indicates that the returned value will consist of the lowest numbered event array index for which the signal was active during the call. Thus, it would seem to me that it is possible to return from such a WaitForMultipleObjects() ...Show All
Windows Forms DataGridView Scroll
Hi. When I scroll my DataGridView it is scrolled by steps of 3 (or any other number) of rows depending on what is set in Windows Mouse Properties. Is there a way to make it scroll row by row t.e. one notch = one scrolled row. Thanks! Hi, I had the same problem with DatagridView. The solution is: set the focus on this control ;-) This causes, that events are generated. Adam Ps. Well I think, that this the most useful feature should be included in visual designing, what is more, should be configurable and hope that in the future will be included;) ...Show All
Visual C# StreamReader & Console Apps
I am using System.Diagnostics.Process to execute an external process. When I set RedirectStandardOutput = true and attempt to read the entire stream either with ReadToEnd(); or looping with ReadLine(); the application freezes or waits continuously on the last read. What do I need to do to read the whole stream and continue with the application String data; Process proc = new Process(); proc.StartInfo.UseShellExecute = false; proc.StartInfo.CreateNoWindow = true; proc.StartInfo.FileName = "cmd.exe"; proc.StartInfo.RedirectStandardInput = true; proc.StartInfo.Redire ...Show All
SQL Server New CTP
Will there be an August CTP of Sql Server 2005 What interim version do you still plan on releasing before RTM on November 7th I can say that we're discussing releasing another CTP prior to RTM but I can't say for certain if this will happen and if it does when. Sorry for being so vague. Dan ...Show All
Visual Basic Passing data from form to form in the same project
Hello, My project have multiple forms. How can I get a text entry from one form and have it display on another Is it also possible to do with Radio Buttons Thank you. There is two ways to get data between forms. 1. Pass the data in from a parent to a child using properties exposed on the child form, or via a constructor argument. 2. Use delegates to send a message to the form in question when the data changes The common problem people face here is that they create a modal form ( one that you need to click 'OK' or 'Cancel' before you can do anything on the parent form ), and then find they cannot access text fields, etc.  ...Show All
SQL Server MSSQL service restart on principal whilst mirroring...
I have a problem that has happened a couple of times now. I'm in the process of testing our 2005 deployment - Standard edition on 2003 x64 servers for principal and mirror and 2005 express witness. All are pre SP1. Two databases are being mirrored. I have successfully set up mirroring which seems to work fine - but when I restart the MSSQL service on the principal, spurious things happen: The server that *was* the principal before restart database A is in (Mirror, Disconnected / In Recovery) state database B is in (In Recovery) The server that *was* the mirror: database A is in (Principal, Disconnected) database B ...Show All
SQL Server view executes too slow
i have written a query and created it as a view when i run the query it takes less that 5 seconds to give results but when i run the view it takes about a minute can anyone help please, it keeps giving me time out errors here is the query. SELECT MAX(B.Code) AS Code, MAX( T.Description) AS Type, MAX( WH.Description) AS Warehouse, MAX(B.Barcode) AS Barcode, MAX(B.BatchNo) AS BatchNo, MAX(B.CustomField) AS CustomField, MAX(B.Colour) AS Colour, MAX(Q.Quality) AS Quality, MAX(round( M.ConvFactor, 2, 2)) AS ConvFactor, MAX( M.Multiply) AS Multiply, MAX(CONVERT(VARCHAR(20), round((B.BoughtQty + B.TransferQty + B.IssuedQty + B.Retu ...Show All
Visual Basic Process.start
The Process.start command is designed to work with files on disk. Is there a way to lauch a process from memory say from a byte array or MemoryStream representing a MS Word file Thanks, Fred Found this which seems to answer the question directly (it is in c#) "Executing Dynamic Code in .Net" http://www.west-wind.com/presentations/dynamicCode/DynamicCode.htm ...Show All
Smart Device Development #ifdef for VS 2005 vs EVC 4.0
What is an #ifdef I can use to determine a compile is VS2005 vs eVC 4.0 Thanks JEK The short answer is that you can't. There is no "emulator" flag because the device emulator is just another device from the IDE's perspective. Devices are only relevant to the deploy and debug operations, the compiler is completely unaware of them. If you wanted to, you could create your own "emulator" configurations within a project, but there is no compile time directive for this. If you wanted to determine at runtime if you were running on the emulator, there is a way to query for the device m ...Show All
Visual Basic Does Office Word not support WaitForSingleObject?
hi all, anyone can help me to solve this problem my code here: visual basic code: Hi, This looks like VB6 code to me. You really want to ask your question where VB6 experts are - check this post for info on where to go. http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=138342&SiteID=1 ...Show All
Visual Basic Creating pdb programatically in VB
Is there a way by which I can create a pdb programatically in VB 6.0 I am trying to build a VBP from another VB application by shelling out command line parameters. There doesn't seem to be a command line switch to create a pdb. If anyone can suggest any other way to create pdbs, it would be very helpful. Thanks! ...Show All
SQL Server Calculated member in Report Builder
I have added a calculated member in my Analysis Service Cube, but this member does not show up in Report Builder. It is in my cube. I have tried to rebuild the model and to generate a new model. I can create a report from Visual Studio 2005 with the calculated member. Does not Report Builder support calculated members /Stefan Hi It took a while but I figured it out by myself ..... by associate the calulated member with a measure group using calculation properies in the meny. ...Show All
Visual Basic Stopping Alt+Ctrl+Del
Hi all I'm writting a program for public payable networked computers for playing games. I've got the server/client billing and other stuff like that done. Problem is, when my program boots up, it displays a full screen form (on top of everything), which holds the login/programs they can use/play. I've managed to remove the Alt+Tab, Alt+F4 and other key combinations like that. Although, i'm finding that Alt+Ctrl+Del still brings up task manager no matter what i do. I have a solution, that on program startup, it renames taskmgr.exe, (and the backup in dllcache), and it works (Doesn't launch taskmgr), however, there is a window ...Show All
