1,857 Posted Topics

Member Avatar for Avneet1993

Show us the code you've got and outline where the problems are and we'll help you fix it.

Member Avatar for tinstaafl
0
177
Member Avatar for NyQii

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.

Member Avatar for tinstaafl
0
165
Member Avatar for akash0689

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 …

Member Avatar for tinstaafl
0
1K
Member Avatar for Affable zaki

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 …

Member Avatar for tinstaafl
0
257
Member Avatar for Sarama2030

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.

Member Avatar for Sarama2030
0
165
Member Avatar for vishalonne

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 …

Member Avatar for tinstaafl
0
206
Member Avatar for jarduz

You'll probably have to find an sdk for that browser. Or open the urls in a webbrowser control.

Member Avatar for tinstaafl
0
149
Member Avatar for gbhs

You couild also set a breakpoint at line 14 and check whether `DRDeptTeacher("teachersname")` has any data in it.

Member Avatar for jelly04
0
169
Member Avatar for irtza

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.

Member Avatar for samiz4j
0
295
Member Avatar for akash0689

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 …

Member Avatar for tinstaafl
0
148
Member Avatar for rexdon

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)

Member Avatar for tinstaafl
0
290
Member Avatar for breezett93

[stringstream](http://www.cplusplus.com/articles/D9j2Nwbp/) is probably the easiest way to do it.

Member Avatar for tinstaafl
0
226
Member Avatar for vishalonne
Member Avatar for vishalonne

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 …

Member Avatar for vishalonne
0
1K
Member Avatar for destroyer333

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 …

Member Avatar for destroyer333
0
229
Member Avatar for peymankop

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

Member Avatar for JOSheaIV
0
205
Member Avatar for Ronnie.Sk1ttl3s.Eke

The error seems to be right after you try to insert a null value, but the table structure seems to want not null

Member Avatar for JOSheaIV
0
253
Member Avatar for nick.rechtien.5

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 …

Member Avatar for tinstaafl
0
515
Member Avatar for Himanshu Chawla

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"; // // …

Member Avatar for tinstaafl
-1
291
Member Avatar for amvx86
Member Avatar for saleem.mukhtiar

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"

Member Avatar for saleem.mukhtiar
0
217
Member Avatar for VIPER5646

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 …

Member Avatar for VIPER5646
0
933
Member Avatar for lee.martin.568847

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 …

Member Avatar for lee.martin.568847
0
1K
Member Avatar for maxpaine69

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.

Member Avatar for tinstaafl
0
123
Member Avatar for visweswaran28

This [article](http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.bitmapmetadata.setquery%28v=vs.100%29.aspx) should help.

Member Avatar for tinstaafl
0
206
Member Avatar for silvercats

The easiest way would probably be to use this [code](http://www.codeproject.com/Articles/25172/Simple-Random-Number-Generation)

Member Avatar for Michael27
0
238
Member Avatar for SpottyBlue

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 : …

Member Avatar for tinstaafl
0
1K
Member Avatar for codesly

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)

Member Avatar for xarhang
0
261
Member Avatar for GeoEqual
Member Avatar for Ravenous Wolf

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.

Member Avatar for JOSheaIV
0
6K
Member Avatar for gobiking

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 …

Member Avatar for gobiking
0
3K
Member Avatar for vishalonne

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 …

Member Avatar for Rothis
0
909
Member Avatar for dmikawa

> 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

Member Avatar for tinstaafl
0
688
Member Avatar for LEAN.HEART.YOU

This [code snippet](http://www.daniweb.com/software-development/code/449721/simple-wrapper-for-printing-text-in-.net) might help

Member Avatar for LEAN.HEART.YOU
0
171
Member Avatar for 404notfound

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 …

Member Avatar for 404notfound
-1
246
Member Avatar for vishalonne

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 …

Member Avatar for tinstaafl
0
166
Member Avatar for Sturdy

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) ' …

Member Avatar for Sturdy
0
2K
Member Avatar for sai.aleenus

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 …

Member Avatar for sai.aleenus
0
140
Member Avatar for jemartalaban_1

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 …

Member Avatar for schroaus
0
168
Member Avatar for schroaus

You can also access the last element of a list with the .Last property, lines.Last

Member Avatar for schroaus
0
319
Member Avatar for LEAN.HEART.YOU
Member Avatar for deceptikon
0
109
Member Avatar for ManojGokhale111

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

Member Avatar for tinstaafl
0
175
Member Avatar for Unused Mass

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.

Member Avatar for tinstaafl
0
4K
Member Avatar for IT_Techno

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 …

Member Avatar for IT_Techno
0
280
Member Avatar for ChargrO

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) …

Member Avatar for Rahul47
0
214
Member Avatar for ponnu

to find the pattern just loop through your array with a for loop and compare the string with your pattern.

Member Avatar for ponnu
0
1K
Member Avatar for zarnish

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 …

Member Avatar for zarnish
0
324
Member Avatar for Ann95

You could make the GridColor the same color as the Cell Background to print, then change it back after.

Member Avatar for Ann95
0
432
Member Avatar for Aerigon

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) …

Member Avatar for tinstaafl
0
634
Member Avatar for xLuFeT

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)

Member Avatar for tinstaafl
0
187

The End.