Synced's Q&A profile
Visual Studio Tools for Office Handler for Outlook Explorer.SelectionChange event disappears ??
OK, I'm new to VSTO.... my registered handler pops up a message-box when I select different emails in my inbox, different folders, etc. JUST FINE..... BUT... if I generally do stuff like send or open an email, , then when I get back to the Explorer and select stuff, the event handler no longer gets executed. I saw this behavior with other events such as Inspector.Activate What am I missing Here's the code: public partial class ThisApplication { Outlook. Explorer thisExplorer; private void ThisApplication_Startup( object sender, System. EventArgs e) { thisExplorer = this .ActiveExplorer(); thisExplorer.SelectionChange += new Microsoft.Office.Interop.Outlook. ExplorerEvents ...Show All
Visual Basic Cascading combo lists
Does any one know how to create cascading combo lists where in one combo list, you select a product and another combo list would display the sub-products/subcategory related to the product. How would the database design work so that the information can be correctly displayed in the combo lists. I have been trying to get my head around implementing this, but I have not found any suitable answers on the web. Any help would be great. Regards Dipendra In the first combo selectedindexchanged event you would use the details of the selectedItem property to populate a dataset which is being used to populate the 2nd combobox. (datasource property) If you have a 3rd combobox which is dependent upo ...Show All
Windows Forms No alpha-channel images (PNG) in tab page headers
hi, i use a image list to store some icons for some tab control headers. unfortunately they are not displayed with alpha channel overlay but just with a transparent or non-transparent area. is there a way of fixing that problem thanks! ...Show All
SQL Server Conditional Execution in the Control Flow via Script Task
Greetings. I'm trying to conditionally execute a dataflow based on the presence of a data file. If the data file isn't present, I'd like to execute gracefully without error. Logic is as follows: If FileExists Then execute dataflow Else exit w/o error End If I've got the code ready to go, but I'm not sure how to do this conditional branch logic. Right now, the code calls the Dts.Results.Success / Failure. The problem, however, is Failure is exactly that... which doesn't result in the graceful exit I'm looking for. Anyone have any ideas Thanks in advance. Good Idea. I followed your suggestion; for those interested in voting on that suggestion: https://connect.microsoft.com/SQLServer/feedback/ViewFeedb ...Show All
Visual C++ How to compute time?
it is supposed that current time is "2006-12-31 23:59:59", when current time is added ont second, the time becomes "2006-01-01 00:00:00", how to get this thks ...Show All
Visual Studio Express Editions MDI Closing RCW Error
This one has got me completely stumped !! I've got a MDI window with mulitple forms inside, as a merged menu item I have Close window (on the Child) that appears in the MDI forms file menu list (this all works 100%). Now, if I click the close menu it fires the event handler in the child forms menu handler and executes a simple Close.Me function (that also works 100%). So what's the problem Okay, I want to spice up the menu a bit so I've put a shortcut key in there too, but if I press the shortcut key I get an RCW error: RaceOnRCWCleanup was detected Message: An attempt has been made to free an RCW that is in use. The RCW is in use on the active thread or another thread. Attempting to free an in-use RCW can cause corruption or data ...Show All
Windows Forms VS-Like sliding window!
Im trying to create a nice application.. and i want to add a sliding window to it.. just like the one in the VS 2005... when u enable the Auto-Hide proberty for the window it slides away .. and when the mouse hover it slides back in.. very cool and nice.. but i wonder .. is it a Panel ! or a Form or maybe somthing else ! or is there any specific control for this type of things! thank u. You can easily simulate this effect with a timer. Drop a tall, narrow panel control on your form and give it a dark background. Paste this code: public partial class Form1 : Form { private Timer mCool; private int mCoolDir; private int mPanelWidth; public Form1() { InitializeComponent(); } private void Form1_Load(object sender, Event ...Show All
Visual Studio Tools for Office VSTO2005>> How to relate Excel cell with own function
Hi, Could you please clarify following issue. I have VSTO 2005. Office 2003 and i.e. Vsto works correctly, but i need to call my own function thru Excel after some of cells has been changed or calculated. In vba i've created public function and refers all intristing cells to it. How can i do the same in vsto Please note i can't use named range, and i have to create it only thru own function in Excel. Thanks, Sergey Sergey, if you need to call VSTO from VBA, Paul Stubbs has a blog about this: http://blogs.msdn.com/pstubbs/archive/2004/12/31/344964.aspx If you want to call an add-in's method from a VSTO document-level code, this is possible if the add-in is created with V ...Show All
Visual Studio Tools for Office Question regarding creating, saving and emailing EXCEL document
Hi, I am using C# and VSTO to populate an EXCEL document from a database. I then want to email this EXCEL document as an attachment to a specified number of users. Everything works except when I try to open the attachement. I receive the following error "The file could not be accessed. Try one of the following: Make sure the specified folder exists, Make sure the folder that contains the file is not read-only, Make sure the file name does not contain any of the following characters.......". I tried sending a file, .xls and .txt, that already exists and the attachment opens up correctly. I think VSTO is not properly closing excel before emailing it. Does anyone have any ideas on how to fix this Below is the code: ...Show All
SQL Server table field datatype
What datatype should I use for a field in my sql server table that should be able to hold values such as: -1.092 0 2.9875645 25436.432567 etc. Thanks First, thanks for replying, and apparently for putting some real effort into your response as well! Anyway, to answer your question "Do you use SqlCommand with Parameters or build query by string concatenation ", neither. I created the table using the database designer embedded into C# .net (express). I set the precision and scale as (18, 4). Then, because I wanted some simple test data, I chose "show table data" by right clicking on the table and started punching in data. First few fields no problem, but when I tried to ...Show All
Windows Forms Datagrid Cell return
Can anyone tell me if there is anything wrong with these statements: int _MyRow = this .currentTransactionsDataGridView.CurrentCell.RowIndex; int _MyCell = this .currentTransactionsDataGridView.CurrentCell.ColumnIndex; string _Account = this .currentTransactionsDataGridView.Rows[_MyRow].Cells[_MyCell].Value.ToString(); _Account is always "" - when I know its not. Try this out: string _account= this .currentTransactionsDataGridView.Rows[ this .currentTransactionsDataGridView.CurrentCellAddress.Y].Cells[ this .currentTransactionsDataGridView.CurrentCell.ColumnIndex].Value.ToString() Hope it works, if not let me know. ...Show All
.NET Development how to convert string to char array
hi all ! how can we convert character array to a string and also vice versa Hi , Instead of posting very basic questions like this , u better refer any book(C# programing - wrox is good one).Even if you google for this u'll get the code. Hope , u got me. Anyways code for ur requirement: --------------------------------------------------------- String str = "hello" ; //String to char array char [] szArr = str.ToCharArray(); //Char Array to string String str2 = new String (szArr); -------------------------------------------------------- Thanx & Regards, Ch.T.Gopi Kumar. ...Show All
Microsoft ISV Community Center Forums Error Handling in Excel VBA
Hello, I am trying to connect to a database through a userform. The database expects a valid user name and password. I do I handle the error if someone puts in an invalid user name and password I want to display the error message which the system returns to the user. Kindly help Thanks something like this: in this example 'user' is the name of the text box on the form for user name input and 'password' is the name of the text box for password input 'Check to see if data is entered into the UserName combo box If IsNull(user) Or Me.user = "" Then MsgBox "You must enter a User Name.", vbOKOnly, "Required Data" Me.user.SetFocus Exit Sub End If 'Check to see if data is e ...Show All
SQL Server Unable to read local eventlog (the parameter is incorrect)
In trying to setup alerts and activating them, an error occurs in the sql agent log of Unable to read local eventlog (the parameter is incorrect) The full messages from the Windows NT Logs shows: Event Type: Error Event Source: SQLSERVERAGENT Event Category: Alert Engine Event ID: 318 Date: 03.11.2005 Time: 17:14:47 User: N/A Computer: RESYSHADOW Description: Unable to read local eventlog (reason: The parameter is incorrect) Does anyone know what could be causing this. I have tried it on Windows XP SP2 with local Admin account and on Windows Server 2003 with Domain Administrator Account and the SQL2005 Server is RTM with the same results. I am getting ...Show All
Visual Basic Redirect XCOPY output from the console to a rich text box control
Ok, this about has me tied in knots! I am trying to use xcopy in my program to copy files from one location to another location and have the info normally displayed in a console window redirected to a rich text box. I cannot get it to work. I don't get any errors. The code snippit is below. I can use "/K dir *.*" for the Arguments and it redirects fine. I am completely stumped. Dim myprocess As New Process Dim info As New ProcessStartInfo With info '.CreateNoWindow = True .FileName = "cmd.exe" .Arguments = "/K xcopy.exe C:\Test\Trash1 C:\Test\Trash2 /S /I /-Y" '.WorkingDirectory = Application.StartupPath .UseShellExecute = False .RedirectStandardOutput = True .Redirec ...Show All
