725 Posted Topics
Re: 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. … | |
Re: [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] | |
Re: [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) … | |
Re: See if this helps. File Menu/Project/"your app's name" Properties.../Application tab. .Set "Startup form:" to your Form, not Form1. | |
Re: 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 … | |
Re: 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. | |
Re: See if this helps. [CODE]Process.Start("http://www.google.com")[/CODE] | |
Re: Can you post a sample of code from your C program, that includes comment lines? | |
Re: 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] | |
Re: Check out [URL="http://www.daniweb.com/software-development/vbnet/threads/349391/1484062#post1484062"]this thread[/URL]. | |
Re: 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] | |
Re: 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. | |
Re: 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. | |
Re: 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 … | |
Re: See if this helps. [CODE] '// Clear all SelectedCells. For Each cell As DataGridViewCell In DataGridView1.SelectedCells : cell.Value = Nothing : Next[/CODE] | |
Re: 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. | |
Re: 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 … | |
Re: [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 … | |
Re: 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 … | |
Re: 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. | |
Re: 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 … | |
Re: 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] | |
Re: 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 … ![]() | |
Re: 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 … | |
Re: 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("#,###,###,###,###") & … | |
Re: 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 … | |
Re: 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: … | |
Re: ^ Waited 2 months for a reply. < Took 2 months to reply. V Did not brush their teeth for 2 months. | |
Re: 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, … | |
Re: 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 … | |
Re: 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] | |
Re: 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 … | |
Re: 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 … | |
Re: See if this helps. [CODE]DataGridView1.Rows.Add(TextBox1.Text, TextBox2.Text, TextBox3.Text, TextBox4.Text, TextBox5.Text)[/CODE] | |
Re: Check out [URL="http://www.daniweb.com/software-development/vbnet/threads/323912/1383171#post1383171"]this thread[/URL]. | |
Re: >>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. … ![]() | |
Re: Move your code [COLOR="Red"]from [/COLOR][ICODE]Form1_Paint[/ICODE] event [COLOR="Green"]to [/COLOR][ICODE]GroupBox1_Paint[/ICODE] event. | |
Re: [CODE] TextBox1.Text = "abcdefghi" Application.DoEvents() '// do what needs to be done and move on. Thread.Sleep(1000) TextBox1.Text = "123456789"[/CODE] ![]() | |
Re: [B]Jake.20[/B], care to share with the rest of us how you solved this issue? | |
Re: [CODE] Dim x As String = " abc xyz " x = x.TrimStart(" "c).TrimEnd(" "c) MsgBox(x)[/CODE] | |
Re: 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] | |
Re: [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 … | |
Re: >>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 … ![]() | |
Re: >>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 … | |
Re: >>...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 … | |
Re: [CODE] desripition = TextBox2.Text[/CODE] | |
Re: 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 … | |
Re: [CODE] If Forms(i) Is Nothing Then[/CODE] | |
Re: 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 … |
The End.