Answer Questions
Strawberry Pancakes Terminating a C/C++ program using a subroutine
Can I just use "break" If I use break, it will return to main. What will make the main to exit or terminate the program I tried putting "break" in the subroutine and it says illegal break! Any tips I understand that I couldn't use "exit" in the subroutine as it won't clear memory allocations. From this and other posts it is clear that you are attempting to learn C++ - might I suggest reading a good C++ book You can't learn C++ from these forums. You can use exit - I'm not 100% sure what you mean by "clear memory allocations" but calling exit will terminate your application and return all resources to the system. On the otherhand "break" can only b ...Show All
cohnerap partial classes feature
May I know how to turn off the partial class feature in Visual Studio 2005 (for express, and proffesional edition). Your avuable feedback is much appreciated. Thanks. Why would you want to do that I don't think it can be turned off, it's a compiler feature. IT is becuase MSBee is not support partial class feature in VS 2005. I failed to compile the program into .NET 1.1 version with MSBee. By the way, partial class is great while it seperate the designer code for us, but it do make some disadvantages too. It is hard for me to admend the class constructor and Main mothod in VB 2005. I think he likes to turn the Visual Studio's feature off, that creates Forms as partial classes. In visual studio 2003 form's code ...Show All
Ed Abshire nested subs
Is it possible to nest subs in VB ...How By default it's giving an error... Thanks Presumably, you want to encapsulate functionality. What you can have is nested classes: this allows you to wrapper your complete function in a single class, and have sub-classes that perform specific functions. These sub-classes would not be visible outside the main, wrapper, class. Public Class MyFunction Private Class SubFunction ' This class is completely encapsulated ' in the MyFunction class, and is not visible Public Shared Function MultiplyNumbers( ByVal x As Integer , ByVal y As Integer ) As Integer Return x * y End Function ...Show All
Kshama If lost my forms!
I have lost all of my forms in my program i can now only code, i need to be able to see them this all happened when i had to restart and load the pproject up agian now i cant find design veiwe again help any one sorry for spelling im in a rush they are totally gone i only have the code. Why you say you lost all your forms - forms are just a collection of files - do they still exist on the machine - if so then add and they are not in the project then add the files back to the project. If they are not on the machine - normally in the project folder then you probably out of luck - and should restore them from a backup. Also remember that the files in ...Show All
JeroenMeijer Sharing issue in VSTS Source control
Hello guys, I'm trying to migrate our VSS database to VSTS Source Control and I don't really understend how can I make "sharing" happen at VSTS For example we have next VSS source tree: $root |-DummyProject |-Includes |-ProjectA |-ProjectB Both of them have shared files from <Include>. My question is: What is an alternative for us in VSTS in terms of do not re-organize our current code Thanks a lot guys. I have different qusetion about TFS SCC. How can I map two different projects to one local folder Example: $-| |_Project_1 |_Project_2 Map to C:\Common Project Thanks, For the most part, you can just do it. The only tricky part is that top level f ...Show All
Marek Zgadzaj How to SUM column data
Hello, The result of a query in TableGridView looks like this: Location Number1 Number2 Ok, I won't guarantee you this will work but after the table is filled or after the query is done add a call: SumColumns(Table1) and add this: Private Sub SumColumns( ByVal Table As DataTable) Dim FCSum As Single = 0.0 Dim SCSum As Single = 0.0 For Each r As DataRow In Table.Rows FCSum += r(0) SCSum += r(1) Next TextBox1.Text = FCSum.ToString TextBox2.Text = SCSum.ToString End Sub That should do it. Thanks again, Inserted your line (it would not take without " Me .Database1DataSet" ------- ...Show All
Johan Nyvaller Can't clean all with vcbuild command line
I can type at the command prompt: vcbuild tool.sln /clean $ALL ... and it works as I expect; the tool solution is cleaned. However, when I use the same line in an nmake makefile, it doesn't work: I'm told that "LL" is an invalid configuration. It doesn't help if I use quotes around "$ALL" either, as in: vcbuild tool.sln /clean "$ALL" ... at least it complains that "ALL" is not a valid configuration, instead of "LL". help Thanks, Jeanne Try $$ALL . Or $$RTFM. Have you tried using $$ALL instead Thank you, this did the trick. I put in $$ALL, in quotes or not, and it works either way. I did RTFM, but my FM ...Show All
mark aoki "Add Files" option greyed out
Hello! I created a single workspace with components, comp1.1 and comp2.2 from 2 different team projects, TP1 and TP2 respectively. I created 2 new files, file1.1 and file2.2 under comp1.1 and comp2.2 directories in my work space. I go back to source control explorer, and under TP2, comp2.2, I select "Add files" option. From here, I add file2.2 and this goes well. But, when I go to TP1 to add file1.1, the "add files" option is greyed out. I can add this file1.1 to TP2, but this creates a new directory comp1.1 along with file1.1 under TP1. Please assist. Thanks! C:\TFS_Projects\Project1\Proj1-Comp1 C:\TFS_Projects\Project1\EDI\123NY ...Show All
LamptonWorm HOW TO: Listview Control (Listindex)
I have a simple application that display the current log record of an employee who logs into the system. Everytime the employee tap her/his ID card on to the barcode reader, his/her current log record will appear into the listview control, I am using Visual Basic Express 2005. The problem is I am new to this language, and I really don't know code on the how to focus the last item entered into the listview control like what I did in visual basic 6 below: List1.AddItem "MyName" List1.ListIndex = List1.NewIndex Anybody can show me the simple code on how to do this Thank you very much:) thanks, it works:) Try List1.Items.Add( "MyName" ...Show All
Oleg Ignatov How to differentiate the Constructor which generated by Compiler or writen by user
How to differentiate the Constructor which generated by Compiler or writen by user: I have overrided the check method: public override ProblemCollection Check(TypeNode type) { if (type.NodeType == NodeType.Class) { int memberCount = type.Members.Length; int constructorCount = 0; for (int i = 0; i < memberCount; i++) { Here: What can I do to differentiate the constructor which generated by Compiler or writen by user if (type.Members .NodeType == NodeType.InstanceInitializer) { { constructorCount++; } } } Problems.Add(new Problem(GetResolution(constructorCount.ToString() + NodeType.InstanceIni ...Show All
agenda9533 Cannot write to a closed TextWriter
In Unit-Tests I want have all output of all trace-sources available in each unit-test output, so I can debug more easily. for this purpose I add a ConsoleTraceListener to all Sources. This works fine, when running one unit-test, but executing a batch causes the following error: Test method WZ.Hermes.Border.Daemon.UnitTests.MonitorHandlerTest.ExecuteMonitor_EmptyMonitor threw exception: System.ObjectDisposedException: Cannot write to a closed TextWriter.. at System.IO.__Error.WriterClosed() at System.IO.StringWriter.Write(String value) at System.IO.TextWriter.SyncTextWriter.Write(String value) at System.Diagnostics.TextWriterTraceListener.Write(String message) at System.Diagnostics.TraceListener.WriteHeader(String source, Trac ...Show All
Link9228 How we can call perticular server api's by using unit test ?
How we can call perticular server api's by using unit test how we can write the code for that api's and also how we can parameterized. pls send me some sample example how we can call the api's into unit test. i am not understanding what do you mean by server code......... actually it is a vb application..we are trying to call some dll's into unit test of team system... is it possible to do this by using team system............... is it possible to do parameterization for unit test.If it is possible how can we do the parameterization in team system for unit test. Do you mean somthing like NUnit.Forms like a button click If so, I am not sure but I do not think there is any support for that just yet. Hi, You c ...Show All
dni PDF viewing within VB2005
Hi there, May I know if we can import and view a pdf file from VB, and search text strings from within the file I want to build an application for spareparts database and I want to incorporate an exploded view of the parts, if I search for the part number, it will search through the pdf file (within the pdf drawing) and thus, will give me can give me query for my part database for more detailed info. Is this possible Thanks ChrisMoje, According to your question on import and view a pdf file from VB, I have the following suggestions: 1. There is a class in VB.NET called MediaTypeNames.Application Class that specifies the kind of application data in an e-mail message attachment. MediaTypeNames.Application.Pdf field specifies th ...Show All
Delusion7 Setup fails
I have a machine with Vista, SQL2005 Dev Ed. SP2, VS 2005 Team Edition for Software developpers (SP1 + SP1 beta for Vista) and the Team Explorer. When I try to install VS DB Pro I get the error that Visual Studio 2005 Team Suite needs to be installed. What am I missing Regards Thanks Then I'll start downloading the trial suite. BTW are there virtual PC images to give demonstrations with the tool Regards Are you using the DBPro Trial If so, this only works with Team Suite (and Team Suite Trial) Sorry, there is no VPC with the trail software installed. -GertD Correct, if you want ...Show All
shakalama Deploy with Unit Test
I wish to use VSTSForDP to support my pre-existing unit tests. Currently the process we use is anytime we make a change to the database schema we use SQL management studio to generate a script that will create the database. We then check that .sql file into TFS as a solution item. Our unit tests have a piece of init code that reads in the .sql file and executes it against our test server to create a fresh database that our unit tests will use. We wish to simplify this process using DataDude. When our Unit Test init code runs I would like to run the .sql file that is the result of the build on our DataDude project. How can I do this With a solution item I can use the test run config to make that solution item deploy along with the unit ...Show All
