1,857 Posted Topics
Re: Just took a look at the challenge. There's a lot more involved than just the median. you're combining and sorting 2 arrays first. | |
Re: Changing the [drawmode](http://msdn.microsoft.com/en-us/library/system.windows.forms.tabcontrol.drawmode.aspx) to ownerdrawfixed allows you to draw whatever you like on the tabs. | |
Re: > I want to replace a button with another yet different button (eg. Maximise with RestoreDown) What exactly do you mean by this? | |
| |
Re: A fairly simple homework assignment. Hope you enjoy learning how to code it. | |
Re: To extract just the month and day, with the month in long format you could use something like this: Dim mydate As Date mydate = Now Dim datestring As String datestring = Format(mydate, "mmmm d") Today, datestring would be "April 21". To keep the month short use,`datestring = Format(mydate, "mm … | |
Re: Something like this will work: Dim input As Integer = Val(TextBox1.Text) Dim output As New List(Of String) If input > 0 Then For i = 1 To input - 1 For j = 1 To input - 1 If i + j = input Then output.Add(i.ToString.Trim + "," + j.ToString.Trim) … | |
Re: You can copy and paste this code into the form class but outside of any sub or function. To call it you could try something like this: Dim HDoc as New HtmlDocument Hdoc.Write(FromRtf(RichTextBox1)) | |
| |
Re: adding this statement,`myRecord = myFile.ReadLine`, before the Do loop should do the trick. | |
Re: Haven't used vb5 since forever, but here's a [link to the media control](http://msdn.microsoft.com/en-us/library/aa733658%28v=VS.60%29.aspx) for vb6. If your vb5 can't use it, a very serious upgrade is needed. | |
Re: Here's a good [place to start](http://www.cplusplus.com/reference/) | |
Re: What exactly is it doing wrong? Are you drawing the whole maze all at once? Do you have a screen shot, or detailed description, of how you want it to look? | |
Re: The simplest is probably to load the project in the HTMLEditorControl folder by itself, then build it. The result should be a .dll in the debug or release folder. this can now be added through the choose item option in the toolbox context menu. Just browse to the folder with … | |
Re: You appear to have several subfolders with the same name. Make sure, in the project properties that it's pointing ot the right folder. | |
Re: A couple of things, first the function isn't declared properly. A function declaration has to include a return type and a variable to hold the info being passed to it, `Function DisplayStaff(Staff() as Salestaff) As String`. Second to put the properties of the structure into a string you have to … | |
Re: There are several options here. One option would be to use a masked text box. It is much easier to use than it sounds and the validation is done for you right in the text box. There is even a member that will validate according to a specific type of … | |
Re: When you copied the code you missed the Module statement. That's why you got the error `Error 6 'End Module' must be preceded by a matching 'Module'.` | |
Re: Here's a link with documentation on the [Adventnet SNMP Api](http://info.ee.surrey.ac.uk/Personal/G.Pavlou/Teaching/NSM/help/introduction.html). that might help | |
Re: You can declare searchtype as Public in Popup_PartNumbers then set the value the same as the labels | |
| |
Re: > how to [read from txt file](http://www.cplusplus.com/doc/tutorial/files/) to [array](http://www.cplusplus.com/doc/tutorial/arrays/) & how to omit heading in the txt file and store it to array There's a couple of articles to get you started. Once you actually have some code you need help with let us know. | |
Re: Here's an [MSDN article](http://msdn.microsoft.com/en-us/library/vstudio/x61a1z4s%28v=vs.100%29.aspx) on accessing the registry with vb 2010 | |
Re: [Click Here](https://www.google.ca/search?q=cltmng.exe&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a#client=firefox-a&hl=en&rls=org.mozilla:en-US%3Aofficial&sclient=psy-ab&q=ftp+server+source+code+vb6&oq=ftp+server+source+code+vb6&gs_l=serp.12...0.0.12.20095.0.0.0.0.0.0.0.0..0.0...0.0...1c..9.serp.UPk0-yPOaV4&pbx=1&bav=on.2,or.r_cp.r_qf.&fp=7e4f97433872f87&biw=1280&bih=861) | |
Re: This will change the text of a textbox with the text of the selection in combobox. Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged TextBox1.Text = ComboBox1.Items(ComboBox1.SelectedIndex) End Sub If you want to have different actions based on the selection a Select block would do the … | |
Re: You might find this code helpful. It will take whatever text is typed in any textbox and if it equals the text in any of the labels it will strikeout the text in that label: Public Class Form1 Dim AllTextBoxes As New List(Of TextBox) Dim AllLabels As New List(Of Label) … | |
Re: You just need to mark it solved. | |
Re: I'm wondering if precision could be your problem. I believe double is precise to only about 15 places. The [apfloat library](http://www.apfloat.org/apfloat/) might work better. | |
Re: You could try the publish option then run the setup.exe to install the app. It should run then. | |
Re: If you create a Public Module, any routines or variables declared as public, inside the module, can be accessed from anywhere in your project. | |
Re: Sounds like an interesting homework assignment. When you've actually got code that needs fixing, show the code, describe the problem and/or any build errors, and people will be more than ready to help. Also since you'll be using C++ your posts will more properly belong there. | |
Re: I think your problem might be here: For intCount = 8 To CInt(inputFile.Peek = -1) strWeather = inputFile.ReadLine() Next The limit is less than the start. the statement inside won't run, therefore strweather never gets assigned. Not sure what you expect to happen with that but `inputFile.Peek = -1` is … | |
![]() | Re: You might something like this useful: #include<iostream> #include<iterator> #include<fstream> #include<vector> #include<ctime> using namespace std; int main() { int j=0, key=0; std::vector<int> a; int start_s=clock(); //start timer ifstream readFile; readFile.open("inputData.txt");//open file if (readFile.is_open()) { while (!readFile.eof()) { readFile >> key; if ( a.size() == 0) { a.push_back(key); } else if(a.size() == … ![]() |
Re: Since you're programming for windows, if you use VC++ and the CLR for .net, you can use the console class and it's built in methods for changing the foreground and background of the text. There's a pretty good sample [here](http://msdn.microsoft.com/en-us/library/system.consolecolor%28v=vs.100%29?cs-save-lang=1&cs-lang=cpp#code-snippet-1). The code also shows how to use an enumerator to … | |
Re: How are you building the .dll? How are you testing it to know that it even works? | |
Re: Something like this should load a file directly: Private Sub LoadDictionary() Dim fn As String = Application.StartupPath & "\DATA\words.txt" Dim line As String Dim fr As IO.StreamReader = New IO.StreamReader(fn) While fr.Peek >= 0 line = fr.ReadLine() Dim a() As String = Split(line, "|") Dict.Add(a(0), a(1)) End While End Sub … | |
Re: When you add the items to the listview set the Name property of the item to equal the Text. This way you can use the ContainsKey method to check if it exists. | |
Re: Found several things wrong. The algorithm for the text offset should be (overall length`(69)` - string length`(str.length()`) / 2 + screen offset`(5)`. When you were calling placeCursor, you were sending one for the column instead of the variable l. Lastly `cout << str;` needed a `<< endl`. Here's the code … | |
![]() | Re: Something like this might help. You might be able to notice, how much easier it is to read with all the dim statements together. This allows you to concentrate on the logic of your code much more easily. Private Sub ComboboxStudentCao(ByVal _filepath2 As String, ByVal _filapeat1 As String, ByRef cbx … |
Re: for loop [example](http://www.daniweb.com/software-development/cpp/threads/436390/for-loop-question) | |
Re: In the datetimepicker's properties set the customformat to dd/MM/yyyy, then change the format property to custom. Now when you assign the value to the listview use the datetimepicker.text, and it will have the correct format. | |
Re: Rather than a while loop a foreach might work better. Something like this: using System.IO; public Boolean CheckLogin(String accNumber, String pin) { String checkAccNumber; String checkPin; String[] splitedLine; foreach (string line in File.ReadAllLines(FILE)) { splitedLine = line.Split(' '); checkAccNumber = splitedLine[0]; checkPin = splitedLine[1]; if ((checkAccNumber == accNumber) && (checkPin … | |
Re: Something like this should work: #include <iostream> using namespace std; void Pause() { cin.ignore(); cin.get(); } struct test { char sequence[9]; int occurance; double prob; }; int compare (const void * x, const void * y) { const test * dx = (const test *) x; const test * dy … | |
Re: I hate the words stupid and ugly, two words designed to put someone down, should never used. | |
Re: Here's simple and easy. Read this [post](http://www.daniweb.com/software-development/cpp/threads/447412/forming-an-x-in-c) about printing out an 'X'. To print a diamond print out the inverted 'V'first. | |
Re: Split your project into 2 separate projects or right click on the forms you don't want and choose exclude from project once you have a setup done copy it to a different folder then change which forms are in the project and build the setup again. Personally I'd choose using … | |
Re: It looks to me like you'll have to look for the field with the date then change the output format. Since the row is coming from a table the index of the field you want should be constant. By changing the for each to a for loop, it might be … | |
Re: Here's one way to change a specific value in an .xml document. Load the file into an XDocument variable, then find the appropriate element with a foreach loop and make an XElement variable equal that element. When you change an attribute in the XElement it is reflected in the XDocument. … | |
Re: With the [Process Class](http://msdn.microsoft.com/en-us/library/vstudio/system.diagnostics.process(v=vs.100).aspx). You can run 'cmd' with the .bat file as a parameter. Also, you can redirect the standard input of 'cmd', with the process class, then read the the .bat file line by a line and send each line to 'cmd'. Alternatively, it looks like everything your … |
The End.