wissgtbob's Q&A profile
Software Development for Windows Vista Unable to create XPS doc with A5 pages
I've been bashing my head against this on and off for days and finally accept defeat! How do you save or print items from an ItemsControl to an A5 page with a transform to fit the page I have 2 separate problems (I think):- 1) The XpsDocument ignores the PrintTicket and defaults to something like NorthAmericanLetter. 2) The items I'm trying to print are part of an existing visual tree. How can I scale and translate an item when writing it to the document without affecting what is currently rendered to the user This is the code I'm using:- public void SaveItems( ItemsControl ic, String fileName) { LocalPrintServ ...Show All
Visual Studio Error while checking-in in VSS 6.0
In my .Net project (inside Visual Studio .Net) some files (.VB, .RESX) are not possible to check-in!! When try to do this, message is shown: "Error reading from file". Then it say, "file <VSS path for file> already exisits". None of these were NOT checked-out by me. When try to look for this in SourceSafe, clicking the folder which has those files says, "Error reading from file". I deleted one of these files from the project. And later readded. But still that file is shown (inside VS .Net) as checked out, and not possible to check in!!! What could be the reason and what is the possible solution Pls let me know. Thanks ...Show All
.NET Development Serial data to a text box
Hi I am just starting out with C#. All i want to do is collect data from the serial port and show it on my form Text box etc. Eventually I want to save the data to a file. I have created a form with a button and a textbox, plus serialPort1 tool. The following does not build private void button1_Click( object sender, EventArgs e) { textBox1.Text = serialPort1.ReadExisting; Would You mind to put more code on what You are now trying to do From What I know... 1. The UI thread which contains the Textbox.Text property can't be access as your code cause the Seri ...Show All
Visual Studio Critical bug in ItemGroup!! Show-Stopper!!
The following MSBuild script demonstrates a bug in the ItemGroup behavior. The problem is that the ItemGroup file mask is evaluated at the START of script execution instead of when it is first referenced. This means that ItemGroup cannot be used to group files which are generated during the execution of the script... They are silently skipped! I tried using CreateItem but I still couldn't make it work. Anybody even have a workaround <Project InitialTargets="failbadly" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup> <BustedFiles Include="Foo\*.*" /> </Ite ...Show All
Visual C# Error Sending Emails
Hi All I am converting a program from 2003 to 2005 that sends an email to a customer, this all worked in 2003 but when I try to send in the new program I get the message Command not implemented. The server response was: Sorry no ESMTP Does this mean that the server I am trying to connect to does not support ESMTP and If so can I force it to send as SMTP If not does anyone have any ideas as to why this is happening please (everything has been setup the same as in the old program) Thank You Hi Sending email i-VC# 2005 using System.Net.Mail; MailMessage m ...Show All
Windows Forms How do I prevent Ctrl-N from creating a new web browse from C# Windows Forms App?
Hi, I have a WebBrowser instance in a UserControl derived class using .Net 1.1 and C# in a Windows Forms application. How can I prevent a new window from being generated when the user clicks inside the browser and presses the Ctrl-N key sequence I've tried handling the following AxWebBrowser events: BeforeNaviate2 ClientToHostWindow NewWindow2 NewWindow3 I must be missing something... Thanks in advance for any help. -Roy Hi Roy, How To Cause Navigation to Occur in Same WebBrowser Window Please note that Internet Explorer does not fire a NewWindow or NewWindow2 event ...Show All
SQL Server OLEDB question
This may be a newbie question but here it goes. I have SQL Server 2000 running on a windows server 2003 machine. When i have my database local, on MSDE everything is fine. But when i switch my code to move to the server, (after i've attached the database within the server) it tells me that server either does not exist or login failed. Now here is my connection statement OleDbConnection m_conn; string connectionString = "Provider=SQLOLEDB;Data Source=SERVER1;Initial Catalog=workups;Integrated Security=SSPI"; m_conn = new OleDbConnection(connectionString); Now like i said when i change the Data Source from ( ...Show All
Visual C# 'My' in Vb.net
in VB.net we can write ' My ' in our code like My .Network My .Computer what can we use equal that in C# See http://blogs.msdn.com/danielfe/archive/2005/06/14/429092.aspx for one My-like library. ...Show All
.NET Development registering for COM interop creating duplicate registry entries.
Hi, I am working on .NET 2.0 beta2 on Windows 2000 advanced server. I have created small .NET dll, in which I have exposed a number of classes for COM interop using ComVisible(true) on those classes, for example: [ComVisible(true)] [ClassInterface(ClassInterfaceType.None)] public class Class1: IClass1 { private int i; public int GetInt() &n ...Show All
Visual Studio 2008 (Pre-release) Simple ListBox template change, big performance degradation
I have a ListBox in my application showing around 200 items where the items use their respective data templates. The performance was good enough. Because I needed to put some status information embeded in the ListBox, I modified the ListBox Template to include a TextBlock at the top. To my surprise, when I did that, the performance of the ListBox was greately reduced!! It's 10x slower or more on many aspects: when populating, when selecting an item, when scrolling, etc. Does anybody know why adding a DockPanel and a TextBlock makes it so slow The two styles are listed bellow. Style1 keeps the listbox fast. Style2 mak ...Show All
Windows Forms Wondows Form Designer Disappeared
I have been working on a project for 2 months. I have several forms as part of the project. The main form has controls that activate the display of other forms. As I was working on the project, I closed the various xxxx.h(Designer) windows to work on just code. When I finished I tried to open the main application windows by selecting VIEW>Designer but it was not there. The only selection was VIEW>CODE. My other forms can still be displayed using VIEW>DESIGNER but the main form can not. What I noticed is the icon shown in the Solution Explorer changed from a FORM to a simple HEADER. How can I recover the form Is there are ...Show All
Visual Basic ToolStripStatusLabels
How do you make a ToolStripStatusLabel have a ' CAPS ' feature (like, say, if CAPS LOCK is on, it'll say CAPS in black, but if it's off, it'll say CAPS in gray ) I can only partially answer your question. My.Computer.KeyBoard.CapsLock is a boolean type property. It will tell you the status of the Caps Lock Key. But I can't tell you how you would constantly monitor for any changes made to it. As a newbie, first instincts would tell me to put an if then else in the KeyUp Event of the form that holds the StatusStrip. However, I believe this wouldn't work if, you would hit the Caps Lock Key while a TextBox or other control on your form h ...Show All
.NET Development How to create XMLDocument using code that has multiple namespaces
Hi, I need to generate an XML doc which looks something like this: <Report xmlns=" http://ReportSchema " xmlns:rd=" http://DesignerSchema "> <Width>8in</Width> <rd:DefaultName>report1</rd:DefaultName> </Report> When I call CreateNode for the 'Report' node, I pass in the ReportSchema for the URI, but I am not sure what I can do to get the second namespace in there as well. Also, when I create the rd:DefaultName node(using CreateNode), I specify the namespace DesignerSchema, but the namespace is applied for that node only (as expected). But what I want is to specify t ...Show All
SQL Server Transfer SQL Server Objects Task gives error with SQL Server authentication
I was trying to transfer a SQL Server 2000 database to SQL Server 2005 using SQL Server Objects Task. However, The following error message was encountered: "[Transfer SQL Server Objects Task] Error: Execution failed with the following error: "Cannot apply value null to property Login: Value cannot be null..".“ Once I changed the authentication mode from SQL Server authentication to Windows Authentication for the connections to sql server 2000 and sql server 2005 in connections manager, the package got executed successfully. Can anyone tell me why the package was giving this error with t ...Show All
Visual Studio Extending editor context menu for .xml and .css files?
I have a VSIP package with several commands. Those commands are added to the editor's context menu. In .ctc NEWGROUPS_BEGIN section I have a context menu group set up via guidSHLMainMenu:IDM_VS_CTXT_CODEWIN parent group Id. Unfortunately, that doesn't cover .xml and .css (and some other similar) files. Thus my menu items don't appear to in the context menu for those particular file types. Could someone share the group Id (similar to the one shown above) for .xml and .css files context menu please Thanks in advance. Thanks. Ed Dore had actually replied to the same post on .vsip (nntp) newsgroups. Makes me won ...Show All
