725 Posted Topics

Member Avatar for lolsn0r

See if this helps. [CODE] Dim arTemp() As String = Nothing '// Array to .Split each TextBox line. For Each txtLine As String In TextBox1.Lines '// loop thru all lines. arTemp = txtLine.Split("|"c) '// .Split line. For Each itm As String In arTemp '// loop thru arrays of current line. …

Member Avatar for codeorder
-1
165
Member Avatar for manavsm

[CODE=javascript]<select id="DDLReqStages"> <option>Option 1</option> <option>Option 2</option> <option>Option 3</option> <option>etc.</option> </select> <input type="button" name="btnCancel" style="font-size: xx-small" onclick="JavaScript:CloseDiv();" value="Cancel" /> <script type="text/javascript"> function CloseDiv() { // var control = document.getElementById("divReqStages"); // control.style.visibility = "hidden"; document.getElementById('DDLReqStages').selectedIndex = 0; // Reset } </script>[/CODE]

Member Avatar for dnanetwork
0
194
Member Avatar for TedMosby

[B]1. [/B]Use a OpenFileDialog with [ICODE].MultiSelect=True[/ICODE]. [CODE] Dim myCoolOpenFileDialog As New OpenFileDialog With myCoolOpenFileDialog .Title = "Hold CTRL key while selecting a file to select multiple files at once..." .Filter = "CSV Files (.csv)|*.csv" .Multiselect = True If .ShowDialog = DialogResult.OK Then For Each selectedFile As String In .FileNames MsgBox(selectedFile) …

Member Avatar for TedMosby
0
133
Member Avatar for TheMightySpud

See if this helps. File Menu/Project/"your app's name" Properties.../Application tab. .Set "Startup form:" to your Form, not Form1.

Member Avatar for TheMightySpud
0
295
Member Avatar for chris007
Member Avatar for horserider

See if this helps. [B]1 ListBox, 1 Button[/B] [CODE]Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click getMyCoolFiles("C:\", ListBox1) '// getMyCoolFiles(path of the folder you want to search, the ListBox to use for adding your found files to) End Sub Private Sub getMyCoolFiles(ByVal selectedDirectoryToSearch …

Member Avatar for chris007
0
1K
Member Avatar for deva.v

If using [ICODE]Command Line Arguments[/ICODE] as [B]sandeepparekh9 [/B]stated, check out [URL="http://www.daniweb.com/software-development/vbnet/threads/328209/1401427#post1401427"]this thread[/URL] as well.

Member Avatar for codeorder
0
133
Member Avatar for saj_amo
Member Avatar for chriswelborn
0
928
Member Avatar for ritesh2190
Member Avatar for sandeepparekh9
0
161
Member Avatar for deva.v

This has never given me any issues with "The process cannot access the file '...' because it is being used by other program.". [CODE] Dim myFile As String = "C:\test.txt" IO.File.WriteAllText(myFile, "text to save here")[/CODE]

Member Avatar for sandeepparekh9
0
911
Member Avatar for ZER09

Check out [URL="http://www.daniweb.com/software-development/vbnet/threads/349391/1484062#post1484062"]this thread[/URL].

Member Avatar for ZER09
0
4K
Member Avatar for Pgmer

See if this helps. [CODE]Public Class Form1 Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Me.IsMdiContainer = True Dim mdiForm As New Form mdiForm.MdiParent = Me '/////////////////// mdiForm.WindowState = FormWindowState.Maximized '// Maximize the MDI Form. '/////////////////// mdiForm.Show() End Sub End Class[/CODE]

Member Avatar for sandeepparekh9
0
149
Member Avatar for gspeedtech

Have you tried [iCODE]TransactionFile.ToString[/iCODE]? [URL="http://www.daniweb.com/software-development/vbnet/threads/356022/1516455#post1516455"]This [/URL]might also be of some help.

Member Avatar for gspeedtech
0
190
Member Avatar for deva.v

See if this helps. [CODE] Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Me.ShowInTaskbar = False Form2.ShowInTaskbar = True Form3.ShowInTaskbar = False End Sub[/CODE] The "ShowInTaskbar" can also be located in each Form's Properties.

Member Avatar for codeorder
0
116
Member Avatar for aymenbnr

It is in your Do/Until loop on line 30. Your WebBrowser does not have time to load a page, set values, and move on to the next link. The Do/Until loop probably goes through all the urls from your file before the first url even has time to load. I …

Member Avatar for codeorder
0
320
Member Avatar for dre-logics

See if this helps. [CODE] '// Clear all SelectedCells. For Each cell As DataGridViewCell In DataGridView1.SelectedCells : cell.Value = Nothing : Next[/CODE]

Member Avatar for codeorder
0
99
Member Avatar for arjen

You could also use a ArrayList to store the FullPath of a file. .Check out [URL="http://www.daniweb.com/software-development/vbnet/threads/349601/1486039#post1486039"]this thread[/URL] for some basic info on using a ArrayList.

Member Avatar for arjen
0
273
Member Avatar for Sevyt

See if this helps. [CODE]Public Class Form1 Private Sub TxbPostcode_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles TxbPostcode.LostFocus Dim txtValidator As New txtValidation If Not txtValidator.validateTextBox(TxbPostcode) = True Then MsgBox("Postcode not OK." & vbNewLine & " Needs to have 2 letters and 4 numbers seperated by a space.: EB …

Member Avatar for Sevyt
0
234
Member Avatar for ayagi

[CODE]TextBox1 = ""[/CODE] The above line will cause this error: [ICODE][COLOR="Red"]Value of type 'String' cannot be converted to 'System.Windows.Forms.TextBox'.[/COLOR][/ICODE] Can easily be fixed by setting the .Text of the TextBox as the String, and not the TextBox it's self. [CODE]TextBox1.Text = ""[/CODE] Without your code that generates the error, it …

Member Avatar for ayagi
0
320
Member Avatar for ninjatalon

See if this helps. [B]2 Forms(ProgressBar on Form1)[/B] [CODE]Public Class Form1 '// Timer to keep status of the ProgressBar.Value. Private WithEvents tmrStatus As New Timer With {.Interval = 100, .Enabled = True} Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load '// Form1 loading code here if …

Member Avatar for codeorder
0
3K
Member Avatar for pxndx

You will also need a Timer to keep up with the Time. As for the clock it's self, you will probably have to draw it, possibly inside a Panel.

Member Avatar for pxndx
0
154
Member Avatar for ninjatalon

I would use Labels(AutoSize=False, for resizing) instead of Panels. Maybe even a PictureBox. .The reason for Labels/PictureBoxes, is that a Panel is a container, not just a basic control. I'm personally uncertain if it takes more out of an app. to load/design/draw a Panel, than it would to do the …

Member Avatar for ninjatalon
0
166
Member Avatar for sarifah n

See if this helps. [CODE] Private Sub exportProcedure(ByVal fileName As String) Try '// your entire code here to get value from database. Dim sTemp As String = "my database value goes here" IO.File.WriteAllText(fileName, sTemp) '// save file. Catch ex As Exception MsgBox(ex.Message) End Try End Sub[/CODE]

Member Avatar for sarifah n
0
116
Member Avatar for twigan1015

Before you can run the provided code, you will need a File which loads all UPCs and Prices from it to 2 ArrayLists. I saved mine to: [ICODE]Private myUPCsAndPricesFile As String = "C:\myUPCsAndPricesFile.txt"[/ICODE]. The file content should contain both UPC and individual Price for each item, and should be separated …

Member Avatar for Unhnd_Exception
0
190
Member Avatar for sarifah n

You can either replace line 6 from the [iCODE]Private Sub savingFile()[/iCODE] with [ICODE]sd.RestoreDirectory = True '// restores recent Directory used.[/ICODE], or if you want to use the FilePath from your Label, if a full FilePath, change line 6 to [ICODE]sd.InitialDirectory = IO.Path.GetDirectoryName(lblName.Text) '// extract Folder Path from Full FilePath.[/ICODE], which …

Member Avatar for sarifah n
0
1K
Member Avatar for DiracDelta

Not quite clear if you want to just pick random numbers or get the possibility equation. If possibility, see if this helps. [CODE] MsgBox("The possiblily to win the loterry by drawing 6 numbers from 1 to 49," & vbNewLine & _ "is 1 in " & CDbl(49 ^ 6).ToString("#,###,###,###,###") & …

Member Avatar for codeorder
0
97
Member Avatar for royng

To NOT make your life a living hell, try to find a job that interests you, not find a job that pays well. You'll live better and will not consider life as "hell". Life should never be considered that, it just makes our ancestors look like they planned wrong for …

Member Avatar for HiHe
0
566
Member Avatar for msqueen082

Pass the ex.Message as a Parameter. [CODE] Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim x As String = "" Try x = CStr(CInt(x) + 1) Catch ex As Exception getErrorMessage(ex.Message) End Try End Sub Private Sub getErrorMessage(ByVal theReasonForTheError As String) MsgBox("Your error message is: …

Member Avatar for msqueen082
0
160
Member Avatar for The Dude

^ Waited 2 months for a reply. < Took 2 months to reply. V Did not brush their teeth for 2 months.

Member Avatar for codeorder
2
685
Member Avatar for code07

See if this helps to get you started. [B]1 TextBox, 1 Button, 3 RadioButtons[/B] [CODE]Public Class Form1 Private dValue, dInterest, dTotal As Double Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load RadioButton1.Checked = True '// check first RadioButton. End Sub Private Sub Button1_Click(ByVal sender As System.Object, …

Member Avatar for code07
0
323
Member Avatar for twigan1015

This will not add anything to a database, but it might make it easier to work with for your previously posted code. [CODE] Select Case TextBox1.Text '// 0921115150 “Dark Chocolate Truffles”, 2221001501 “ mint mintaways”, 6652300415 “Chocolate Covered Cherries”, '// 0255541028 “Malted Milk Balls”, 0921115141 “Chocolate Covered Raisins “ Case …

Member Avatar for codeorder
0
107
Member Avatar for DasQuark

See if this helps for the SaveFileDialog. [CODE] Dim myCoolSaveFileDialog As New SaveFileDialog If myCoolSaveFileDialog.ShowDialog = DialogResult.OK Then Dim FileStream As New System.IO.FileStream(myCoolSaveFileDialog.FileName, IO.FileMode.Create) '// rest of the code here for saving to file. End If[/CODE]

Member Avatar for codeorder
0
836
Member Avatar for rookanga

See if this helps. [CODE]Public Class Form1 Private myListBoxItemsFile As String = "C:\myListBoxItemsFile.txt" '// your file. '// Save to File from ListBox. Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing Dim myCoolWriter As New IO.StreamWriter(myListBoxItemsFile) For Each coolItem In ListBox1.Items '// loop thru all items in …

Member Avatar for P.manidas
0
3K
Member Avatar for igho

See if this helps. [CODE] Dim sCounter As String = "MR/IR/001" '// for testing. Dim sTemp As String = Nothing '// temp string. sTemp = sCounter.Substring(sCounter.LastIndexOf("/") + 1) '// get all char.s after the last "/". sTemp = CInt(CInt(sTemp) + 1).ToString("000") '// increment # +1, and Format it to 3 …

Member Avatar for igho
0
194
Member Avatar for Alexkid

See if this helps. [CODE]DataGridView1.Rows.Add(TextBox1.Text, TextBox2.Text, TextBox3.Text, TextBox4.Text, TextBox5.Text)[/CODE]

Member Avatar for Alexkid
0
173
Member Avatar for Netcode

Check out [URL="http://www.daniweb.com/software-development/vbnet/threads/323912/1383171#post1383171"]this thread[/URL].

Member Avatar for codeorder
-1
125
Member Avatar for kitjo

>>should i use a timer or what? I would use a Timer. As for creating a Splash Screen, I would just create it from a basic Form and not from the built in one from vb.net. You will have a lot more control over it. Something simple, using 2 Forms. …

Member Avatar for Unhnd_Exception
0
530
Member Avatar for ashwinshenoy

Move your code [COLOR="Red"]from [/COLOR][ICODE]Form1_Paint[/ICODE] event [COLOR="Green"]to [/COLOR][ICODE]GroupBox1_Paint[/ICODE] event.

Member Avatar for ashwinshenoy
0
257
Member Avatar for WDrago

[CODE] TextBox1.Text = "abcdefghi" Application.DoEvents() '// do what needs to be done and move on. Thread.Sleep(1000) TextBox1.Text = "123456789"[/CODE]

Member Avatar for Unhnd_Exception
0
932
Member Avatar for Jake.20
Member Avatar for Jake.20
0
89
Member Avatar for ashwinshenoy

[CODE] Dim x As String = " abc xyz " x = x.TrimStart(" "c).TrimEnd(" "c) MsgBox(x)[/CODE]

Member Avatar for ashwinshenoy
0
193
Member Avatar for eileenc87

See if this helps. [CODE]Public Class Form2 Private Sub Form2_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing Form1.TextBox1.Text = MonthCalendar1.SelectionStart.ToShortDateString '// .SelectionStart gets the first selected Date. End Sub End Class[/CODE]

Member Avatar for eileenc87
0
1K
Member Avatar for swathys

[QUOTE=swathys;1524767]hi, i would like to create an uniqueID where it must add +1 behind the CurrentTranxDateTime for the transaction 1 to 10....I have coded as below but the problem is [COLOR="Red"]the number doesnt +1 for each transaction[/COLOR].....any1 have idea to solve this..... eg: 300111 01:45:29 AM 1 300111 01:45:29 AM …

Member Avatar for swathys
0
371
Member Avatar for rookanga

>>I tried to get help on this on a different thread, but I didnt get any help on specifically for this... See if this helps. It contains a Boolean which will allow you to add items to your ListBox or not, depending if a correct value in the TextBox. [CODE]Public …

Member Avatar for Unhnd_Exception
0
173
Member Avatar for michael0101

>>I have problem to sae the lstCustomerStatistic to a txt.file, and later read it agin in for further use. I know this is a really old thread, but with a total of [ICODE]Views: 425[/ICODE] as of today, this link might help others to save and load a ListBox's items from …

Member Avatar for codeorder
0
230
Member Avatar for rookanga

>>...if someone could help me out on a direction... See if this helps. [CODE]Public Class Form1 Private myList As New ArrayList '// ArrayList to store info. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load '// this is how you would add values to your ArrayList. myList.Add("abc …

Member Avatar for codeorder
0
578
Member Avatar for twigan1015
Member Avatar for twigan1015

See if this helps. [CODE] Dim iMyCoolInteger As Integer = 99 '// your Integer. If iMyCoolInteger >= 10 AndAlso iMyCoolInteger <= 1000 Then '// check if value is within your preset bounds. MsgBox("Sucess: Integer is within bounds") Else '// if not within bounds. MsgBox("Fail: Integer is less than or greater …

Member Avatar for twigan1015
0
107
Member Avatar for Formby
Member Avatar for iBlake

If you just need the items from a ListBox added as a new line in a MsgBox, see if this helps. [CODE] Dim sTemp As String = Nothing '// store items and new lines. For Each itm As String In ListBox1.Items '// loop thru items. '// add to String as …

Member Avatar for codeorder
0
206

The End.