1,857 Posted Topics
Re: [Click Here](http://www.daniweb.com/software-development/visual-basic-4-5-6/threads/429061/runtime-error-429-activex-component-cant-create-object) | |
Re: Here's an [example in C++](http://en.literateprograms.org/Complex_numbers_%28C_Plus_Plus%29). | |
Re: Have you tried using the [Arguments](http://msdn.microsoft.com/en-us/library/system.diagnostics.processstartinfo.arguments(v=vs.110).aspx) property of the ProcessStartInfo property of the Process class? It accepts a string of arguments for the process. | |
Re: Here's a [.net QR library](http://www.codeproject.com/Articles/20574/Open-Source-QRCode-Library) to start with. | |
Re: Why are you using a ListBox instead of a ListView? The ListView is designed for columns and headers, but the Listbox is not. | |
Re: You could use a dictionary Dim chardic As Dictionary(Of Char, Integer) Dim input As Char = "B"c Dim output As Integer = chardic(input) | |
Re: In an input control, such as a textbox, the keyeventargs of the keydown event give you access to information on whether the alt and/or control keys were pressed as well as which regular input key: Private Sub TextBox1_KeyDown(sender As Object, e As KeyEventArgs) Handles TextBox1.KeyDown If e.Alt AndAlso e.Control Then … | |
Re: Your first problem is using a ListView. It is not designed to be used with databases. However, a DataGridView will take a DataTable as a DataSource and will display whatever data you put in the datatable. If you must use a ListView you'll have to do it the naive way. … | |
Re: I think you mean passing variables by reference or by value when you call the function. The difference is basically what effect you can have on the variable. By value means that the variable passed into the function is a copy of the original variable and any changes made to … | |
Re: Just a quick perusal of the operator overload looks like you're assigning original_node to the next node before you're using its value. It seems to me that this would mean that you're skipping the first node | |
Re: Your first problem is, this is the wrong forum. You want the VB.NET forum. | |
Re: There are a number of things your not considering. 1. Pig Latin doesn't just transpose the first consonant, it transposes the first consonant sound. For instance story becomes orystay not torysay 2. If the first letter is capitalized the new first letter should be capitalized as well 3. If the … | |
Re: You might be confused by using `endl`. It probably would be more accurate to call it newl. It tells the file to start a new line. To eliminate that only write the new line to the second last line: void writePassword(char entries[][16], int &lastIndex) { ofstream oFile("password.txt"); int i = … | |
Re: If I understand you correctly, you want to select the xml file path from the listbox. The `.SelectedItem.ToString()` property should be able to give you the selected file path, instead of looping through all the listbox items. | |
Re: Check out the [StartInfo](http://msdn.microsoft.com/en-us/library/system.diagnostics.processstartinfo%28v=vs.110%29.aspx) property of the process class. It has the [WindowStyle](http://msdn.microsoft.com/en-us/library/system.diagnostics.processstartinfo.windowstyle%28v=vs.110%29.aspx) property that allows you to hide or minimize the window. It accepts any of the [ProcessWindowStyle](http://msdn.microsoft.com/en-us/library/system.diagnostics.processwindowstyle(v=vs.110).aspx) enumeration values. | |
Re: Use the [Process Class](http://msdn.microsoft.com/en-us/library/system.diagnostics.process.aspx) | |
Re: Once you have the 2 vectors, one option is to iterate through the docVector and use the [std::Find](http://www.cplusplus.com/reference/algorithm/find/?kw=find) function to see if the word is in the skipVector, and remove it or replce it with place holder characters if necessary. You will probably need to change the word to all … | |
Re: Have you looked at [std::sort](http://www.cplusplus.com/reference/algorithm/sort/)? It accepts a custom comparator. | |
Re: Your errors seem to do with basic syntax and don't really have anything to do with the structure of your code. Go through every structure and check for proper braces, variable name spelling, and line terminations. One glaring syntax error is, the if and else blocks, in lines 115-121, are … | |
Re: Here's something you might find interesting. A way to check if a string is a valid number using `sscanf`, which simplifies the code trmendously: bool isvalidReal(string input) { //Variable to hold the number float num = 0; //Variable to hold any left over characters char temp[20]; //If all the characters … | |
Re: It sounds to me that you want the selection to loop from one end to the other when a person is scrolling with the arrow keys. This can be done with a combination of handling both the keydown and the keyup events and using a class level boolean: Private Sub … | |
Re: First off your code isn't following the instructions. Instead of inserting the new letter you're just sorting the array after adding the letter to the end. You will propbably need to keep track of the size of the array as well as either make the array big enough to handle … | |
Re: There are basically 2 main methods that work very well. The faster, is the old [sprintf](http://www.cplusplus.com/reference/cstdio/sprintf/?kw=sprintf). The easier one is [stringstream](http://www.cplusplus.com/reference/sstream/stringstream/?kw=stringstream). | |
Re: You might have more success using the getline method on the stringstream. Perhaps something like this: while(std::getline(file, line)) { if(line.size() > 0) { std::string tokena,tokenb; std::istringstream tokens(line); std::getline(tokens,tokena,':'); std::getline(tokens,tokenb); props.emplace(std::pair<string,string>(tokena,tokenb)); //cout<<translation_table[token.substr(0, pos)]=token.substr(pos + 1) ; } } } | |
Re: The first thing I'd suggest is a custom class(Item): Public Class Item Public Enum Units Pound PerEach CaseLot End Enum Public Name As String = "" Public Price As Double = 0.0 Public Quantity As Double = 0.0 Public NetPrice As Double = 0.0 Public Unit As Units = Units.PerEach … | |
Re: I think what you want is `AppendAllLines`. Something like this perhaps: File.AppendAllLines(path, person.myList); | |
Re: It will largely depend on how the dialog class is set up. Show the code for that class. | |
Re: When you open the file you can set the mode to Append which will automatically find the last line and put your next writes after it. I can't remember the exact syntax but whichever resource materials you're using should have a reference area that will help. | |
Re: A barcode scanner is basically a Human Interface Device(HID) the same as a keyboard. When a barcode is scanned it should return a string the same as if you typed it in. Each item in the database should have a unique id code which will be represented by the barcode. … | |
Re: Generally you'll find that ArrayList are largely deprecated as List<>'s are at least as easy to use as well as being strongly typed. | |
Re: You could use the `new` operator, but that comes with more baggage, like security concerns and manual disposal. | |
Re: Having everything laid in a literal fashion like that is starting to make your code very unwieldy. You can use one event handler to handle each set of button's click events. Simply use the `Text` property of the button as the value. Add a line like this: one.Click += num_Click; … | |
Re: For future reference here's the [article](http://msdn.microsoft.com/en-us/library/hh567368.aspx) on the c++11 features in Visual Studio 2013 | |
Re: If you think of those statements like this: void push (stack *, std::string); std::string & pop(stack &); bool isEmpty(stack &); std::string & top (stack *); These are the prototypes for the functions. Whenever the actual code is separated from the class declaration this is the pattern that is usually followed. | |
Re: One thing I've found that helps, is doing logic problem puzzles. This gets your mind used to thinking in a more logical pattern. One of the most common logic problem puzzles is sudoku. | |
Re: One way to do this in a somewhat dynamic way, is to use a `map<string,function>`. This allows you to run the appropriate routine depending on the string you get: #include <iostream> #include <map> using namespace std; typedef void(*CommandFunction) (); void open() { //code here } void close() { //code here … | |
Re: Here's a simple class that can be compiled as a dll. Add a reference to `System.Windows.Forms` first. I included a sample of an event handler as well: Imports System.Windows.Forms Public Class NewDLLForm Inherits Form Public Sub New(Caption As String) Text = Caption AddHandler Me.Click, AddressOf Me_Click End Sub Private Sub … | |
Re: All you need to do is pass the array as a parameter in the List's new constructor or use the `ToList()` method and assign it to the list: long[] test = new long[20]; List<long> testlist1 = new List<long>(test); List<long> testlist2 = test.ToList(); Once the list is initiated the size is … | |
Re: In some cases using a static size can bring about an increased efficiency in terms of speed. While this can be done with a list, to many people, it's less intuitive than an array and not always as efficient. For instance in my experiments with the Sieve of Eratosthenes, I … | |
Re: I would suspect that the instructor wants you to loop through the list of persons and use the first name in place of 'user'. public static void SendTestEmail() { List<Person> people = new List<Person>(); people.Add(new Person("Joe", "Bloggs", "Joe.Bloggs@foo.bar")); people.Add(new Person("John", "Smith", "John.Smith@foo.bar")); people.Add(new Person("Ann", "Other", "Ann.Other@foo.bar")); string emailSubject = "Training … | |
Re: I don't really see a question in there any where. If I was to venture a guess though, I would say one of your problems is in this line: fraction = whole(x) - (long)x; `x` should stay as a double and you should subtract the whole part from it: fraction … | |
Re: Is it a requitement to use c-style char arrays instead of c++ strings? Using strings simplifies your code tremendously. Also unless you know ahead of time how many records you'll be reading it makes more sense usually to use a dynamic collection like `vector`. That being said, with the code … | |
Re: Something like this might work: ComboBox3.DataSource = Enumerable.Range(-10, 20).ToList This will populate the combobox with the integers from -10 to 10 | |
Re: One thing, I would change the collection to a map instead of an array, the score as the key and the number of times it appears is the value. This way, the elements are sorted when you read them from the file. This gives you the option of calling the … | |
Re: Something like this should work: List<int> testlist = new List<int>(); //fill list here int startindex = 1; int endindex = 30; string joinedindexes = string.Join(" ", testlist.GetRange(startindex, endindex - startindex).ToArray()); | |
Re: I think perhaps the focus indicator is there but you're not seeing it. The focus indicator is basically the border changing color slightly and the cursor changing to I-beam | |
Re: First off the index to remove at should be passed into the function. If you need that input from the user, do it before you call the function. the loop limit can just be `< elements`. Doing a math operation(element - 1) on every iteration like that, when it's not … | |
Re: Hard to say for sure without seeing the code itself, but it looks to me that you're trying to initialize a member of your class in the declaration of the member. | |
Re: You could use nested classes so that each instance of school will have it's own instances of the required classes. This also has the advantage of naming each section of the vectors that you need: The header: #include <vector> #include <string> using std::vector; using std::string; class School { private: class … | |
Re: VB.net has a login form template that you can use. Just Add -> New Item to your project and choose Login Form |
The End.