Jules Noda's Q&A profile
Visual C# ?? Using String.Format() for a MAXIMUM Length ??
Hello all, Is it possible to use String.Format() to specify a maximum length for a formatted item For example, let's say I have: String.Format("{0}", "FREDDY"); How can I specify that the result of the formatting should be a string no longer than, say, 3 characters I know I can easily specify the minimum length, but I am producing a report with columns. I need to specify the maximum length, truncating whatever does not fit. Is it possible without resorting to a custom formatter Please note that I want to do this with String.Format() rather than something like, myString.Substring(0,4); Thanks. ...Show All
Visual Basic Appending lines to a text file
Hi I got a program wich stores some values and every time it saves it ads another line in a txt file but I want that when there are 3 lines in it. so how do I make that the next time you save it saves on the next line and when there are 3 lines it exports al the lines to a new file, but when i exports again it adds them to the previous 3 If you are writing the method My.Computer.FileSystem.WriteAllText http://msdn2.microsoft.com/en-US/library/27t17sxs.aspx Then the 3rd argument is whether you wish to append or overwrite the contents. It set to true it will append the contents to t ...Show All
Windows Forms How to get constant pen width when scaling graphics?
Hi! In the application I develop, objects consisting of lines are drawn on a control. Now i would like implement a zoom feature in my application. The idea is to implement the zoom by a scaling transform in the control's OnPaint method. This scaling will also affect the line widths of my objects, but I want the lines i draw to have the same widths always. I thought I could solve this by inverting the transformation matrix in the graphics object and use that with the pen transform to cancel out the scaling. This seems to work as long as the first scaling (in the graphics object) don not cause the line w ...Show All
Visual Studio Team System Active Directory mode
Is the requirement around Active Directory mode just for the AD that the servers are members of My tfssetup account is in a trusted AD and I'm wondering if that could have an impact on our testing. In general, our test servers are in a semi-isolated AD and user accounts (developers, testers, etc) are in the trusted AD. Has this (or a similar configuration) been tested I am working with TFS in a similar environment and am able to connect to the server from the other domain. When connecting to the server you get a nice logon box where you can provide the credentials that you need in the trusted domain. Up until now (working ...Show All
Visual Studio Team System TS Source Control not getting latest version
Currently using the following: TFS Dec Beta 3 Refresh installed on a single Windows 2003 server VS 2005 installed on XP machine. If I have a class that has a method that takes a single int paramter and this file is checked in and is assigned changeset number 5 ... then I check out this class and change the method parameter from int to double and check that in and is assigned changeset number 7. Then I perform a "Get Specific Version" and fetch changeset number 5 version of this class (the one that has the int parameter). Now at this point if I perform, a "Get Latest Version" on the file or "Get Lastest Version (Recurs ...Show All
.NET Development Need help in Webservice Deployment [How to deploy a webservice?]
Dear all i am getting this error when i am deploying a webservice made in asp.net 2.0. i havnt deployed a webservice before and this is my first time. i have followed all the proxy creating process and the virtual directy assignment stuff. tell me what i am missing. i get this error when i access the webservice from IE. The webservice class name is Service.asmx ------------------------------------------------------------------------------------------------------------------- Server Error in '/PAS_Webservice' Application. Also make sure you didn't rename the Class in Service.cs to some other than "Service". ...Show All
Visual C++ How to decide the errors
hoh to decide the error C2039 a exist... i have 2 forms, form1 and form2. in form1 i have a button, and when i click in this button, will open form2. whats the code to do this ...Show All
Visual Basic How can I put a delay in between code strings?
Have an OLE wave file that I want to allow to finish playing before the system executes the next line fo code. I've tried "System.Threading.Thread.Sleep" and it doesn't work. Here's the section of code. oleChevronLock.DoVerb______________I want the delay here imgGate.Picture = img1Engaged.Picture Quick responce appreciated. Hi That's sound so simple if you know threads or multithreading operations, this will be so good !!! All you have to do is to put the "oleChevronLock.DoVerb" in a sub, and you relate the latter buy a delegate. Then you call the thread.sta ...Show All
Smart Device Development How to add my customized device emulator in Device Emulator Manager?
It's a great feature that device emulator support synchronizing with ActiveSync, however, this feature is only supported in Device Emulator Manager. I cannot cradle/uncradle any customized device emulator because it is not listed in Device Emulator Manager. Is there any approach for me to add my device emulator in the Device Emulator Manager so it can synchronize with ActiveSync The list of emulators that the manager shows comes from two places: 1) From the list of running emulators on your machine. 2) From Visual Studio's ConMan. You can add new emulator instances to the list from V ...Show All
Windows Forms user control problem
New to VB.NET I have an application with 2 usercontrols on a Form called Main Login and PhoneLog When the app runs the phonelog is not visable and the login is. I am able to login and hide the login control but the phonelog control will not change to visable. I think this is a lack of the proper reference somewhere but I'm not sure. I get an  ...Show All
Visual C# How to send out Keys Enumeration character
I have a file and it is composed of all keys enumeration member names, such as "OemSemicolon", "Oemplus", "LMENU". The file recorded all my keyboard events. Now I want to read the file and ouput to the other (use SendKeys class) for reading purpose. For example, I want the string "OemSemicolon" which appears in original file shows ";" in other file, or it would be inconvinient for me. However, I cannot find any translation method. Because the values of Key Enum members are not completely the same as ASCII code. If I want the other file shows ";", I need to use SendKeys(";" ...Show All
SQL Server New Java Driver spec
Will the future Java driver feature the full JDBC 4.0 specification When and how can we start participating with beta,pre-beta testing Implementing the 4.0 spec will be non-trivial. Even though the spec is in final review, the spec will not be available until the Java SE 6.0 (Mustang) release, which looks like the fall of '06 -- another year. The Microsoft SQL Server 2005 JDBC Driver v1.0 will be 3.0 spec, but we plan to move to the 4.0 spec in a year when it is practical. -shelby ...Show All
Windows Forms Splash Screen
I am using Visual Basic .net to create a splash screen based off of the template provided. However when I access the MyProject tab of my application the 'Application' Tab is entirely greyed out with the exception of Assembly Name and Assembly Information. The Combobox that allows me to specify the splash screen is greyed out as well. How do I get around this and why is everything greyed out. Thanks for the help Kris Make sure that you have the project selected and that the application is not running. ...Show All
Visual Basic immediate
Where do I get the immediate window in the .net 2.0 please ...Show All
SQL Server Query return unexpected quantity of rows
I have recently installed SQL Server 2005 Eval version in my computer to test this software. I have migrated some information from other SQL server and executed some queries over this DB. All goes fine when i do some select * from someTable -which returns a total of 1500 rows- until i execute one select * someColumn from someTable cross join otherTable which returns a total of 22916 rows ! The query has a condition that in normal conditions -when its executed over SQL 2000- returns a total of <1500 rows. I dont know why the same query returns two different total in two version of the server. Any clue It's impossible to ...Show All
