Philip Jaques's Q&A profile
Windows Forms font.Height and Graphics.MeasureString failing on user machine?
I have a Forms app that prints reliably on my laser printer but fails on a user's Zebra thermal printer. Filling my code with exception logs shows it throwing System.ArgumentException whenever I try to use the Font.Height property or Graphics.MeasureString on the same font. To help track this down I borrowed the user's printer, installed his driver on my development machine... and it works fine. Any suggestions as to what could be going wrong, or other things to check Have you tried looking for the Zebra's font listing I think most thermal/barcode printers will only support 1 or 2 fonts. The problem with most of these printers is the fact that they use non-scalable fonts. I usually send pri ...Show All
Visual Studio vs2005 add-in - adding pre/post code to methods in class + creating toolbar
Hello, I would like to create addin for vs2005 which will add automatically code to the start/end of each method in active document. I would appriciate you help regarding: 1. how do i create my own toolbar ( i know how to add commandbar to the menus above but i would like to create toolbar). 2. how can i explore the code to find all the methods in order to add them code. 3. when finding the methods, how do i know some information such as : return type, method signature, parameters.... Many thanks, Eran. Hi Eran, See my articles: 1) HOWTO: Adding buttons, commandbars and toolbars to Visual Studio .NET from an add-in. 2) HOWTO: Navigate the code elements of a file from a Visual Studio .NET macro or add ...Show All
Visual C# textbox text to string and back to textbox?
Im pretty new to C# and I am guessing there is an easy answer to this. I am entering a number in a textbox doing a calculation and and then putting that into another textbox. However I am getting the "cannot explicitly convert type string to float" error Is there an easy way to autoconvert the text to a string Better yet how do I force the textbox to only accept strings I tried applying a mask, but could not get it to work. Here is my psuedocode: float discountrate = textBox1.Text; // perform some type of calculation with discountrate textBox8.Text = discountrate; Thanks in advance I am still working on this. I cant seem to create a custom mask that allows any float type number. I am trying to ...Show All
SQL Server scptxfr problems on sql 2005
Having used the scptxfr utility successfully on Sql 2000, I am trying to use it against sql 2005. I have had mixed results, in simple databases this seems to work ok however in complex databases the utility appears to hang, has any one had this problem or knows of a workaround Scptxfr.exe was a tool included with SQL Server 7.0 and 2000, but not with 2005. One option I've heard people using is located here: http://www.codeplex.com/Wiki/View.aspx ProjectName=sqlhost&title=Database%20Publishing%20Wizard Thanks, Sam Lester (MSFT) ...Show All
Visual Studio Express Editions IOException (disk full) problem
I using this code to save a file: private void saveToolStripButton_Click(object sender, EventArgs e) { if (saveFileDialog.ShowDialog(this) == DialogResult.OK) { try { // Opens a file and serializes the object into it in XML format. Stream stream = File.Open(saveFileDialog.FileName, FileMode.Create); SoapFormatter formatter = new SoapFormatter(); formatter.Serialize(stream, lev); stream.Close(); } catch (Exception ex) { MessageBox.Show( "Could not write file to disk: " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } } it work ...Show All
SQL Server Error exporting report to PDF
I have a report with embedded subreports for different departments. When I render a department with short subreports the report exports to PDF fine, but when I have a department with longer subreports then I get an error when exporting. Here is the tail end of the error message in the log file: inetinfo!library!334!03/01/2006-16:08:30:: i INFO: Call to RenderNext( '/Budgeting/Department_Spending_Report' ) inetinfo!chunks!334!03/01/2006-16:08:30:: i INFO: ### GetReportChunk('RenderingInfo_PDF', 2), chunk was not found! this=a34ae82e-c4b2-4343-be6b-3989db988405 inetinfo!reportrendering!334!03/01/2006-16:08:32:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.WrapperReportRenderingException: Exception of type Microsoft.Repor ...Show All
Visual Studio Express Editions Build Error
Every time I try to publish this quiz program I get an error that it failed to publish because it failed to build. It goes on and says: Error 2 Unable to copy file "bin\Release\Literature Quiz.exe.manifest" to "bin\Release\Literature Quiz.publish\Literature Quiz_1_0_0_0\Literature Quiz.exe.manifest". The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. Literature List Quiz Multi-form RenditionError 3 Unable to copy file "Lit Base MulitForm.mdb" to "bin\Release\Literature Quiz.publish\Literature Quiz_1_0_0_0\Lit Base MulitForm.mdb.deploy". The specified path, file name, or both are too long. The fully qualified file name ...Show All
Visual Studio Sandcastle: Error while DocumentationProcess
Hi, The project was VSTO 2005(visual studio tools for office) application, While the process of documentation I am getting this error. ------------------------------------------- Error: Unresolved assembly reference: Microsoft.Office.Tools.Word (Microsoft.Office.Tools.Word, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a) required by Pfx.SmartTools.Word ------------------------------------------------ Please help me how to resolve this problem. Thanks & Regards Rama Gudimetla Rama, This is due to not specifying the dependencies. Please see http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=796618&SiteID=1 and http://forums.microsoft.com/MSDN/Sh ...Show All
.NET Development Will ado.net transaction sql server peformance
Hi All, I have a scenario where i have to use ado.net transaction. This transaction losts for almost 10min. During the transaction period none of users will be accessing the application. I am using many temporary tables in stored procedures which participate in the transaction. I would like to know after the ADO.Net transaction is complete will there be any hit on sql - server peformance. When the sql server and applicaiton server(IIS) is on the same machine ( test enverionment) after the transaction is completed my system is giving me a message saying virtual memory is low blah blah... Can you kindly let me know the answer and reason. Thanks, Raghunath K Although trnsaction are expensive objects, they should be cleared after the ...Show All
Visual FoxPro SCATTER/GATHER
Hou can I "scatter" in a method (valid) and "gather" in other method(click).My vf.7 is forgetting all "m." variables between methods. Thanks, Daniel The ideea is: I like to do gather in other method (for example a click method(when I press a save button)).I don't know to create a table using "SELECT"!! .I am working with tables. I have very much operations between fields to use buffering and too manny databases opened. ...Show All
Windows Forms Where does my application reside
Not sure if this is the correct forum for this question...but.... I've created an application and it works great..just one quesetion.... After I publish it, then install it....When I press "start'-'All programes'..I see my app with no problem...But I can't find it in windows explorer.....when I right click-properties I see...C:\Documents and Settings\Administrator\Start Menu\Programs\MyApp...When I navigate to that location all I see is a shortcut......WHERE ARE ALL THE FILES. Usually when you install a program...you see the files in 'C:\Program Files' the app files reside in an obfuscated directory location under the users (installing users) profile. hope that helps ...Show All
SQL Server Real size of database
I have a database which I do not think is really big, but when it was created the initial file sizes where set to very large amounts. How do I get the actual size of the data When I do shrink database, SQL say there is no space to reclaim but when I back it up the backup is extreamly small, does this mean that shrink database will not shrink past the original size How do I resize the database to only the actual size needed Here is the result of sp_spaceused: database_name database_size unallocated space -------------------------------------------------------------------------------------------------------------------------------- ------------------ ------------------ CCCca 99863.81 MB 96318.27 MB reserved data i ...Show All
Smart Device Development Issue with MS POOM Sampe for WM 2003 - pimstore.h
Hi all, I have downloaded the MS POOM Sample in which I have to compile the Native DLL in MS Embedded Visual C++ (I'm using version 4.0). But when I attempt to compile/build the project to generate the pocketoutlook.dll I get an error message stating the following... fatal error C1083: Cannot open include file: 'pimstore.h': No such file or directory I have downloaded the Windows CE SDK 4.2 as I though the pimstore.h was part of that, but it seems it isn't. Does anyone know why pimstore.h can;t be located by Embedded Visual C++ Thanks This forum is primarily monitored by Visual Studio for devices group. Please check this link for more appropriate forum for this type of queries. http://forums.microsoft.com/MSDN/ShowPost.aspx Pos ...Show All
Visual Studio Duplicating labels
I’m currenty defining an automated build system for our development. Using VSS v8.0, I’d like our developers to use a label called "Release", whenever something is checked in AND ready for release. My daily automated build and test system should then be able to get all the files with this label "Release". This works fine. The next thing I would like to do is set a new label based on all files/projects that have this label "Release". This seems to be impossible in VSS. Apparently I can only replace the label "Release" with the new label. "Release" however, should continue to be present and should be changeable in the future. My problem is that I want to keep track of the exact file ...Show All
Windows Forms DataGridView/DataSet problems
Hi, In my application, I have a main form which opens another form (I will call this the child form). The child form is a sort of browser to allow me to look at the contents of a SQL database (there are many different databases in my application). I have set up my DataSet as a public static on my main form. When the child form is opened, it accesses this DataSet by accessing the class of the parent form and populates the DataGridView. When the child form is closed, I clear the DataSet by doing this: dSet1.Clear(); dSet1.Dispose(); When I breakpoint the code, it looks good. The DataSet variable shows clear. If I use my ListBox to browse to another table and open the child form again, I have a bizzare problem. All the columns ...Show All
