725 Posted Topics
Re: See if [URL="http://www.daniweb.com/forums/post1312990.html#post1312990"]this[/URL] helps. | |
Re: See if this helps. [CODE] For Each myCoolTab As TabPage In TabControl1.TabPages ListBox1.Items.Add(myCoolTab.Text) Next[/CODE] | |
Re: Just for references, you can also select by Index. [CODE]TabControl1.SelectedIndex = 1 '// select TabPage2.[/CODE] | |
Re: See if this helps. Prerequisites: 1 ListView, 1 Button. [CODE]Public Class Form1 Private myCoolFile As String = "C:\test.txt" '// your file. Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing Dim myWriter As New IO.StreamWriter(myCoolFile) For Each myItem As ListViewItem In ListView1.Items myWriter.WriteLine(myItem.Text & "#" & myItem.SubItems(1).Text) … | |
Re: See if this helps about the sound issues. [URL="http://www.daniweb.com/forums/post772157.html#post772157"]http://www.daniweb.com/forums/post772157.html#post772157[/URL] | |
Re: [CODE] Select Case buttonPressed.Name Case "Button1" MsgBox("Button1 clicked.") Case "Button2" MsgBox("Button2 clicked.") Case Else MsgBox("Unknown Button clicked.") End Select[/CODE] | |
Re: See if this helps for calling certain events. [CODE]'//-------- Pre-requisites: 1 Button, 1 Timer. ----------\\ Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.Text = "1" Timer1.Start() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Me.Text += … | |
Re: See if this helps. [CODE] '// original .txt Folder with .txt Files. Dim myTXT_folder As String = "C:\tempTXT\" '// .csv Folder to save Files to. Dim myCSV_folder As String = "C:\tempCSV\" '// create a temporary TextBox. Dim tempTextBox As New TextBox With {.Multiline = True} '// loop thru the .txt … | |
Re: See if this helps. [CODE]Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load WebBrowser1.Navigate("http://www.google.com/firefox?client=firefox-a&rls=org.mozilla:en-US:official") End Sub Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted If WebBrowser1.Url.AbsoluteUri = "http://www.google.com/firefox?client=firefox-a&rls=org.mozilla:en-US:official" Then MsgBox("Web-page located.", MsgBoxStyle.Information) End If End Sub End Class [/CODE] | |
Re: See if this helps. [CODE]'//------ Pre-requisites: 1 Button, 2 ComboBoxes. ----------\\ Public Class Form1 Private myScoreArray() As Integer = {"2", "4", "6", "8", "10"} '// set scores here. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click '// display result by using .SelectedIndex to select an array … | |
Re: Click on a user's name, select the "Friends" tab at the very top and click "Befriend 'username'". | |
Re: When working with Files, you should always check if the File exists. [CODE] Dim myCoolFile As String = "c:\something.bat" '// your file. If IO.File.Exists(myCoolFile) Then '// check if File exists. Process.Start(myCoolFile) Else '// if File does not exist... MsgBox("File Does Not Exist.", MsgBoxStyle.Critical) '// display message. End If[/CODE] As for … | |
Re: Here is something to get started with using a ListView. [CODE] '// customize. ListView1.View = View.Details '// delete "Details" for other options from IntelliSense. ListView1.CheckBoxes = True '// add checkboxes. ListView1.FullRowSelect = True '// select entire row when SubItems are listed. ListView1.LabelEdit = True '// edit the item's value. ListView1.GridLines … | |
Re: See if this helps. [CODE] Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress If TextBox1.TextLength = 0 Then '// check if TextBox is empty. If Not e.KeyChar = "8" Then '// if not "8". e.Handled = True '// cancel the key pressed. MsgBox("First character is not … | |
Re: See if this helps. [CODE]Public Class Form1 Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint Dim myGraphics As Graphics = e.Graphics '// draw Dots. Dim myDotPen As New Pen(Color.SteelBlue, 10) '// set DOT pen color and width. myGraphics.DrawEllipse(myDotPen, 25, 25, 10, 10) '// (preset pen, location.X, … | |
Re: See if this helps. [CODE] '// code to get Scanned BarCode here. If Not TextBox1.Lines.Length = 0 Then '// check if TextBox contains text. TextBox1.Text &= vbNewLine & "my Scanned BarCode" '// add new line and BarCode. Else TextBox1.Text = "my Scanned BarCode" '// add BarCode. End If[/CODE] With the … | |
Re: [CODE] Dim tempStr As String = "C:\Reading files\bin\Debug\path.txt';" MsgBox(tempStr.Substring(0, tempStr.Length - 2)) '// "0" = start Index, "tempStr.Length - 2" = Substring length.[/CODE] | |
Re: If you do not need to re-size the Panel's separations, even a blank Label that is set to AutoSize=False with a 3D border should do the trick. Otherwise, check out the [B]SplitContainer[/B] in the "Containers" tab of the vb.net Toolbox. | |
Re: See if this helps. [CODE]'//------- Prerequisites: 1 ComboBox, 3 TextBoxes. -------\\ Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ComboBox1.Items.Add("Mandatory") : ComboBox1.Items.Add("All") '// add items. ComboBox1.SelectedIndex = 0 '// select first option. ComboBox1.TabIndex = 999 '// set index presumably to very last index. … | |
Re: See if this helps. [CODE]Public Class Form1 Private myImg(10) As Bitmap '// create Bitmap Array to store images. Private myImgAM As New Bitmap("C:\AM.png") Private myImgPM As New Bitmap("C:\PM.png") Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load '// add Images to Arrays in set order. myImg(0) = … | |
Re: Try posting your solution and marking that post as answer. | |
Re: See if this helps. [CODE]'//-------------- Pre-requisites: 1 ProgressBar, 1 Timer, 1 Button, 2 Forms. --------------\\ Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ProgressBar1.Maximum = 100 '// set the Maximum allowed progress. Timer1.Start() '// Start the Timer to keep status of ProgressBar. End … | |
Re: See if this helps, if not, do post code. [CODE] Dim tempStr As String = RichTextBox1.Rtf '// store Format into String. RichTextBox1.Clear() '// clear if needed. If RichTextBox1.WordWrap = True Then : RichTextBox1.WordWrap = False : Else : RichTextBox1.WordWrap = True : End If '// toggle WordWrap. RichTextBox1.Rtf = tempStr … | |
Re: A bit confusing to understand, but since an Accept Button is like a Submit button on a Form, pressing the Enter key in any of the fields should press the Submit Button, in this case a PictureBox. If so, see if the following code sample helps. [CODE]'//--------- Pre-requisites: 1 PictureBox, … | |
Re: See if this helps. [CODE] '// Prerequisites: 3 Buttons Dim myCoolControls() As Control = {Button1, Button2, Button3} For Each onlyCoolControl As Control In myCoolControls : onlyCoolControl.BackColor = Color.SteelBlue : Next[/CODE] | |
Re: This part for FileName "C:/account/myfile.txt", use [B]\[/B] instead of [B]/[/B]. Example: "C:\account\myfile.txt" As for the rest, see if this helps. [CODE] Dim n As String = Environment.NewLine Dim MyString As String = TextBox1.Text.PadRight(6) '// add first TextBox text. '// add to the same string a new line and the following … | |
Re: Not sure if this helps, but try converting the Integers to Decimals. [B] CDec(hoursinteger)[/B] [CODE] Private Sub calculations() If AdultsizeRadioButton1.Checked = True Then adulttotaldecimal = quantityinteger * adultpricedecimal * CDec(hoursinteger) ElseIf ChildsizeRadioButton2.Checked = True Then childtotaldecimal = quantityinteger * childpricedecimal * CDec(hoursinteger) End If adultchildtotaldecimal = adulttotaldecimal + childtotaldecimal extendedpricedecimal … | |
Re: Not much of a book and not much content, but a good start. [URL="http://www.codeorder.net/pages/tutorials.html"]www.codeorder.net/pages/tutorials.html[/URL] As for teaching you what you need to know, how are we supposed to know "what you need to know"? :D | |
Re: [B]Toolbox > Menus & Toolbars > ToolStrip[/B] > :) | |
Re: Same result as [B]FreaKing [/B], just a different style of coding. [CODE]Public Class Form1 '// Category lists of string arrays. '// '-- should be easy to create if you can accesss the database. Private lstADIDAS() As String = {"ADIDAS - 1", "ADIDAS - 2", "ADIDAS - 3"} Private lstCONVERSE() As … | |
Re: You might need [URL="http://www.carlosag.net/Tools/CodeTranslator/"]this[/URL] to figure out the C# code posted by [B]sundarchum [/B]. | |
Re: What Event is your posted code in and are you calling that Event after removing a record? | |
Re: See if this helps. [URL="http://www.dreamincode.net/code/snippet638.htm"]http://www.dreamincode.net/code/snippet638.htm[/URL] | |
Re: No problem here having a New Project with 2 Forms and using this code. [CODE]Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Me.Hide() Form2.Show() End Sub End Class [/CODE] Form1 hides and Form2 shows, nothing else. | |
Re: [QUOTE=jcfans;1356277]how to check login o x? thanks[/QUOTE] See if this helps. [CODE]Public Class Form1 Private hasLoggedIn As Boolean = False Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown If e.KeyCode = Keys.Enter Then If hasLoggedIn = False Then Button1_Click(sender, e) End If End Sub Private Sub … | |
Re: [B]First steps[/B] would be to [B]create the design and Name your controls properly[/B]. Then just getting the correct equation would be the difficult part of the entire project, although probably not difficult at all. | |
Re: I have no problem drawing graphics on a [B].tif image[/B] file by using your code. Have you tried to [B]save the image as a different format[/B] before loading it into your PictureBox and drawing the graphics on it? | |
Re: As [B]JJCollins [/B]mentioned, a search engine is a good place to find information about vb.net, if you know what to look for. Also, you can check out my website. It has quite a few tutorials and code samples. [URL="http://www.codeorder.net/"]www.codeorder.net[/URL] | |
Re: That "menu" you are referring to, in vb.net is called a ContextMenuStrip. The ContextMenuStrip can be located in the Toolbox under the "Menus & Toolbars" tab. Double click the ContextMenuStrip control in the Toolbox and you should get a "ContextMenuStrip" with a "Type Here" right under it on the Form. … | |
Re: See if this helps. [CODE]Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Button1.Enabled = False End Sub Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress '// code from this thread here. '//--- http://www.daniweb.com/forums/post1345601.html#post1345601 End Sub Private Sub TextBox1_TextChanged(ByVal sender … | |
Re: [CODE] Dim myFile As String = "C:\test.txt" '// file location. Dim myWriter As New IO.StreamWriter(myFile) For Each myItem As ListViewItem In ListView1.Items myWriter.WriteLine(myItem.Text & "|" & myItem.SubItems(1).Text & "|" & myItem.SubItems(2).Text) Next myWriter.Close()[/CODE] | |
Re: See if this helps by using the Deactivate event. [CODE] Private Sub Form1_Deactivate(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Deactivate '// your code here to show the notify icon. End Sub[/CODE] To hide the icon, use the Activated event. | |
Re: [CODE]Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load '// create a list of items. Dim myList() As String = {"item 1", "item 2", "item 3", "item 4", "item 5", "item 6", "item 7", "item 8", "item 9", "item 10"} '// add items to … | |
Re: If unsure of what .Net Framework you application was created for use in, locate vb.net File menu/ Project/"your application" Properties... Click the compile tab and very last option "Advanced Compile Options...", which should show the .Net Framework your application needs in order to function. If unsure of what .Net Framework … | |
Re: [QUOTE=discovery-power;1345212] Question: How can I get my Windows Form for the players names to load when the application is started, do I use a form load event??? [/QUOTE] You can always add a new Form, go to Project/"your application" Properties..., Application Tab, and locate the "Startup form:" option. Or just … | |
Re: If Closing is the same as Line Reading then see if this helps. [CODE] Dim myCoolFile As String = "C:\test.txt" '// your file. Dim line1 As Integer = 0, line2 As Integer = 1, line3 As Integer = 2, line4 As Integer = 3 If IO.File.Exists(myCoolFile) Then Dim myCoolFileLines() As … | |
Re: [CODE] Dim myDataString As String = "0-AGF-MYR-100101" Dim myArray() As String = myDataString.Split("-") '// separate each item. For i As Integer = 0 To myArray.Length - 1 '// loop thru myArray. '// code to add datatable column here. MsgBox(myArray(i)) '// display result. '// Next[/CODE] | |
Re: See if this helps. [CODE] Private Sub Panel1_MouseHover(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Panel1.MouseHover If Panel1.Height = 200 Then Exit Sub For i As Integer = 100 To 200 Step 1 Panel1.Height = i Next End Sub Private Sub Panel1_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) … | |
Re: See if this helps. [CODE] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click MsgBox("A cool little message.") End Sub Private Sub TextBox1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyUp If e.KeyCode = Keys.Enter Then Button1_Click(sender, e) End If End Sub[/CODE] If you are using … | |
Re: See if this helps. [CODE]'// Prerequisites: 3 TextBoxes. '// TextBox1 = current start time, TextBox2 = case number, TextBox3 = current time in the start box on the next row Public Class Form1 Private Sub Form1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyUp If e.KeyCode = Keys.F1 Then … |
The End.