1,857 Posted Topics
Re: Show us the code you've got and outline where the problems are and we'll help you fix it. | |
Re: Nearest I can tell is, if either or both those collections in the foreach loops, is empty the code inside the second one won't run. | |
Re: This shoud do what you want: Imports System.IO Public Class Form1 Dim NewFilecompare As New FileCompare Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load GetModifiedFiles("C:\Test3\test4", "C:\test3\test5") End Sub Private Sub GetModifiedFiles(ByVal PathA As String, ByVal PathB As String) Dim Dir1 As New System.IO.DirectoryInfo(PathA) Dim Dir2 As … | |
Re: Here's something that might work. Use a transaltion service, like Google Translate, and get the translation of the text you have in your project. Copy and paste the Urdu translation in place of the English. On my system without any special language packs installed it seems to show up as … | |
Re: One way have all your resources in the same folder as the app, then use Application.StartupPath as your path to the files. Make sure that if you change from debug to release the files go there too. | |
Re: With a dictionary you can store the value of each checked checkbox indexed by the groupbox it belongs in. Dictionary<string, List<string>> GBValues = new Dictionary<string, List<string>>(); GroupBox[] grpBox; CheckBox[] dayCheckBox; int grpposition = 40; public step2(List<string> list) { InitializeComponent(); int x = list.Count; grpBox = new GroupBox[x]; for (int i … | |
Re: You'll probably have to find an sdk for that browser. Or open the urls in a webbrowser control. | |
Re: You couild also set a breakpoint at line 14 and check whether `DRDeptTeacher("teachersname")` has any data in it. | |
Re: I think what you are referring to is polymorphism. Here's a pretty good [tutorial](http://www.cplusplus.com/doc/tutorial/polymorphism/), that should help you out. | |
Re: Here's the first place to start [System.IO namepsace](http://msdn.microsoft.com/en-us/library/vstudio/system.io%28v=vs.100%29.aspx). This contains all the methods required to get a collection of files in a folder and read the information about each one. Here's the documentation on the [ListBox class](http://msdn.microsoft.com/en-us/library/vstudio/system.windows.controls.listbox%28v=vs.100%29.aspx). When you have a problem with code you've written let us know and … | |
Re: add a textbox and use the keypress event to detect the enter key(13). Set the RootFolder property before you show it. Barring that you could make a custom control or use ideas from these [custom folder browser dialogs](http://social.msdn.microsoft.com/Search/en-US/vstudio?query=custom%20folder%20browser%20dialog&refinement=117&ac=5#refinementChanges=501,-117&pageNumber=1&showMore=true) | |
Re: [stringstream](http://www.cplusplus.com/articles/D9j2Nwbp/) is probably the easiest way to do it. | |
Re: You could even go one step further and use a List<GroupBox>. | |
Re: Just to make sure I understand. How many groupboxes do you want to display at one time? It sounds like anywhere from 2 to 6. 1 for the branch checkboxes and possibly one each(up to 5) for the batches of each branch. If this true, I would suggest adding and … | |
Re: Here's some code to look at. I changed things around a little. I used months to hold the month and day string for displaying. I used simplify() to set it, using a stringstream. I changed the setDay function to accommodate days greater than 365 and less than 1, so that … | |
Re: If each player is a label placed over top of the board, then changing the location of the label will make the piece move and not copy itself. Are you sure you're not creating a new label and placing that? All this is speculation without some code to go by | |
Re: The error seems to be right after you try to insert a null value, but the table structure seems to want not null | |
Re: You were making it more complicated than it needed to be. Each winning line has to include the outside row or col, and for each spot you only need to compare it to 2 others. Therefore for each row or col you don't need to loop through the other just … | |
Re: Here's a simple set up that will do what you want. You didn't say what you want to do with the data in the textbox on form2, so I copied it to a textbox on form1: Form1 controls and their relevant properties // // textBox1 Name = "textBox1"; // // … | |
Re: Also is this your app, or are you reading from someone elses app? | |
Re: You can use a custom setting. In the Settings tab of the project properties, set the name and the data type. You don't have to put a value if you don't need it. If the setting is called "Filename", your code would look like this: My.Settings.Filename = "MyFile.txt" | |
Re: Can't see any reason why your code doesn't work. The problem might be in the CheckIfOpen function. Here's an alternative method to restrict having only 1 input_frm open at a time: mdiParent: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim mdiChildForm As New Input_frm mdiChildForm.MdiParent … | |
![]() | Re: Also your input doesn't check for bad input or find max and min: double best = 0; double worst = 100; cout << "Enter the difficulty level (1.2 - 3.8):"; cin >> difficulty; if (difficulty < 1.2) difficulty = 1.2; if (difficulty >3.8) difficulty = 3.8; for( unsigned int i … ![]() |
Re: the rows property and the cells property for each row are indexed, thus `mydatatable.rows[0].cells[0].value` should give you the value of the first cell in the first row. Remember the indexes are 0 based. | |
Re: This [article](http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.bitmapmetadata.setquery%28v=vs.100%29.aspx) should help. | |
Re: The easiest way would probably be to use this [code](http://www.codeproject.com/Articles/25172/Simple-Random-Number-Generation) | |
Re: A check that payment is atleast purchase price would help. Also, it's usually considered good practice to intiialize your variables in the delcaration. did find one bug `FiveCents = Cent / 50;`, shpuld be `FiveCents = Cent / 5;`. Here's your code with a couple of changes: // Ringgit_Make_Change.cpp : … | |
Re: This [thread](http://www.daniweb.com/software-development/visual-basic-4-5-6/threads/104163/media-player-in-vb6) might be what you're looking for. If not try this [article](http://msdn.microsoft.com/en-us/library/aa228240%28v=VS.60%29.aspx) | |
Re: try setting LinkToFile = False. Then the image should save with the document. | |
Re: Unless you're changing the working directory, you could use something like this: string path = System.IO.Directory.GetCurrentDirectory() + @"\1.txt"; string[] FileContents = System.IO.File.ReadAllLines(path); Which works in both forms and consoles. | |
Re: max and min are keywords, also when you declare a variable inside a loop, it's local to that loop. try something like this: #include <iostream> #include <math.h> #include <cmath> using namespace std; int main () { float sum = 0.0; float sub = 0.0; float variance = 0.0; float mult … | |
Re: Using a number to identify the label, means that it will be hard to recognize which label goes with which checkbox. By changing the format of the label name to include the name of the checkbox, this becomes much easier. Something like this should work: private void CheckBoxCheckedChanged(object sender, EventArgs … | |
Re: > I have no idea on how to create input files or check them for that matter. Here's a [good place to start](http://www.daniweb.com/software-development/cpp/threads/6542/fstream-tutorial). This [website](http://www.cplusplus.com/) is also very handy | |
Re: This [code snippet](http://www.daniweb.com/software-development/code/449721/simple-wrapper-for-printing-text-in-.net) might help | |
Re: without the coding for the datagrid it might be difficult, but I'll try with a couple of assumptions. First I would assume that when you say datagrid, you actually mean the newer datagridview. Second I would assume that Emp Number is the first cell of the row and that the … | |
Re: If you're creating the table based on the status of the different checkboxes, you probably don't need to handle the .CheckStateChanged event. I assume the checkboxes are being used to set the columns of the table. If so, merely loop through the array and if the checked property is true … | |
Re: Something like this should work: Private Sub Command1_Click() Dim temp() As String Dim temp2() As String Dim FNArr() As String Dim LNArr() As String Dim AgeArr() As String Dim BloddArr() As String Dim Itm As MSComctlLib.ListItem ' split text file by new line (enter) temp = Split(ReadFileText("D:\Mid Task\Data.txt"), vbNewLine) ' … | |
Re: A suggestion, in your first loop, use i < 400 as the upper limit for the loop. Then at the bottom of the loop test for lam > .002 and make i equal 400 once lam is less than or equal to .002. This way you have a way to … | |
Re: show the second form and disable the first form like this: Dim newform As Form3 = New Form3 newform.Show() Me.Enabled = False Use the the Closed event to re-enable the first form when the second form closes: Private Sub Form3_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed Form1.Enabled … | |
Re: You can also access the last element of a list with the .Last property, lines.Last | |
Re: right-click on the project in the solution explorer and choose publish | |
Re: My understanding is the property you're looking for is available through webcontrols, you might need something like this: public class class2 : System.Web.UI.WebControls.Panel | |
Re: You could use a simple .csv style, with the first line containing the column headers. That becomes the template for the data in the file. | |
Re: You're using the filename from openfiledialog1 after you show openfiledialog2. Your code is using dialogs 1,2 and 5, but 1 is used 3 times. Since you're calling each one separately, you only need to use 1 dialog and change the filter and the title each time you want to use … | |
![]() | Re: The easiest way would probably be to use a masked textbox wherever you need numbers input. If that isn't agreeable to you, you can use the .TryParse method of whatever type of number you're looking for. For instance: Dim TextBoxInput as Integer Dim ValidateTextBox as Boolean = Integer.TryParse(TextBox1.Text, out TextBoxInput) … ![]() |
Re: to find the pattern just loop through your array with a for loop and compare the string with your pattern. | |
Re: You seem to have most of what you need. Basically you need to implement storage and retrieval. There are several options for this. In this case the simplest is propbably the best, a comma delimited format(.csv). As for the actual file io, there are also several options. Any decent reference … | |
Re: You could make the GridColor the same color as the Cell Background to print, then change it back after. | |
Re: Here's a simple way that also simplifies your code: Partial Public Class frmLunchOrders Inherits Form Public Sub New() InitializeComponent() For Each r As RadioButton In Me.Controls.OfType(Of RadioButton)() AddHandler r.CheckedChanged, AddressOf Rad_CheckedChange Next grpAddPizza.Location = grpAddHamburger.Location grpAddSalad.Location = grpAddHamburger.Location End Sub Private Sub Rad_CheckedChange(ByVal sender As Object, ByVal e As EventArgs) … | |
Re: Since debug is default application folder, you shouldn't need the full path, just the file name. xlWorkSheet.Shapes.AddPicture("westech2.jpg", _ Microsoft.Office.Core.MsoTriState.msoFalse, _ Microsoft.Office.Core.MsoTriState.msoCTrue, 90, 1, 210, 45) |
The End.