725 Posted Topics

Member Avatar for emaduddeen

See if this helps for bypassing the Validation of a TextBox. [B]1 TextBox, 1 Button[/B] [CODE]Public Class Form1 Private bValidateTextBox As Boolean = True Private Sub Button1_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseEnter bValidateTextBox = False '// Disable Validation. End Sub Private Sub Button1_MouseLeave(ByVal sender As Object, …

Member Avatar for emaduddeen
0
1K
Member Avatar for bettybarnes

See if this helps. [CODE] Public Sub navigaterecords(ByVal lvItemIndex As Integer) With ListView1.Items(lvItemIndex) MsgBox(.SubItems(0).Text) '// for testing. End With End Sub '// First. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click navigaterecords(0) End Sub '// Last. Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) …

Member Avatar for bettybarnes
0
158
Member Avatar for Jake.20

See if this helps. yearBox has years as: 2010,2009,2008,etc. monthBox has months by name as: January, February, March, etc. [CODE] Private Sub myCoolYearsAndMonths_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) _ Handles yearBox.SelectedIndexChanged, monthBox.SelectedIndexChanged '// check if both boxes have values selected. If Not yearBox.SelectedIndex = -1 AndAlso Not monthBox.SelectedIndex …

Member Avatar for Jake.20
0
619
Member Avatar for xxxferraxxx

See if this helps. [CODE]'// paste in New Project and click to move Form. '//-- Panel1 and PictureBox1 can be uncommented to use the same Events. '//-- to use only a Panel, PictureBox, or any other control, just add the appropriate code for each event. Public Class Form1 Private allowCoolMove …

Member Avatar for codeorder
0
605
Member Avatar for SolidSora

Try this for "out of bounds exception". [CODE]For x = 0 To numbers.Length - 1[/CODE] When using .Length or .Count, it starts at 1 not 0. Since you are looping from "0", then subtract 1 from .Length to get a even amount of loops. As for the bubble issue, good …

Member Avatar for Momerath
0
632
Member Avatar for paulablanca

See if this helps. [CODE]Public Class Form1 Private myCoolList As New List(Of Integer) '// List to store your SelectedIndexes. Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged If Not myCoolList.Contains(ComboBox1.SelectedIndex) Then '// check if not already added. myCoolList.Add(ComboBox1.SelectedIndex) '// add to list. Else MsgBox("This item has …

Member Avatar for prvnkmr194
0
186
Member Avatar for xxxferraxxx

Does not adding the code from your thread for "[URL="http://www.daniweb.com/forums/thread349197.html"]Need help with background music[/URL]" work if added to a Button.Click?

Member Avatar for VBrulez
0
147
Member Avatar for Joshua Kidd

Use the _TextChanged event of the RichTextBox. [CODE] Private Sub RichTextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RichTextBox1.TextChanged Label1.Text = (RichTextBox1.MaxLength - RichTextBox1.TextLength).ToString End Sub[/CODE]

Member Avatar for Joshua Kidd
0
170
Member Avatar for IT_Student_604
Member Avatar for prvnkmr194
0
119
Member Avatar for e_ayt

Check out [URL="http://www.daniweb.com/forums/thread306269.html"]this thread[/URL] for info about a countdown timer.

Member Avatar for prvnkmr194
0
602
Member Avatar for rookanga

If still a bit confused, see if this helps. [CODE]Public Class Form1 '//--- Dormitories GroupBox. Const dblDormMichigan As Double = 1500.0,dblDormEagle As Double = 1600.0 Const dblDormHuron As Double = 1200.0,dblDormSuperior As Double = 1800.0 '//--- Meals GroupBox. Const dblMealLunch As Double = 560.0, dblMealDinner As Double = 1102.0, dblMealUnlimited …

Member Avatar for prvnkmr194
0
1K
Member Avatar for SolidSora

Not quite clear what you are trying to do with the numbers() and numNumbers, but using the [URL="http://msdn.microsoft.com/en-us/library/w8k3cys2%28v=vs.71%29.aspx"]ReDim Statement[/URL] should help. [CODE] Private numbers() As Double '// changed to Double since TextBox allows ".". Private numNumbers As Integer = 0 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) …

Member Avatar for e_ayt
0
177
Member Avatar for mr3army

[QUOTE=mr3army;1484438]I cant seem to get the post before the other one to work i just want it to go through and ping the selected websites in the list[/QUOTE] Just wondering, each site that you load and ping in the WebBrowser, does it load a new page that you need to …

Member Avatar for codeorder
0
168
Member Avatar for jaango123

Check out [URL="http://asp.dotnetheaven.com/howto/doc/Xml/TransformXml_Debug.aspx"]this link[/URL], it might have the info you are looking for. I converted the code provided in that link from c# to vb.net, but I personally do not have any experience with vb.net and XSLT. [CODE] Dim processor As Xml.Xsl.XslCompiledTransform = New Xml.Xsl.XslCompiledTransform(True)[/CODE] Wish I could be of …

Member Avatar for codeorder
0
88
Member Avatar for vigneshvdm
Member Avatar for johnbo100

See if this helps. [B]1 Button[/B] [CODE]Imports System.Xml Public Class Form1 Private myXML_FileLocation As String = "C:\test.xml" '// .xml file and location. Private xmlDoc As New XmlDocument, xmlSelectedNode As XmlNode Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load xmlDoc.Load(myXML_FileLocation) 'Load the Xml file once if constantly …

Member Avatar for johnbo100
0
5K
Member Avatar for get connected

See if this helps. [CODE]Public Class Form1 Private FixTex(35) As String Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load FixTex(0) = "something" FixTex(5) = "something else" FixTex(29) = "and some something more or less" End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) …

Member Avatar for get connected
0
263
Member Avatar for horserider

Check out [URL="http://vbcity.com/forums/p/25014/105531.aspx#105531"]this link[/URL].

Member Avatar for codeorder
0
308
Member Avatar for AnooooPower

[B]1 RadioButton, 1 Button[/B] [CODE] Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged If RadioButton1.Checked Then Button1.Enabled = True Else Button1.Enabled = False End Sub[/CODE]

Member Avatar for AnooooPower
0
2K
Member Avatar for @Kui

See if this helps. [B]2 TextBoxes, 1 Button, 1 ListBox[/B] [CODE]Public Class Form1 '// lowercase for testing against lowercase Text from the TextBox. Private myMonths() As String = {"january", "february", "march", "april", "may", "june", "july", "august", "september", "october", "november", "december"} Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) …

Member Avatar for codeorder
0
144
Member Avatar for rookanga

Here's something for starters to get your RadioButtons working properly. [CODE] Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) _ Handles rbBadCredit.CheckedChanged, rbOkCredit.CheckedChanged, rbGoodCredit.CheckedChanged If rbBadCredit.Checked = True Then ' I dont know what to do to put this as 23 % End If If rbOkCredit.Checked = True …

Member Avatar for codeorder
0
182
Member Avatar for ayarton

See if this helps. [CODE] '----------------------EXIT ROUTINE--------------------------------------------------------------------- Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click Me.Close() '// cause app to close. End Sub '----------------------END EXIT ROUTINE----------------------------------------------------------------- Private Sub frmRODSelectPage_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing '// when app. closes, it fires off this …

Member Avatar for codeorder
0
105
Member Avatar for AnooooPower

Since using a String and not a Number, use the "&" to "add to" the value of a String and not try and "add up" the value of a String by using "+". [CODE]if checkbox1.checked then textboxtext &= " checkbox1, "[/CODE] Even though the "+" will probably work, have not …

Member Avatar for codeorder
0
3K
Member Avatar for Joshua Kidd

See if this helps. [B]2 Forms: Form1(1 Button, 1 PictureBox)[/B] [CODE]Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Not Form2.Visible Then : Form2.Show() : Exit Sub : End If PictureBox1.Image = getSnapshot(Form2) End Sub Private Function getSnapshot(ByVal snapshotForm As Form) As Bitmap …

Member Avatar for Joshua Kidd
0
283
Member Avatar for mr3army

See if this helps. [B]1 WebBrowser, 1 Button[/B] [CODE] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Not WebBrowser1.IsBusy Then '// make sure the webpage finished loading. If WebBrowser1.Url.AbsoluteUri = "http://www.threatexpert.com/submit.aspx" Then '// check if correct website. submitFileSampleToThreatExpert(WebBrowser1, TextBox1.Text) '// Submit File(your WebBrowser used, your …

Member Avatar for codeorder
0
161
Member Avatar for CityThrille

See if [URL="http://www.daniweb.com/forums/post1387173.html#post1387173"]this thread[/URL] helps. You will need [B]1 ListView and 1 Button[/B] in a New Project. If you currently have a "C:\test.txt" File, delete it prior to running the code.

Member Avatar for codeorder
0
95
Member Avatar for AnooooPower

Not really sure, but I believe that "Len" is from vb6 and might cause issues in the future when used as code in vb.net. If "Len" is length, then use [ICODE]RichTextBox1.Text.Length[/ICODE]. As for your already solved issue, see if this helps. [CODE] Dim iStartIndex, iEndIndex As Integer With RichTextBox1.Text iStartIndex …

Member Avatar for AnooooPower
0
744
Member Avatar for CityThrille

See if this helps. [B]1 ListView, 1 TextBox(for search value), 1 Button(to search)[/B] [CODE] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Not ListView1.MultiSelect = False Then ListView1.MultiSelect = False '// disable MultiSelection of items. If TextBox1.Text = "" Then Exit Sub '// do not …

Member Avatar for CityThrille
0
212
Member Avatar for CrashanBurn

See if this helps. [CODE]Public Class Form1 Private iTotal As Integer '// used to add up the Total of all Product TextBoxes. '// renamed from: TxtPPproduct1_TextChanged Private Sub myCoolTextBoxes_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) _ Handles TxtPPproduct1.TextChanged, TxtPPproduct2.TextChanged, TxtPPproduct3.TextChanged '// add remaining TextBoxes here. iTotal = 0 '// …

Member Avatar for CrashanBurn
0
404
Member Avatar for dooleyis

See if this helps. [CODE]Public Class Form1 Private inPar, outPar As Integer '// Declared once. Private Sub txtP1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) _ Handles txtP1.TextChanged, txtP2.TextChanged, txtP3.TextChanged, _ txtP18.TextChanged, txtP16.TextChanged, txtP17.TextChanged '// add your other txtP# TextBoxes here. UpdatePar() txtIn.Text = CStr(inPar) : txtOut.Text = CStr(outPar) : …

Member Avatar for dooleyis
0
216
Member Avatar for tukky

See if this helps. [B]2 Forms (1 Button on Form1, 3 TextBoxes on Form2)[/B] [CODE]Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If ListView1.SelectedItems.Count = 1 Then '// check if only 1 item is selected. With ListView1.SelectedItems(0) '// with Selected item. Form2.TextBox1.Text = …

Member Avatar for codeorder
0
123
Member Avatar for yoge911

See if this helps. [B]2 Forms (1 TextBox and 1 Button on Form2)[/B] [CODE]Public Class Form1 Public myCoolPassword As String = "cool" '// your preset Password. Public arlMyApplicationsList As New ArrayList '// add applications to this list. Private myRunningProcesses() As Process Private WithEvents myTimer As New Timer With {.Interval = …

Member Avatar for yoge911
0
228
Member Avatar for shawn130c

[CODE]Dim stroutput As Decimal[/CODE] A Decimal is a Number, not Text. You need to declare it "As String" and include the value within the quotation marks. [CODE] Dim strOutput As String strOutput = "w" TextBox2.Text = strOutput[/CODE] As for the rest, see if this helps. [CODE]Public Class Form1 Private Function …

Member Avatar for codeorder
0
940
Member Avatar for arezz09

See if this helps. [CODE] '// can also be located in the Control's Properties. ComboBox1.Sorted = True ListView1.Sorting = SortOrder.Ascending 'ListView1.Sorting = SortOrder.Descending 'ListView1.Sorting = SortOrder.None[/CODE]

Member Avatar for codeorder
0
129
Member Avatar for bettybarnes

Check out [URL="http://www.daniweb.com/forums/post1443692.html#post1443692"]this thread[/URL] for "a simple If statement around it".

Member Avatar for anucom
0
105
Member Avatar for horserider

Since you have not mentioned which control to add the Files to, I will also use a ListBox. [CODE] Dim myCoolFolder As String = "C:\Program Files" '// your Folder. Try For Each myCoolFile As String In My.Computer.FileSystem.GetFiles _ (myCoolFolder, FileIO.SearchOption.SearchAllSubDirectories, "*.*") 'ListBox1.Items.Add(IO.Path.GetFileName(myCoolFile)) '// add only File Name with extension. ListBox1.Items.Add(myCoolFile) …

Member Avatar for horserider
0
824
Member Avatar for TechSupportGeek

I'm not a console coder, but this should help. [CODE] Dim sInput As String = "250+1" '// value for testing. Dim iIndex As Integer = sInput.IndexOf("+") '// locate the "+". Dim iFirstNum As Integer = CInt(sInput.Substring(0, iIndex)) '// (startIndex, Length) Dim iSecondNum As Integer = CInt(sInput.Substring(iIndex + 1)) '// (startIndex …

Member Avatar for TechSupportGeek
0
176
Member Avatar for horserider

[CODE] FileSize = CInt(GetSize(MyFile)).ToString("#,###,###,###") & " KB"[/CODE]

Member Avatar for horserider
0
273
Member Avatar for VB_CMI

See if this helps. [CODE] '// Give focus to TextBox and Send the BackSpace key. TextBox1.Focus() : SendKeys.Send("{BACKSPACE}")[/CODE] Or you can use this, which only removes the last char. unlike the SendKeys code. [CODE] With TextBox1 If Not .Text = "" Then .Text = .Text.Substring(0, .TextLength - 1) End With[/CODE]

Member Avatar for VB_CMI
0
569
Member Avatar for Joshua Kidd

See if this helps. [B]1 NotifyIcon, 1 ContextMenuStrip[/B] [CODE]Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load NotifyIcon1.ContextMenuStrip = ContextMenuStrip1 '// attach ContextMenu to NotifyIcon. End Sub Private Sub NotifyIcon1_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles NotifyIcon1.MouseClick If e.Button = MouseButtons.Right Then …

Member Avatar for Joshua Kidd
0
429
Member Avatar for bestex

See if this helps. [CODE]Me.TextBox1.Text = CInt(myDR.GetValue(0) + 1).ToString("10000")[/CODE]

Member Avatar for codeorder
0
147
Member Avatar for get connected

Check out [URL="http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/9bb2c1b1-4bf9-4fb2-b2d4-5a4575ef6289/"]this link[/URL]. Read through it for more info and follow the link provided in the that thread to load an application in a Form, not a TabControl.

Member Avatar for get connected
0
220
Member Avatar for josephbeluan

Check out [URL="http://www.daniweb.com/forums/thread343743.html"]this thread[/URL]. It is for vbscript and not for vb.net, although it can easily be modified for vb.net. .If you need help doing so, do let me know.

Member Avatar for codeorder
-1
96
Member Avatar for bLuEmEzzy

Let me know if this helps. [CODE]Public Class Form1 Private WithEvents cbCheckUncheckALL As New CheckBox With {.Text = "", .AutoSize = True} '// Declare New CheckBox. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load '// Place CheckBox above ListView, in the location of ListView's Column 1. …

Member Avatar for bLuEmEzzy
0
2K
Member Avatar for Ducklz

See if this helps. [CODE] newtab.Controls.Add(newctrl) '// add control to new tab. TabControl1.Controls.Add(newtab) '// add tab to TabControl.[/CODE]

Member Avatar for ninjatalon
0
308
Member Avatar for jmensah

[QUOTE=jmensah]...am getting the error durng runtime 'conversion from string "" to type 'Double' is not valid[/QUOTE] The following will throw the "Conversion from string "" to type 'Double' is not valid." error. [CODE] Private x As String = "" Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles …

Member Avatar for codeorder
0
1K
Member Avatar for arezz

See if this helps. [B]1 PictureBox, 1 Button[/B] [CODE]Public Class Form1 Private myCoolFile As String = "C:\test.txt" '// File to save/load FullPath of Image. Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing '// Save File if there is a FullPath in the .Tag. If Not PictureBox1.Tag …

Member Avatar for arezz
0
242
Member Avatar for Jake.20

See if this helps. [B]1 ComboBox[/B] [CODE] Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged If Not Date.IsLeapYear(CInt(ComboBox1.SelectedItem)) Then MsgBox("Not a Leap Year.") Else MsgBox("Leap year.") End Sub[/CODE] [URL="http://kalender-365.de/leap-years.php"]This link[/URL] might be of use.

Member Avatar for codeorder
0
157
Member Avatar for spydanger

We're here, but you can keep waiting since this seems like another gimmick to cheat a company out of their hard earned cash like your [URL="http://www.daniweb.com/forums/post1471657.html#post1471657"]other thread[/URL].

Member Avatar for spydanger
-1
195
Member Avatar for sipchen

See if this helps. [CODE]Public Class Form1 Public a, b, c As Decimal Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Not IsNumeric(TextBox1.Text) Then Exit Sub Dim Obj1, Obj2 As New Form2 a = CDec(TextBox1.Text) b = 1 + a c = 2 + a …

Member Avatar for Mariandi
0
2K

The End.