break_r's Q&A profile
Visual Studio Express Editions code for title bar X
Hi everyone, I have a simple question, the "X" or the close icon in the top right of the title bar, can you write additional code for this What I'm looking at is putting a messagebox onto its click event, like "Are you sure you want to close this application " and then have the Yes/No option. I know all about the messagebox part but I can't seem to figure out where to look for the forms "X" code. Any pointers greatly received. Scott Scott, If you are not seeing the message box, your program is probably not executing the routine. Have you "hooked up" this routine to the FormClosing event In the designer, select the Form. In the properties window, click on the lightning ...Show All
Software Development for Windows Vista Error while running the sample ASPNETWFPageFlow
I have installed the sample on WWF titled "ASPNETWFPageFlow" and when I run the application, I bump into the following error --> System.InvalidOperationException was unhandled by user code "The requested Performance Counter is not a custom counter, it has to be initialized as ReadOnly." This occurs in the following file in the code sample. WorkflowHost class in the module.cs file Can anyone help me figure out why this error occurs Take a look at Sonali's post in this thread for the solution. ...Show All
Internet Explorer Development How to inject STYLE into a page
Is it a supported scenario to inject a style tag into the body like this <div id="injectionDiv"> </div> <script type="text/javascript"> document.getElementById("injectionDiv").innerHTML='<style type="text/css">.myClass{background-color:green;}</style><div class="myClass"> </div>'; </script> If so, then why isn't the style applied WARNING: This post contains inaccurate information. Please read follow-up post below. One final post on this subject. There are limitations and caveats to what you can do with a styleSheet object through script, namely: You can create a styleSheet , but you cannot delete on ...Show All
SQL Server connecting to a table
Hi Please let me how to put a specific query to a database in the task and get the values from the db. I have this code: ConnectionManager cm = Microsoft.SqlServer.Dts.Runtime. DtsConvert .ToConnectionManager( ComponentMetaData.RuntimeConnectionCollection[ "conRun" ].ConnectionManager); cm.Name = "TestConn" ; cm.ConnectionString = "Data Source=srcServerName;Initial Catalog=srcDBName;" + "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;" + "Auto Translate=False;" ; After doing this, if i need to write a specific query to a table. How to do it. Thanks Vipul Hi Vipul: Not sure if this is exac ...Show All
Visual Basic Variables losing information?
Why does dataAccess lose some of it's values just after the new sub has been called Both synchronizingObject and notifyDelegate is set to nothing as soon the new sub is done. I'm 100% sure that the variables are set to something while calling new 'Click on button [code] Dim dataAccess As DataAccessQrapport dataAccess = New DataAccessQrapport(Me, New DataAccessQrapport.NotifyProgress(AddressOf ShowProgress)) something= dataAccess.getSomething(ID) Public Class DataAccessQrapport Public Delegate Sub NotifyProgress(ByVal Message As String, ByVal PercentComplete As Integer) Public synchronizingObject As System.ComponentModel.ISynchronizeInvoke Public notifyDelegate As NotifyProgress Public Sub New(ByRef SynchronizingObject As System ...Show All
Visual Studio 2008 (Pre-release) Not able to get "A Visual" from VisualCollection object, although it exists
I am drawing lots of custom visuals; some using custom geometry objects using streamgeometry and some are drawn using plain vanila draweclipse using drawingContext. Once all of the above objects are created and displayed on the form,On hit testing I am not able to reference back any of the objects created by the streamgeometry. None of this working ... _currentVisualCollection.IndexOf((Visual)_hitResultsList ) _currentVisualCollection.Contains(((Visual)_hitResultsList ) Using VisualTreeHelper .GetDrawing(visual), i do get the visual back but I cannot do anything if I cannot locate the same visual in the visualCollection and remove it as I need to update the layout. Any leads.. Hopefully this post will catch any M ...Show All
.NET Development ReflectionOnlyLoad - limited usefulness?
There are two major limitations (at least as I see it) of the ReflectionOnlyLoad method of the Assembly class that I'm looking for work-arounds for: 1. Assembly methods such as "GetExportedTypes" cannot be called on the assembly object created via ReflectionOnlyLoad. This raises the obvious question: what is the point of ReflectionOnlyLoad if you can't actually reflect on the types of the assembly In addition to the other obvious question: why does ReflectionOnlyLoad return an Assembly object when it doesn't work like other Assembly objects created by other methods Shouldn't it return an object where the methods defined for that object work . 2. Assemblies can only be loaded into the current app domain (and then cannot be ...Show All
SQL Server 2005 SP2 Install Failed, and Now SQL Server is Unusable.
Hi, I have a problem with my SQL Server 2005 instance after trying to install SP2. My machine has a default instance of SQL server 2005, and 2 instances of SQL 2005 express. I installed Express SP2 and this installed without a hitch. Then I installed SP2 for SQL Server 2005. After the install, all the components had installed correctly except the Database Engine, which had a status of failed. I did not investigate why, I simply re-ran the install. It failed again, so I investigated further and I found out it failed because it had not been able to start the service VSS Writer. I looked at the service, and found I had changed the user which gives the service rights to start. I changed this back to Local System so the service c ...Show All
Software Development for Windows Vista Adding my new custom transform filter seems to cause a graph problem
Hello, I've written a very simple transform filter to solve what I believe is a problem with Logitech's latest (v10.x) webcam drivers. I think my filter works fine, but seems to introduce an instability when I include it in my capture graph. Specifically: as detailed in another one of my posts , the Pause/Resume function would no longer work in my capture graph with the new Logitech drivers. Now, with my custom filter added to the graph, Pause and Resume work fine until I take a snapshot from the video capture driver's "still" pin. After a snap, resuming from a pause operation hangs the graph. That is, control never returns from this statement in my code: _mediaControl->Run(); The app just hangs. Removing my fil ...Show All
Visual Studio Tools for Office How to merge 2 Word docs, and also 2 Powerpoint presentations?
Hi, Not sure how to go about doing this one: I've got 2 word documents that I want to merge into 1 document programmatically, using .NET - any thoughts I also need to do the same for 2 Powerpoint presentations Thanks Douglas H. Troy wrote: Well shoot, that's much easier than what I spewed ... Too many APIs, so little time. <LOL> That's what's so rewarding about helping out in forums and newsgroups: you learn so much more than you thought there was to know! ...Show All
SQL Server sp_cycle_agent_errorlog fails/SSMS recycle Agent log fails
Hi, The sp_cycle_agent_errorlog stored procedure fails on our primary SQL Server 2005 server; the SSMS context menu option (right click Error Logs under SQL Server Agent in object explorer) to recycle the agent log also fails. If we run the SP then we get the following: Msg 22022, Level 16, State 1, Line 0 SQLServerAgent Error: 32. If we try the SSMS option we get this (in a nice dialog): Cycle agent error log failed for JobServer 'UKSQL04'. (Microsoft.SqlServer.Smo) Additional information: An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) SQLServerAgent Error: 32. (Microsoft SQL Server, Error: 22022) We are running SQL Server 2005 x86 Enterprise E ...Show All
Visual Studio What caused creation of THOUSANDS of tmp files in SourceSafe users directory?
I'm using Visual Studio 2005 and VSS 6.0d. Visual Studio and VSS were getting slower and slower, and my entire computer was too, if those apps were active. To make a long story short, the culprit was this: there were 65536 0-byte *.tmp files in the VSS <database>\users\<username> directory. That's, right 65K 0-byte files. This wasn't in the <database>\temp directory, but in a directory for users .. the one with the ss.ini in it. Anyway, I deleted 'em and all is well. But I'm a guy who likes to know 'why'. Anyone know -BillyB In general tmp files in user's ini folder may be caused by: - VSS crashing during save of ini files so it doesn't get to the point where the tmp files are deleted - antivirus keep ...Show All
SQL Server Is This Possible? Defaulting of a Dimension Atrribute
I have a dimension with one visible attribute, let's call it "Status." This attribute is binded to one column from a forecast fact table that stores monthly snapshots. This column simply has a 'Yes' or 'No' value for every record in the fact table. For a specific customer and product combination in this fact table, this "Status" column could have started off having a value of 'No' a few months ago, and now has 'Yes' for the current month. In other words, it can have both possible values. For example, let's assume the following forecast data for the Customer A and Product B combination: Month | Forecast $ | Status ---------------------------- November 2006 | $5 | 'No' December 2006 | $10 | 'No' January 2007 | $10 | 'Yes' This "Status" attri ...Show All
Windows Forms Combobox in a DataGridView
I have created a Combobox as a cell within a DataGridView. The DataGridView is bound to a table. When I execute the program and click on the combobox dropdown, the combobox is highlighted. I need to click a second time for the dropdown list to open. How can I fix this so the dropdown list opens on the first click Using the CellEnter event causes problems when I try to select a row or delete a row. Is there a way to deterimine if the dropdown arrow was clicked on the combobox and then send the F4 key ...Show All
Visual C++ VS SP1 does not update the merge modules for C++
Having applied SP1 the merge modules such as Microsoft_VC80_ATL_x86.msm are still build 42 when the release version is .762. Please can you release some updated merge modules as we can no longer ship our app and don't want to go back to be SP1 VS. Hi MCFH, I think your question is out of scope of this forum, see the scope of this forum please refer to: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=19445&SiteID=1 Thanks Bite ...Show All
