725 Posted Topics

Member Avatar for shredder2794
Member Avatar for codeorder
0
551
Member Avatar for VB 2012

See if this helps. [CODE] For Each myCoolTab As TabPage In TabControl1.TabPages ListBox1.Items.Add(myCoolTab.Text) Next[/CODE]

Member Avatar for VB 2012
0
181
Member Avatar for Trle94

Just for references, you can also select by Index. [CODE]TabControl1.SelectedIndex = 1 '// select TabPage2.[/CODE]

Member Avatar for Trle94
0
336
Member Avatar for killerbeat

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

Member Avatar for codeorder
0
2K
Member Avatar for Turaiel

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]

Member Avatar for lolafuertes
0
177
Member Avatar for TheMightySpud

[CODE] Select Case buttonPressed.Name Case "Button1" MsgBox("Button1 clicked.") Case "Button2" MsgBox("Button2 clicked.") Case Else MsgBox("Unknown Button clicked.") End Select[/CODE]

Member Avatar for GeekByChoiCe
0
142
Member Avatar for Sarama2030

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 += …

Member Avatar for crapulency
0
351
Member Avatar for battlescar

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 …

Member Avatar for codeorder
0
194
Member Avatar for Brianbc

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]

Member Avatar for codeorder
0
395
Member Avatar for eikal

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 …

Member Avatar for codeorder
0
112
Member Avatar for Netcode

Click on a user's name, select the "Friends" tab at the very top and click "Befriend 'username'".

Member Avatar for codeorder
-1
131
Member Avatar for cr6564

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 …

Member Avatar for codeorder
0
650
Member Avatar for xcarbonx

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 …

Member Avatar for xcarbonx
0
1K
Member Avatar for linezero

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 …

Member Avatar for codeorder
0
129
Member Avatar for Pundia

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

Member Avatar for codeorder
0
223
Member Avatar for lewisco

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 …

Member Avatar for codeorder
0
1K
Member Avatar for Trle94

[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]

Member Avatar for Trle94
0
155
Member Avatar for eladreznik

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.

Member Avatar for codeorder
0
70
Member Avatar for powerteens001

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

Member Avatar for powerteens001
0
782
Member Avatar for TheMightySpud

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

Member Avatar for codeorder
0
308
Member Avatar for xcarbonx
Member Avatar for Netcode
0
107
Member Avatar for dheerajlonely

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 …

Member Avatar for Netcode
0
187
Member Avatar for TechSupportGeek

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 …

Member Avatar for TechSupportGeek
0
205
Member Avatar for eikal

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

Member Avatar for eikal
0
538
Member Avatar for killbill07

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]

Member Avatar for codeorder
0
345
Member Avatar for keedier

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 …

Member Avatar for codeorder
0
238
Member Avatar for eikal

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 …

Member Avatar for eikal
0
130
Member Avatar for glenak

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

Member Avatar for glenak
0
169
Member Avatar for Noorul Ariff
Member Avatar for y0yie_333

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 …

Member Avatar for codeorder
0
403
Member Avatar for zarifin99ska

You might need [URL="http://www.carlosag.net/Tools/CodeTranslator/"]this[/URL] to figure out the C# code posted by [B]sundarchum [/B].

Member Avatar for zarifin99ska
0
135
Member Avatar for swathys

What Event is your posted code in and are you calling that Event after removing a record?

Member Avatar for swathys
0
345
Member Avatar for ajay531

See if this helps. [URL="http://www.dreamincode.net/code/snippet638.htm"]http://www.dreamincode.net/code/snippet638.htm[/URL]

Member Avatar for codeorder
0
173
Member Avatar for chris evans

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.

Member Avatar for chris evans
0
138
Member Avatar for jcfans

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

Member Avatar for jcfans
0
161
Member Avatar for chris311fan

[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.

Member Avatar for codeorder
0
116
Member Avatar for ITStrawberry

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?

Member Avatar for codeorder
0
140
Member Avatar for ralph prgrmmr

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]

Member Avatar for lolafuertes
0
147
Member Avatar for markdean.expres

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

Member Avatar for lolafuertes
0
315
Member Avatar for MrVBProgrammer

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 …

Member Avatar for codeorder
0
294
Member Avatar for arjen

[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]

Member Avatar for codeorder
0
2K
Member Avatar for breisa

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.

Member Avatar for lolafuertes
0
559
Member Avatar for selle05

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

Member Avatar for ilog
0
319
Member Avatar for Kingcoder210

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 …

Member Avatar for nore
0
357
Member Avatar for discovery-power

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

Member Avatar for codeorder
0
85
Member Avatar for xcarbonx

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 …

Member Avatar for codeorder
0
410
Member Avatar for jcfans

[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]

Member Avatar for marketingmaniac
0
2K
Member Avatar for choover12

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

Member Avatar for codeorder
0
190
Member Avatar for Dazamondo

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 …

Member Avatar for codeorder
0
1K
Member Avatar for mrbungle

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 …

Member Avatar for codeorder
0
157

The End.