Vighnesh Prabhudesai's Q&A profile
Windows Forms URGENT HELP - PRINT
C# - Windows Application (VS 2005) - OLEDB --------- Hi, I have a network printer IP: 1.2.3.4 shared name \\ns\admin_print$ I want to use a button within a form to print out the details of the form (data is from database). When I clicked the button, it will print straight to the designated printer. I do not want to have a print dialog to select printer. I do not know how to start with the code. Can someone advise private void PrintReport() { } well you need to set the printername of the printdocument settings/class to the printer you want to print. (PrinterSettings.PrinterName) you must be sure its correct however. See if it selects the default printer automatically when you create a ...Show All
Windows Forms Deploying Files from Multiple projects
I have a windows forms solutions with multiple projects that are built as class libraries...and a main winforms project...the class libraries have content files that are set to copy always and marked content. When using clickonce these files are not copied to the clickonce application. How do I copy these files in the published application without having to add the files manually to the main winforms project Thanks, rhorner While we did some testing to make sure that we picked up nested dependencies and references, we don't pick up nested content files. The way references work, these files aren't picked up by the project system either. As a result, the only solution is to add the files to ...Show All
Visual Studio Tools for Office Questions About VSTO
I'm already having Visual studio Professional 2005 and also want the facilities which VSTO is providing (without using Visual Studio Team Edition as that is very expensive), do i have any upgrade options which can just give the functionality of VSTO which is missing in professional edition If yes, then what is the cost Can we do VSTO installation on top of Professional Edition without overwriting any of the existing features Has anybody tried it Will features of both editions will come without conflicting anything As far as I know, there is no other option than to obtain the entire VSTO package; no upgrade option. You can install that "over" Visual Studio - it functions li ...Show All
Visual FoxPro Using Checkbox in a combo, or using Grids as combos?
Hi; I need a class which will act like a combo, but will let the user select multiple items using a checkbox. Can this be achieved by using a combo I seem to remember reading somewhere that a grid can be utilized to act as a more advanced combo. Anyone can point me to the right direction Thank, Aleniko Depends on the number of records. If it is not too many then the native combo can do the trick with multi select turned on. If the number of records exceeds 100 or so then a grid (such as Marcias at www.tightlinecomputers.com ) OR Mike Lewis's SimpleList class works well. See http://www.ml-consult.co.uk/foxst-28.htm Mikes class is probably the easiest for simple selections, but Marcia ...Show All
Architecture When and Where to use Interface
Hi All, I have a question here.Im bit confused of interface usage. Is it correct to have a separate separate interface for data objects I have around 10 business classes and have corresponding 10 data classes. Do we need to have a separate separate interfaces for each and every data class What is the correct norms of using interface Please clarify this. Thanks in advance. Hi Brendan, Thanks for the information.I ll give more information about the classes being used here. I have 5 business objects and similarly 5 data objects. All the classes are internal and within application domain and no COM components being used. Question 1 In the above mentioned scenario do you feel it is necessary to have ...Show All
Software Development for Windows Vista BizTalk 2006 Dynamic Mapping.
Hi, Does BizTalk 2006 allowing the end users to change the mapping as and when required, I am looking at a feature where the product comes with a default mapping as and when a new requirment comesup the end user some how without visual studio should be in a possition to change the mapping Thanks, Pramod. All BizTalk questions should be asked in one of the forums found at http://www.microsoft.com/technet/community/newsgroups/server/biztalk.mspx . This forum is for questions about Windows Workflow Foundation. ...Show All
.NET Development Creating Virtual Directory and App Pool
Could anyone point me to some sample C# code that demonstrates how to create a virtual directory, app pool, associates app pool with the virtual directory etc. If this isn't the correct forum for this question, please let me know what would be more suitable. Thanks very much. Take a look at this http://www.codeproject.com/csharp/VirtualDirectoryCreation.asp http://www.dotnetjunkies.com/WebLog/ramdash/archive/2004/08/11/21735.aspx how about this code: //Create a virtual directory System.EnterpriseServices.Internal.IISVirtualRoot vr = new System.EnterpriseServices.Internal.IISVirtualRoot(); string sError; vr.Create("IIS://localhost/W3SVC/1/Root",@"C:\Demos\WebServices\","WebS ...Show All
Visual Studio 2008 (Pre-release) Data Binding from Different Assembly
Dear all, I have recently attempted to data bind an object class from another assembly to the WPF application, however, the data cannot reflect successfully. I have used the same XAML and code-behind coding that bind the object in the same assembly to the WPF application that works. In addition, I have added the following: xmlns:src = " clr-namespace:xCAP.SampleSystem.Chat;assembly=ChatService " So what do I need to do beside the above Regards chm Hi, The following is what I have for my binding syntax : Dim DataProv As New ObjectDataProvider Dim testMsg As New TestMessage DataProv = Me .FindResource( "test" ) testMsg = DataProv.Data te ...Show All
Visual Studio Installing SQL Server 2005 and VS Dot Net 2005
Hi I'm trying to install SQL Server 2005 and Visual Studio Dot Net 2005. Now, when i install VS DotNet 2005 1st, it install SQL Server2005 services with it. and after that whn i try to install SQL Server 2005 fully, it says that u'v already installed 2005 components and it did't install SQL Server 2005. And if i install SQL Server 2005 1st... it installs successfully but whn i try to install VS DotNet 2005 it says that i'v to uninstall SQL Server 2005 first. I'm really consufed... plz help me Yes... i reinstall my windowsXP just to make sure that no components left installed. Then i install SQL Server 2005 first. And immidiatelly after that whn i tryied to install VS DotNet 2005, it checks my system n then prompt ...Show All
Visual Studio Team System Custom work item editor
Hi all, i want to construct a custom work item editor with custom controls. I would also ike to reuse some of microsoft controls like the linkcontrol for example. i found the linkcontrol in the Microsoft.TeamFoundation.WorkItemTracking.Controls.dll assembly. Unfortunatly, i haven`t figure out ho to use it. If somebody could help me out, i would really appreciate. Freddo Just an FYI in case you haven't realized and if it will reduce your effort: SP1 will support custom controls- Thus... that may change your mind about creating a whole new custom work item editor. Just thought I'd pass that along in case it helped you decide where to put your efforts. ...Show All
.NET Development how to use a cs files objects at runtime?
I have a program that creates a cs file. I would like to access it's classes at runtime and create objects of it's classes and use them. How should I approach it. Is there a way I can progmatically compile and create instances of it's objects for use Thanks, Devin How to run command line compiler. I need to compile during execution of other code as the code in the cs file will change dynamically and have to be re-compiled periodically. I saw Microsoft.Build.(...) namespaces and that seems where I need to look for command building right Thanks, Devin ...Show All
Microsoft ISV Community Center Forums How do Programmatically insert an ole object into an access database
I am working on a VBA program in MS outlook in which I am using ADO to update ms access database. It works fine for my text fields, but I am not sure how to update an Embedded Object field. Anyone know how I can do this For example I have a database called C:/Test.mdb with table "My_Table" containing a field called "Email_Message" with data type OLE Object: Function LogEmails() Dim msg As MailItem Dim rs As New ADODB.Recordset Dim cn As New ADODB.Connection Dim strSQL As String Dim FilePath As String Set msg = ActiveExplorer.Selection.Item(1) FilePath = "C:\Test.mdb" Set cn = New ADODB.Connection With cn .Provider = "Microsoft.Jet.OLEDB.4.0" .ConnectionString ...Show All
SQL Server DataFlow Task & Filters
Hi, I am getting data from an external source. External data has a column called "Type". I have a variable in my package which contains the list of types as shown below: Filtered_type_List = 2,4,8,10,11 If this variable(Filtered_type_List) is blank, then I need all the data from the external source and if it is not blank then I only need the records matching to his list. How can I implement this in DataFlow Task Thanks You could do this in an expression. Something like: "SELECT * FROM MyTable " + (LEN(MySSISVariable) != 0 "WHERE MyColumn IN (" + MySSISVariable + ")" : "" ) That expression will (I think) add a WHERE clause if the length of the string inside the varia ...Show All
.NET Development Problem with C# using XPathNavigator
...or maybe I just don't know what I'm doing! Which could be a very good possiblity. Going to explain what the app is actually doing first. I'm saving some file paths to an xml document. It is pretty much like a config file. I can successfully save folder paths. If I try to save file paths, then for some reason it just doesn't write the info to the xml document(ex: C:\Windows\NOTEPAD.exe). First I'm converting the string to unicode, then converting to Base64String, and saving. for ( int x = 0; x < listBox1.Items.Count; x++) { filestring = Convert .ToBase64String( UnicodeEncoding .Unicode.GetBytes(listBox1.Items[x].Text)); } xnav.SetValue(filestring); //this i ...Show All
Visual Studio 2008 (Pre-release) x:Static works as element but not as attribute with statics from project?!?
I'm running Vista RC1 and playing with x:Static in elements and attributes and noticed a behavior that I'm not sure if it is by design or not. Here's the minimal repro: Start with a Window and let's use a static from the system as its title, using attribute syntax. (The static can come from any referenced assembly in this case, just not from the assembly being compiled): < Window x:Class = " XamlTests.Window1 " xmlns = " http://schemas.microsoft.com/winfx/2006/xaml/presentation " xmlns:x = " http://schemas.microsoft.com/winfx/2006/xaml " xmlns:s = " clr-namespace:System;assembly=mscorlib " Title = " {x:Static Member=s:Environment.CommandLine} " > </ Window > ...Show All
