AIM48's Q&A profile
Visual Studio Tools for Office How to do something when create a new workbook?
Hi Super Men, I wanna know how can I do something when I click the "New" button of Excel to create a new workbook I try to use "this.New += new Microsoft.Office.Tools.Excel.WorkbookEvents_NewEventHandler(ThisWorkbook_New);" in "ThisWorkbook.cs", and write something in "void ThisWorkbook_New()" method, but when I click the "New" button, it doesn't run this code!!! Hi Is there a way to use the Microsoft.Office.Interop.Excel.AppEvents_NewWorkbookEventHandler mentioned in the above example to be called even before the New Workbook functionality takes place. Markand ...Show All
SQL Server Logging in SSIS
Hi: Just implemented logging on my package, and the type of logging is to a text file. Any ideas on where should i store my log folder/file, so when I do my build and deploy, I end up moving the folder as well. Do I have to manually do that How would that work What if I save the log file outside of my project folder Where is the log folder/file path specified Thanks. When you set up the logging you created a connection manager to point to the log file right Then all you need to do is to make sure that connection manager is properly configured in the new environment; meaning that the path you specified exists and the user executing the package has access to it. You could use package configuration to set up the connection man ...Show All
Windows Forms format 2 decimal places.
Dear All, I would like to find out how can I can constraint my text box to accept 2 digits after my decimal point example is 2.89 and not 2.878958. Another thing is how can I ensure that when I use the function Convert .ToDouble(textBoxValue.Text) I must get in the format that I get only 2 digits after the decimal point just like 2.89 and not 2.878958. Thanks. Try this: decimal input = Convert .ToDecimal(textbox1.Text); textbox1.Text = Math .Round(input, 2).ToString(); ...Show All
Visual C# Many a C# Question
Hi, I've got a few questions relating to C# (Forms & Code) and am hoping that someone could please help. If you do, it'll be much appreciated. Is it possible to add tabs (like MS VS does) when I want to make a new thing If so, what do I do Is is possible, to add non-existant programs to a menu after they have been installed on a computer (like MS Windows Start Menu etc. or Internet Explorer) If so, what do I do When printing with web browsers, is it possible to NOT use the image document user (like when using IE) If so, what do I do Is it posssible to ban websites using web browsers If so, what do I do Is it possible to have a loading bar when a web browser is loading or if something is printing If so, what do I do ...Show All
Windows Forms which Control Can I Use
Hi All I have an requirement where i need to design Time line( looks like Geometry Scale ) !00:00:10 !00:00:20 !00:00:30 ! 00:00:40 !-- pls Suggest me thanks in advance try using a panel( in your case the blue colored box will be a panel) and place labels on the panel(the labels will contain the values !00:00:10...) nhd ...Show All
Visual Studio Team System ValidationException: How to find out what field broke the validation ?
I've come accross this error multiple times and most of the time it is obvious what change in the WIT-definition has lead to this error, but sometimes the change was a long time ago and its hard to find out what may have caused the validation error. Is there any way to find out what field exactly has broken validation [WI] [Error, 1484, 32, 10:50:52.334] SvrEx: Microsoft.TeamFoundation.WorkItemTracking.Server.ValidationException: Forcing rollback ---> System.Data.SqlClient.SqlException: Forcing rollback at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClien ...Show All
SQL Server Predict Probability in Decision Trees
Hello, I installed the bike buyer example and i am learning the DMX language. Now i wrote the following query (using MS decision trees): SELECT T.[Last Name], [Bike Buyer], PredictProbability ( Predict ([Bike Buyer])) AS [Probability] From [v Target Mail] PREDICTION JOIN OPENQUERY (....... And so on..) Now the result is surprising to me. In the resulttabel all the probabilities are equal. Bike Buyer Probability 1 0.99994590500919611 0 0.99994590500919611 0 0.99994590500919611 0 0.99994590500919611 0 0.99994590500919611 1 0.99994590500919611 and so on. Now i am wondering what predictProbability means. I thought that PredictProbability meant the probability that the prediction is correct. Now all the probabi ...Show All
SQL Server declare programaticly a X number of variables
Hello everyone, I really need some help; I need to declare dinamicly an number of records to be pulled out of the table.. so I need to declare first DECLARE @NumberOfRecords int then DECLARE @i int set @i=0 and WHILE @i<@NumberOfReocords begin declare @Record int <-- Here is my Problem set @i= @i+1 end all the variables @NumberOfRecords, and the @Record are passed to a stored procedure. C ...Show All
Visual Studio ClassInterfaceType.AutoDual attribute on project properties class
I added the System.Runtime.InteropServices.ClassInterface(ClassInterfaceType.AutoDual) attribute to my class that inherits from ProjectNodeProperties per the instructions in the readme file for VS SDK July CTP. I had a property that returned a generic List<string> collection. This property is no longer visible after I add this attribute. I verified this by changing the return type to a simple string and it was than visible. Is there a way around this, so that I can still return a List<string> collection Thanks, Mike ...Show All
Windows Forms Parameter count does not match Parameter Value count.
Parameter count does not match Parameter Value count. what does this mean...I am trying to update my sqldb...I have all the right parameters...why elese would this come up SPROCS are the best way to go. What I am saying is, when you execute non query command, is that where the error is produced If so, check the parameter count. Then check your SPROC parameters (go into SQL and look at the SPROC)...count how many there are. Do they match up if not - that's your problem. ...Show All
Visual Studio Express Editions How to detect Insertion/Removal of a USB device
I am having problem with my FYP that my application is based on the detection of Insertion and Removal of a device. I am aware that this would happen using Win32_VolumeChangeEvent class or WMI. (Please notify me if I am wrong). Kindly solve this problem and send the code for Console Application in VB.NET. Please do not send code in any script language or C#. Also to get the device information. IamWasim wrote: I am having problem with my FYP that my application is based on the detection of Insertion and Removal of a device. I am aware that this would happen using Win32_VolumeChangeEvent class or WMI. (Please notify me if I am wrong). Kindly solve this problem and send the code for Console Application in VB.NET. Please ...Show All
Windows Forms Tab through Tree nodes
Hi, How to tab through tree nodes in window forms Thanks Balamurugan (Also answered on c# general) This was harder than I thought - so I have blogged how to do this, take a peek http://blog.the-dargans.co.uk/2007/01/navigate-treeview-with-tab-key.html Ross Dargan ...Show All
Visual Studio Team System Checkin policy dll is blocked after the policy usage
I tried to assign new checkin policy to the project - it failed and adviced me to install the policy. I am actually compiling project tot he folder where this policy should be assigned from and now, after the error, my Visual Studio can not override the dll file. Looks like that Wizard or whatever it is didn't release the lock from dll. It happens every time when policy is touched in any way and until the Visual Studio is closed down - either memory leak or something... I'm not 100% sure I'm following you, but I'll assume I am and state what's going on - please correct me if my assumptions are off. You have one Visual Studio running in which you're creating/editing your checkin policy. To test it ...Show All
Windows Forms What's the best way to add query with different column output to a table adapter in dataset designer?
I already have a dataset (with an adapter attached) which return column, say c1, c2, c3, c4 (c1 and c2 are primary keys). I want to add a new query which just return one column with distinct value (say, "select distinct c3 from table1"). It will company c1 and c2 cannot be null if I just add the query to the adapter. Should I create a new DataTable just return c3 and use sql "select distinct c3 from table1" What's best solution I may have multiple similar query and I don't want to create too many DataTables. Thanks, You should use the same TableAdapter, but before you fill in the data just set myDataSet.EnforceConstraints = false; Hope this helps. Tomaz ...Show All
Connected Services Framework Eventing in CSF
Hello, I would like to get more details about how to use eventing when writing a WES for CSF. First of all I would like whether there is any difference between the Provisioning Events, Health Events and Usage Events The provided samples with the WES toolkit don't implement any of them (except usage) so I would like to know if they are all implemented in the same way. To the more importaint question: how do I configure the sample from the WES toolkit for Usage eventing to work What is the role of Usage Event Poller included with the WES toolkit Generally what I would like to know is how to send events Is there any more documentation written on this matter And one more dummy question. What is the difference between sending a message in CSF ...Show All
