IBRAHIM ERSOY's Q&A profile
Visual C# using vs try catch
I know that using can be used on class that implement IDispoable so that the object can be diposed of when finihsed with. But how can execptions be trapped that are particulat to that class. For example I have using ( System.Net.Mail. MailMessage message = new System.Net.Mail. MailMessage() ) { code in between , what if i get a MailMessage error how can I trap that speciffically } thanks javahar Javahar wrote: I know that using can be used on class that implement IDispoable so that the object can be diposed of when finihsed with. But how can execptions be trapped that are particulat to that class. For example I have using ( System.Net.Mail. MailMes ...Show All
Visual Studio 2008 (Pre-release) How can I get the Drawing of a Button for rendering on an Adorner?
I have a control, for example a Button, which i create in code and don't (!) want to display in the window directly. Now I need the Drawing of the Button to paint it on an Adorner, because, as I see, the DrawingContext only supports DrawDrawing(..). How can I get the Drawing of a Button because the following sample just doesn't work since I never get a DrawingGroup back from the VisualTreeHelper.GetDrawing(foo) function: //my adorner OnRender method: protected override void OnRender(DrawingContext drawingContext) { Button foo = new Button(); foo.Content = "bla"; DrawingGroup drawingGroup = VisualTreeHelper.GetDrawing(foo); if (drawingGroup != null) ...Show All
SQL Server Error when restoring database
Hi guys! I wonder if this happened to you... I searched and found nothing related to this problem... When I try to restore a database in SQL Server Management Studio on a 2005 database engine I receive the message: Cannot show requested dialog. ------------------------------ ADDITIONAL INFORMATION: Could not load file or assembly 'SqlManagerUI, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A) (mscorlib) ------------------------------ Strong name validation failed. (Exception from HRESULT: 0x8013141A) Sometimes I receive the same error when starting Management Studio for the connection dialog... Thank you! ...Show All
Windows Forms DataGridViewComboBoxCell problem
Folks; I have a DataGridView "dgv" with 2 columns: " myNameTextBoxColumn" is a DataGridViewTextBoxColumn, and "myAddressComboBoxColumn" is a DataGridViewComboBoxColumn. I bind it to an array of ABC objects class ABC { string [] nameArray, addressArray; } I'm using the following code as the DataGridView's RowsAdded event handler: private void dgv_RowsAdded( object sender, DataGridViewRowsAddedEventArgs e) { for ( int i = 0; i < e.RowCount; i++) { DataGridViewRow row = dgv.Rows[e.RowIndex + i]; ABC abc = ( ABC )row.DataB ...Show All
Visual Studio Team System TF60032: The VSS Converter requires Visual Sourcesafe 2005... HELP!!!
First off: Major gripe here; Why would I need to purchase VSS2005 if we just shelled out $8000 for TFS and CAL's What do I need to do to get this to work Can anyone tell me how I do the VSS2005 setup I have tried searching through the forums here with no end. Furthermore: I don't have the MSDN access level to download VSS2005 as it would appear others have resorted to. I tried the VS2005Team 180day trial, but cannot find VSS2005 there either. I have re-installed TFS. I have also tried the beta service pack to no avail. I have spent (wasted) countless hours hunting for the elusive VSS2005 install. Oh, TFS itself works fine... just need sourcecode.. Please, Please help, -David Well, I guess there is no solution other th ...Show All
.NET Development Class getting destructed through Interop
I have a .net 2.0 assembly that is exposed through a COM callable wrapper (CCW). The destructor of my managed class is getting called prematurely. The library making COM calls is almost certainly not CoUninitialize-ing the instance, so I don't know where this is coming from. Is there a way to see the origin of such a call (nothing on the vs2k5 debugger's callstack) The time that this happens is pretty predictable, resources aren't low or anything. I can't even find much reading material on this subject. Anything relevant would be appreciated. Tony I may have found the problem. The native library making COM calls was not altering the reference count with AddRef/Release. In my defense, I've never used C ...Show All
Visual C# FileNotFound Exception when trying to invoke compiled Assembly
Hi! I'm making an application that requires loaded scripts, and for this, I'm using the CodeDom namespace to write my own compiler. The problem I'm having is that when I try to invoke methods from the compiled assemblies, I get a FileNotFound Exception with a constant path (my windows temp directory) that ends in a dll name that changes for every build. The line I get the error on is this one: <source>object Instance = Results[Counter].CompiledAssembly.CreateInstance( ExtractFilename( TempScript.Name ) );</source> My classes for compiling and loading script files looks as follows: <source> using System; using System.Collections.Generic; using System.Text; using System.I ...Show All
Visual C# Problems with Foreach
I am developing a method and I got that error message when I tried to compile: "Foreach cannot operate on a 'method group'. Did you inted to invoke the 'method group' " What can be this This is my code: protected string GetValueList(object ob) { Type t = ob.GetType(); string valueList = ""; bool bFirstColumn = true; //the error was on this foreach foreach (PropertyInfo p in t.GetProperties) { foreach (Attribute att in p.GetCustomAttributes(false)) { DBColumn dca = (DBColumn)att; if (dca != null) { if (!bFirstColumn) { valueList = ", "; } else { bFirstColumn = fa ...Show All
.NET Development SQLDataReader.GetOrdinal() fails rarely with IndexOutOfRange
Hi everybody, We were developed some Web-Services that run against SQL Server 2000 with SQLDataReader that executing Stored Procedures in the DB. Most of time (95%) everything is running well, but sometimes (when exactly, we don't know) the same WebService that worked 200 times, fail. The code is simple: public string myFunction( int ANumber ) { string strRetVal = null ; SqlDataReader myReader = null ; SqlConnection MyConn = null ;   ...Show All
Windows Forms Freeze Panes For A Dynamically Created Datagrid
Does anyone know how to freeze the header row and one or more columns for a dynamically created datagrid. This is created in vb.net / asp.net I am also available through windows / msn messenger - paul.donaghy@hotmail.com - if anybody can help me and we can talk about my problem. All help appreciated. Hi, Even i am trying to freeze the header and two columns in a datagrid. I have two datagrids in the same page.I wrote a CSS .It works fine for the first datagrid but it dosnt work for the second datagrid. Both datagrids have the exactly same code. I surrounded the datagrid through a div tag.i was unable to create a new div tag for the other datagrid as it was not working. CSS .div-datagrid { ...Show All
Visual Studio Team System Can't launch word document from Source Control Explorer
I cannot view word documents from the Source Control Explorer using a double click or View command. The cursor briefly changes to busy and then resets to the default. Txt documents and .cs documents work fine. Create a solution (any type, doesn't matter) and add a Word document to the solution. Right click on the Word document in the solution and choose Open With. Select Microsoft Word, if it's a choice, or click Add and add it. Then click Set as Default. It should now open in Word. Buck ...Show All
SQL Server Replicate stored procedures to many db's????
Hi all. The company I work for has several developers and each has his own database. They are all identical....each developer has his own so that he/she can work with data and not bother the other developers. However, if one developer is assigned a category like billing and that person creates/modifies a stored procedure then that person needs to replicate those changes to all databases so everyone is in sync. Granted, two people will never work on a category at the same time (at least not yet). Right now, we have a script that does a good job copying the alter proc to all databases...works really well. So my question is, how do you guys handle a similar situation Anything better/worse Thanks! cbmeeks W ...Show All
Windows Live Developer Forums how to add a video plug-in in Messanger Live?
Hi, everybody I 'm not familiar with Messager Live develpoment, but now I have a small task to add a video plug-in in the Messager Live. 1. This plug-in can be shown at the current position for advertizing, and display video, such as TV program, for the user. 2. The viedo program and source codes are on my hand, but I'm not sure how to add it in Messager Live as a plug-in. 3. Shall I do it by Active SDK or add-in SDK If it so, what shall I do Thanks a lot! hanks 2006-09-02 I've got video working well in the activity window. If you want to see it, check out the Comtec Travel Bot (comtec_bot[at]hotmail.co.uk) and follow the demo to the end. ...Show All
Visual C# when i do a range.select in get a hresult exception HRESULT : 0x800AC472 or 0x800A03EC
hi , i am using excel in my application in that i get an error in my range.select command ,the range i have selected is worksheet.get_range("A1","A1") and i got the above error any suggestions. Thanks Prasad Sethuramalingam Then you need to check if you are trying to access the same sheet in multiple threads Are you accessing the sheet from a different thread Is the Excel sheet itself is locked or protected ...Show All
Visual Studio Express Editions How do you run module at startup?
Is there a way to select a module as the startup object Actually...when "Enable Application Framework" is checked the startup object must be a form....if you deselect that checkbox you will be able to select "Sub Main" Edit: Good one Dave ...(note the time stamps) ...Show All
