GregQuinn's Q&A profile
.NET Development Object does not match target type when raising an event from c# to VB6
I have a c# .net DLL that I use from a VB6 app. It exposes an event, and the VB6 app is sinking it. The VB6 app is receiving the event, as long as it is raised from the main thread of the .net DLL. I have an aync task being handled inside the DLL (delegate BeginInvoke). Any attempt to raise the event from within that thread casuses the reported error, even from within the AsyncCallback function, when the thread is ending. I noticed that the delegate for the event is not declared inside the interface. It's in that module, but above the interface definition: [ComVisible(false)] public delegate void Logging ...Show All
Windows Forms Default Properties
I am creating custom controls for a project and I want to set default values for background color, fonts, etc.. I want to change these values in the controls AND I want the IDE to reflect any changes. I'm new to VB.NET and can't seem to find out where to set these values so that Visual Studio does not add code to the code&nbs ...Show All
Visual Studio 2008 (Pre-release) constructors in a class data contract?
Just curious, if I create a data contract with a class will the constuctors get called in the client, service or both If I have the following, will the constructor get called on the client side or will the constructor get called on the service side during deserialization or not at all I have done testing and it seems to not get called, but I wanted to ask the question anyway. Thanks! [DataContract] public class Person { public Person() { this.Name = "No Name"; } private string _Name; [DataMember] public string Name { get { return _Name; } set { ...Show All
Visual Studio SourceSafe, VS.NET 2003 and Stored Procedure Versioning
Hi, Any Help I am version controlling my stored procedures via .NET IDE & VSS. Background: ================== I have VS .NET 2003, Visual SourceSafe v6.0d and MS SQL Server 2000. When one wants to version control their stored procedures, they can do this fairly easily through the VS.NET IDE. As an FYI - If you care - Here is an old sample of how to do this http://weblogs.asp.net/fmarguerie/archive/2003/02/24/2880.aspx ================== Problem: The VSS database has MOVED (in this case, to a different server). Everything involving the SP versioning is now haywire. The problem seems to be rooted in the fact t ...Show All
Visual C# Casting generics, why this code does not work?
using System; using System.Collections.Generic; using System.Text; namespace GenericsInheritance { class Program { static void Main( string [] args) { } } public class A { public string X; } public class B : A { public string Y; } public class L1 { public SortedList < int , A > MyList = new SortedList < int , A >(); } public class L2 : L1 { public SortedList < int , B > MyNewList { get { The casting has a problem return ( SortedList < int , B >) this .MyList; } } } } The problem is in the fact tha ...Show All
.NET Development CASTING UNTYPE DATSET TO TYPED DATASET
hi, i have problem while cast untype dataset to typed dataset. example source below. both xml schemas are same. can anyone meet that problem. SqlConnection sqlcon= new SqlConnection(constring); SqlCommand sqlcomm = new SqlCommand("select * from tbl_problemgroups",sqlcon); sqlcon.Open(); SqlDataAdapter dbadap = new SqlDataAdapter(sqlcomm); // Typed dataset Dataset1 dbset1 = new Dataset1(); DataSet dbset = new DataSet(); dbset.ReadXmlSchema(@"E:\Documents and Settings\raskerov\My Documents\Visual Studio Projects\test1\Dataset1.xsd"); dbadap.TableMappings.Add("Table","tbl_problemgroups" ...Show All
Windows Forms How to include custom prerequisites in to my setup project
Hi, I am devoloping a setup & deployment project where i got a problem . here i have a customized dilogue box in which there are 4 products , our customer can select any one of the product the 2nd and 3rd products need sql express where as 1st and 2nd product need other scanner drivers so, if our customer select 2nd or 3rd product i am checking in to registry werther the sqlexpress is installed if not installed i am starting the sql express installer but here i am getting problem i am getting message Another installation is in progress.you must complete that installation before continuing this one what is solut ...Show All
SQL Server RPC/SP Complete trace time difference ?
Hi There I have been tracing some long running sp's in our database. Now 95% of the time the RPC Complete: that exec's a sp and the SP Complete: events in the trace duration times are almost identical. Somtimes i find the following situation. RPC Complete : exec sp_bps_all_auth_not_invoiced @startDate = 'Sep 25 2005 12:00:32:000AM', @endDate = 'Sep 28 2005 10:36:32:000PM' - Duration 71 seconds. SP Complete : exec sp_bps_all_auth_not_invoiced @startDate = 'Sep 25 2005 12:00:32:000AM', @endDate = 'Sep 28 2005 10:36:32:000PM' - Duration 31 seconds. I am wondering why does the sp take 31 seconds but the RPC that exec's the s ...Show All
Visual Studio Team System Source Control Nightmares
We are using Beta 3 TFS with Visual Studio RC and having complete source control nightmares. Some of the issues I'm having: * I will open solutions that I haven't opened for a few days only to find all or many of the bindings have gone invalid. Most of our solutions contain a mix of class libraries and .Net web sites, but the hosed bindings seem to effect both types of projects. * When I unbind and rebind the projects, attempts to Get Latest say all my files are up to date when in fact they look nothing like what is on the server. Performing a "Get Specific Version" with the "Get files already in workspace" opti ...Show All
Visual C++ converting float to string and string to float
I know this is getting kinda repetitive but...how would I convert a float to a string and also a string to a float..Thanks a lot..(Code samples would be awesome). Echo: I tried your code, and it works with: Int32 i(99); cout << i.ToString() << endl; You might want to make sure you're using the Visual Studio versions of the includes. The /showIncludes compiler flag (set under C/C_+->Command Line) can be used to determine exactly which header file you're pulling in. You should get: 1>Note: including file: E:\Program Files\Microsoft Visual Studio 8\VC\include\sstream 1>Note: i ...Show All
Visual Basic automation to download executables
I'm developing an application to download exe files from an http site. Everything works great up until I try to launch the downloaded executable. I either get nothing, or I get a cmd window open and then nothing. Here's the code I'm using: Public Sub Download(ByVal parstrFileURL As String, ByVal parstrURLUser As String, ByVal parstrURLPassword As String, ByVal parstrFilePath As String, ByVal parstrFileName As String) Try Dim strFlName As String strFlName = parstrFilePath & parstrFileName Dim objURI As New System.UriBuilder(parstrFileURL & parstrFileName) Dim WebReq As new WebRequest = WebRe ...Show All
Visual Studio Team System Installing TFS on a SharePoint Portal Server 2003
Heya, I'd like to install TFS on a SharePoint Portal Server 2003. Is this possible at all Do I still need to install Windows SharePoint Services Cheers, Chris Hi, Sharepoint portal server installs Windows Sharepoint Services by default. So you don't have to install it again. But TFS requires wss SP2 to be installed. So you will have to install WSS SP2 before starting the TFS installation. The link for WSS SP2 is : http://www.microsoft.com/downloads/details.aspx FamilyID=9c552114-dc9a-43ee-9281-b080b7c280b4&DisplayLang=en Microsoft has also released SP2 for Sharepoint portal server. Download link ...Show All
Windows Forms Drag and Drop exception using design surface
Martin, I have an application that I created that has a design surface. I am getting an exception when dragging and dropping a component on the design surface. The component is already on the design surface before dragging it. The exception locks up the GUI thread and it is not easily repeated. Here is the exception: System.NullReferenceException: Object reference not set to an instance of an object. at System.Windows.Forms.Design.Behavior.BehaviorService.AdornerWindow.StartDragNotification() at System.Windows.Forms.Design.ControlDesigner.OnDragEnter(Object s, DragEventArgs e) at System.Windows.Forms.DragEventHandler.In ...Show All
Smart Device Development How to build Visual Studio 2005 Smart Device CAB files?
Most of my apps are written in VB.NET. I have been convert all my apps over to VS 2005 from VS 2003. I have a lot of Smart Device Programs I have also converted over. Now this is my issue in VS 2003 under the build menu you had Build CAB Files. This would very fast and easy create all your CAB files. In VS 2005 I no longer see that option so how do I do this in this new version There's a separate project for a CAB in VS 2005. Please see this: http://msdn2.microsoft.com/en-us/library/ms228783(en-US,VS.80).aspx ...Show All
SQL Server embbed AS cube browser
Hi, How could I embbed AS cube browser to my application thanks a lot, I have been looking for the same, but so far I have only seen reference to using OWC (Office Web Components) to embed an Excel doc that references the cube. The add-in is available here: http://www.microsoft.com/downloads/details.aspx familyid=7287252C-402E-4F72-97A5-E0FD290D4B76&displaylang=en and I found this link to helpful for initial set-up http://www.upyourasp.net/articles/article.aspx aid=15 The book I found most helpful whas the "Microsoft Office Web Components Black Book with . ...Show All
