lex23456's Q&A profile
Visual Basic Printing a File
Hello NG, First, I work with VS2003 (Framework 1.1) Got a bit of a problem. I want to print a file on the default printer. This is how I got so far: ' Get the default Printer Dim oPS As New System.Drawing.Printing.PrinterSettings Dim GetDefaultPrinter As String GetDefaultPrinter = oPS.PrinterName Dim pd As New System.Drawing.Printing.PrintDocument pd.PrinterSettings.PrinterName = GetDefaultPrinter pd.DocumentName = [Here document, but HOW ] pd.Print() Please can anyone help a bit. Thanks, Lars Actually, there are two different kind of files (*.txt and *.pdf). These files are extracted from a SQL Database (these Files are stored there in an Image Field) an ...Show All
Visual C# Is Vista mostly C# .NET?
Is C# .NET 2.0 or NET 2.0 family used in many applications I am wondering what is the market share on C# Many companies still rather program using MFC /Windows.h with C++ instead. Since I believe you will have more control on your application. It would be nice to do a GUI like MSN Messenger 8. I heard Vista is 90% all .NET 2.0 but many other people saying it is 0%. So what is the truth It depends upon what you count as being part Windows Vista. From what I understand (and, I'm no export), they are using C/C++ for the Kernel (because you pretty much have to). But, for most things on top of the Kernel, including libraries that are considered part of the Windows Vista SDK, are being written in C#. C/C++ is used for par ...Show All
Visual Studio How to change colors for Error List viewer & Resource viewer (Strings) ?
Well, I searched & searched and couldn't find an answer to : "How do I change the colors for the Error List & Resource viewer (strings). " My windows colors are white text on black background, these Visual studio viewers enforce the text color to black, but they do not enforce the background to white, as a result I get black on black = invisible. Yes, I looked already in Tools->Options->Environment->Fonts & Colors and there's nothing there. It'll be good enough to know this is not possible to stop looking. Thanks. R I have reproduced the problem on my computer. It seems a bug to me. Stop searching and report the bug at Connect: http://connect.microsoft.com/fe ...Show All
SQL Server where can i put my stored procedure
hello friends i am doing databases shrinking.i take connection as as admin of sql. every thing is write i need to shrink all my databases. i written one stored procedure ALTER PROCEDURE [dbo] . [SHRINK_SP] ( @TABLE varchar ( 15 )) AS SET NOCOUNT ON ; EXEC ( 'DBCC SHRINKFILE (' + @TABLE + ', 0)' ) EXEC ( 'DBCC SHRINKTABLE (' + @TABLE + ', 0)' ) but i dont know where to execute this stored procedure if i execute this stored procedure in one datbases its working remaing thigs its not working how to solve my problem anybody help me.. thanx put it in the master database name it Sp_procname that makes it global "sp_" is used to denote a global sp. it will be search ...Show All
Visual C# Deploy Crystal Reports
Hello I have developed a windows application in VS.NET 2005. I have added some Crystal Reports.I made a setup project for deployment, and added the merge modules required for Crystal Reports. It is working properly. The problem is , I have to edit the App.config file during installation of my project.It is working properly in machines having VS.NET 2005 installed. But in machines having only .Net Framework, some error occures during installation and it rolls back. If I remove the Custom Action of editing the config file it is working properly. The erro message is "Unable to get installer types in the <project_name.exe> assembly. -->Unable to load one or more of the requsted types.Retrieve the LoaderEx ...Show All
Windows Forms Press control-D keys will insert a date into a textbox.
I have a comments textbox. I want to have control D( Ctrl-D) keys being pressed and it will insert a date in the textbox. Sound simply but I look around the web, still didn't know how to do it. Is it what you are looking for void textBox1_KeyDown(object sender, KeyEventArgs e) { if (e.Control && e.KeyCode == Keys.D) { textBox1.Text = DateTime.Now.ToString(); } } ...Show All
Visual Studio Documenting public nested classes/types produces incorrect namespace
In the namespace overview the parent class of a nested-class is not shown. Also in the class-overview this parent class is not shown. It appears as if the nested class is a 'root'-class in the namespace displayed. However, this nested-class isn't located there, but its parent class is. T his is very irritating when a user tries to instantiate a public nested-class based upon the documentation (the documentation doesn't display the right namespace the class is located in). I've fixed this in my sandcastleGUI program ( http://www.inchl.nl/SandcastleGUI ) by parsing the outputted html, but I believe it should be fixed in the Sandcastle builder-program. Your post was little confusing. I believe you mean “ ...Show All
Visual Studio Team System Creating custom tests
I'm implementing integration of NUnit tests into Visual Studio 2005 Team System for Testers. I saw that Visual Studio UnitTests have Extensions .dll and .exe and not .cs. If I set in my package attribute RegisterTestTypeNoEditor parameter extensions to .dll and .exe my Tip.Load method is not invoked. If I set extensions to .cs this method is invoked, but gets path to source code files in location parameter. VS UnitTests get there assembly path. What do I need to do to get assembly path instead of sourcecode file What is CMProcessor Right now, we dont support publically extending the CodeModelProcessor infrastructure that allows you to hook in to do live source updating ala the build in Unit Testing s ...Show All
SQL Server How can I be assured that I do have SP1 applied correctly in SQL 2005 Developer Edition
I installed my SQL 2005 Developer edition and applied the SP1. I didn’t have a time to wait the installation to complete (I needed to reboot) so I cancelled the SP1 which was downloaded from Windows Update. Now, my development PC says that SQL 2005 SP1 is applied but I am not sure if it’s applied correctly. I tried to reinstall SP1 in order to be assured but I can’t get it reinstalled. I get error message saying that you already have SP1 2047 ENU applied. I just don’t want (have a time) to troubleshoot some possible upcoming issues in development because of this. So, how can I be assured that I do have SP1 applied correctly I try to uninstall the SP1 but its not possible, so I guess in order t ...Show All
SQL Server SET doesn't work
When I try to install the problem I get the following error. The SQL Server service failed to start. For more information, see the SQL Server Books Online topics, "How to: View SQL Server 2005 Setup Log Files" and "Starting SQL Server Manually." The log tells me nothing useful. I can't start the thing manually because after clicking cancel on the error message, the installer proceeds to roll back the installation. How do I fix this problem Hi, you can start sql server manually using sqlservr.exe -m (single user mode and if you give -f will start sql server in minimal configuration mode) Ensure the User Account used to start SQL Server Services have proper ...Show All
Visual C# FolderBrowserDialog Exception when creating folder on Desktop
Hi, I have a problem with a FolderBrowserDialog. I use VS2003, C# language on a Windows 2003 System and I ran the test project from an Administrator user. So, I tried to specify a path to a folder using the FolderBrowserDialog. However, if I browse to the current user Desktop and press "MakeFolder", an exception occurs: System.Runtime.InteropServices.SEHException: External component has thrown an exception. at System.Windows.Forms.Shell32.SHBrowseForFolder(BROWSEINFO lpbi) at System.Windows.Forms.FolderBrowserDialog.RunDialog(IntPtr hWndOwner) at System.Windows.Forms.CommonDialog.ShowDialog() at TestFolderBrowserDialog.Form1.btnBrowse_Click(Object sender, EventArgs e) in The folder is created but the Fold ...Show All
.NET Development Easy Question. How put scroll following abilities in Asp Menu ?
I have one Menu in asp . But know i just want menu following if a scroll down or up. I see i can do this with javascript, but how can i put this have someway to use code asp in menu and put follow scroll Thanks See.... I have this code and i need put something to do menu follow scroll. I think in this javascript ... var Hoffset=200 // largura var Voffset=160 //altura var ieHoffset_extra=15 var cross_obj= document.all.staticbuttons function positionit(){ var dsocleft=document.body.scrollLeft var dsoctop=document.body.scrollTop var window_width=document.body.clientWidth+ieHoffset_extra var window_height=document.body.clientHeight cross_obj.style.left=parseInt(dsocleft)+parseInt(window_width)-Hoffs ...Show All
Windows Forms DataBinding , wrong values
Hi! I make DataBindings in my app and don't work good, binding controls show erroneous values. I have two DataTables, PersonsDataTable with columns{"ID","NAME","LNAME","PHONE","LANG_ID"} , and LangsDataTable with columns {"ID", "LANG"}. I'm trying that when i change the value in cmb_Combo, all controls changes to the its respective new value, but altought all controls changes its values ... ALL VALUES ARE WRONG !! I don't why, and i don't know where obtain this values, but point to an erroneous register .... i'm desperated, because i thought that was a correct values, and today, by chance, i test the values with the SQLServer ... surprise! Please help. I stoped the code to see the DataTables content and is correct. ...Show All
Visual C# vb to c# code conversion
does anyone have any idea on how to convert this to c# Sub shutdown() Dim t As Single Dim objWMIService, objComputer As Object 'Now get some privileges objWMIService = GetObject( "Winmgmts:{impersonationLevel=impersonate,(Debug,Shutdown)}" ) For Each objComputer In objWMIService.InstancesOf( "Win32_OperatingSystem" ) t = objComputer.Win32Shutdown(8 + 4, 0) If t <> 0 Then 'Error occurred!!! Else 'Shutdown your system End If Next End Sub i could use the same thing for logout and res ...Show All
Visual Studio 2008 (Pre-release) .NET 2.0 client code to WCF service
Did any one experiment with .NET 2.0/1.1 client code (no WSE) that interoperates with WCF service I am interested in the client code in this scenario given that WCF has policy enabled security. Also can WCF security completely turned off so that the sevice looks similar to asp.net 2.0/1.1 web service in terms of WSDL (and during runtime also) The objective is to call the WCF service from unmanaged windows code (and later from other platforms) with/without tools. Thanks. Can you please check this sample,in this sample ,asmx code may be on .NET 2.0 without WCF. http://windowssdk.msdn.microsoft.com/en-us/library/ms751433.aspx ...Show All
