taclejj's Q&A profile
.NET Development how to format a number to string using "coma" 1000s
I have a float number 1234555.89 and I need to put in a textbox. How can I convert to string with comas like: 1,234,555.89 and add to text property. thanks in advance for your help, Edward If you just have to store the value in that format then ToString will be enough. But if you want also to edit the value, and after to read the value from TextBox, then i suggest to change TextBox to MaskedBox or NumericUpDown. With MaskedBox and configured Format or NumericUpDown you can show the number in desired format and also to edit the value without problems and also read the value from these controls withouth converting, because they have property of numeric type. ...Show All
Windows Forms How can I use a publish version on the MDI main form?
There are two place to display version of application on Visual Studio .Net 2005 IDE. One is "assembly info" window on the "application" pane. The other is "Publish Version" on the "Publish" pane. I checked "Automatically increment revision with each publish" checkbox on the "Publish" pane because I'm using ClickOnce. The problem is that publish version number and assembly version number are different. When I publish my application for end-user, publish version increases automatically, however, assembly version is not changed. Now, I need to change version information in code level manually, before I publish. I'd love to use "My.Application.Info.Version.Major/Minor/Build/Revision". How can I solve this issue Pl ...Show All
Visual Studio Border lines at page break
Hi, I am working in VS 2005. I am using the ReportViewer control to show some reports. I am using the winform and web forms to show the reports containg tables. I have put the borders to the table. These borders are shown properly in reports rendered in the winform or webform. But when I export it or print it, the borders at end of every page (except the last page) and the borders at the beginning of each of the pages (excepr the first page) are disappeared. My guess is, while exporting / prining , the report viewer is cutting the actual report contests to fit in the pages of the specified print / export sizes. And hence, where the page is broken the border is not drawn, since it's drawn only while rending the report in the web/win f ...Show All
Visual Studio Will VS 2005 run on Celeron processor?
Hi ! I want to buy new computer....I'll be working on Visual Studio 2005....If I take celeron 1.5 ghz....will VS 2005 work on celeron processor Tell me minimum system requirements......If anyone is sure.....is anyone working on celeron and VS2005 Thanks, Jiv yes it will work just fine :-) http://msdn.microsoft.com/vstudio/support/readme/default.aspx ...Show All
.NET Development Com Exception is unhandeled while executing ExecuteReader
hi i get following exception when i execute my code "COM object that has been separated from its underlying RCW cannot be used." code is as follow: private string conString; OleDbDataReader dr; OleDbDataAdapter da; OleDbConnection con = new OleDbConnection (); OleDbCommand com = new OleDbCommand (); OleDbParameter id = new OleDbParameter (); OleDbParameter name = new OleDbParameter (); public bool IsCompanyExist( string namee) { bool exist = false ; strOleDb = "Select strCompanyName from tblCompanyMain where strCompanyName = @strCompanyName" ; this .com.CommandText = strOleDb; this .con.ConnectionString = this .conString; this ...Show All
Software Development for Windows Vista Using WebService Activities in a Composite Activity (promoting parameters)
folks, i am trying to use a invokeWebService within a composite activity. the invokeWebService Activity requires the specification of a ProxyClass and a MethodName which is not known when designing the composite activity (but when using the composite activity within another workflow). Hence, I tried to promote the parameters to the composite activity using ActivityBind but the compiler claims that ProxyClass/MethodName are meta properties which are required to be bound at design time. Just to clarify, I want to bind ProxyClass/MethodName at design time, but when designing the workflow using the composite activity and not when designing the composite activity itself. I hope I could explain my problem somewhat clear. any help would be appr ...Show All
Visual Studio Tools for Office How do I create a table title in PowerPoint Slide Item.
I have 4 items in a powerpoint slide copied from Excell range. I managed to set a charttitle for the chart items in the slide but I do have a table created from Excel.Name. How do i create a header/title for a table created from Excel. Name ( se CopyTable method as i could do in Excel.Chart(se method CopyChart) Any Ideas private void CopyTable(SlideItem item) { Excel.Name name; name = wb.Names.Item("chart item name",Constants.missing, Constants.missing) as Excel.Name; name.RefersToRange.CopyPicture(Excel.XlPictureAppearance.xlPrinter,Excel.XlCopyPictureFormat.xlPicture); Marshal.ReleaseComObject(name); name=null; } private void CopyChart(string chartName,string chartTitle) { (wb.Charts[c ...Show All
.NET Development Exception Handling in Business logic
Hi, Following questions are related to the business logic: 1. What way is the best to pass the error message and error type back to the client/subscriber when the client executing a method on the server/publisher 2. I found few ways to do it: a. Traditional way of return error type ( like C) For example: public function (ByVal id as integer) as errorType errorType contains: Invalidid, NotAllowed, etc b. Throwing an exception to the client/subscriber. c. Creating an event that fire when the error occured Can anybody please tell me which way is the best Is there any better way Thank you. Hi All, Thanks for the answer. I found out somewhere from the internet that event in .Net is actually prett ...Show All
Visual C++ any documentation for coding a compiler
I have a friend who is doing a school project: coding/implementing a comipler for C or C++ Where can he find some documentation pls Thanks. First of all, go to ansi.com and buy the C++ standard document. That's a nice thing to have, regardless of how advanced the compiler should be. Second, read up on "compiler compilers", such as Yacc ( http://en.wikipedia.org/wiki/Yacc ). When you've done that, it's time to read up on code generation and binary formats. Note that this forum deals with the C++ language, as implemented by VC++ 2005. For general discussion on topics such as this, the C++ newsgroup at http://msdn.microsoft.com/newsgroups is a better fit. ...Show All
SQL Server Security problems in the initial synchronization
Hello everybody, I would be thankful if you try to help me with my problem, I am using merge replication under SQL Server 2005. In our system there is a central database running SQL Server 2005 Enterprise Edition with a big database published for merge replication. There are too a lot of clients running SQL Server 2005 Express Edition that pull subscriptions to the central database. How the clients create subscriptions and run the synchronization process is posted below (RMO Progamming). When running the syncrhonization process, the Distributor connects OK, the Publisher Connects OK... but when the snapshot copy process starts, the execution is halted with an init session error "unknown user name or wrong password" (more ...Show All
Visual Studio BUG: PackageUtilities.GetIntPointerFromImage - "A generic error occurred in GDI+."
Hi there, I'm using MPF for my custom package and I've got an exception from PackageUtilities.GetIntPointerFromImage method. The exception type is System.Runtime.InteropServices.ExternalException and the message is "A generic error occurred in GDI+." How to fix this bug Hi Doug, Thank you very much for your detailed answer. Maybe following will help you to understand how I found this issue: I got this error when I implemented the Show All Files feature. I handled 2 related actions - Exclude files from and Include files to project. So my file and folder nodes were extended with special boolean field named '_isNonMember'. So there are not only files but fold ...Show All
Visual C# Printing to a dot matrix printer without feeding an entire page
I need to be able to print a number of lines to a dot matrix printer, but not have a full page length feed through the printer when I send the PrintDocument for printing. Thus far, printing in the traditional .NET fashion spools an entire page out. There must be a way to do this, but I can't find it. Ideas >> probably using the SerialPort classes in .NET 2.0 to have direct access to the printer Note, however, that most printers use (traditionally) the Parellel port or (more recently) the USB port. I haven't seen a printer attach to a serial port in 20 years. ...Show All
Visual C++ Windows Service : Types HANDLE and HMODULE cause error :(
As I write a Windows service in C++, compiler doesn't reckognize types: HANDLE, HMODULE, WTSGETACTIVECONSOLESESSIONID and function GetProcAddress. Are there any libraries that should be included I only have the following libraries in my code: using namespace System; using namespace System::Collections; using namespace System::ServiceProcess; using namespace System::ComponentModel; OK - number of errors was decreased from 80 to only 30 :) Another functions/types which libraries I don't know are: LoadLibrary, WTSGETACTIVECONSOLESESSIONID and WTSQueryUserToken. PS. Pity, that MSDN doesn't show the library name on the function help page :( ...Show All
SQL Server How Do I embed a RegEx in a Report Model
I am having trouble figuring out how to create a new expression-based field in a report model that relies upon the result of a regular expression. It looks like I cannot make calls to static methods in the .NET in a report model. Correct Here is my attempt at the expression I want: =IF((System.Text.RegularExpressions.Regex.IsMatch( PreferedEmail )),True,False) The error returned when I attempt to save the expression in Report Model Designer is "The following is character is not valid: ." BTW, the message is copied verbatim. The poor grammer is not my fault. I'm going to go out on a limb here & guess that you've never tried that in a Report Model (SDML). You absolutely can do that in an expre ...Show All
Windows Forms cannot find table 0
Hi all, I had the following piece of code. System.Web.UI.WebControls. DataGrid EOWDataGrid = new System.Web.UI.WebControls. DataGrid (); conn = new NpgsqlConnection ( "Server=" + PGIPAddress + ";Port=" + PGPort + ";User Id=" + PGUserName + ";Password=" + PGPassword + ";Database=" + PGDatabase + ";" ); this .Controls.Add(EOWDataGrid); NpgsqlDataAdapter pgDataAdapter = new NpgsqlDataAdapter ( "select \"wid\",\"wstart\", \"EOW\" from \"lwinfo\" where \"wstart\" >='" + tsFromSecs + "' and \"wstart\" <='" + tsToSecs + "'" , conn); conn.Open(); ...Show All
