725 Posted Topics
Re: 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, … | |
Re: 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) … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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? | |
Re: 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] | |
Re: How are you loading employee names and their id numbers? From file? Database? | |
Re: Check out [URL="http://www.daniweb.com/forums/thread306269.html"]this thread[/URL] for info about a countdown timer. | |
Re: 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 … | |
Re: 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) … | |
Re: [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 … | |
Re: 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 … | |
Re: Can you supply some more details? And, is this for asp.net or for use in a vb.net WebBrowser? | |
Re: 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 … | |
Re: 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) … | |
Re: Check out [URL="http://vbcity.com/forums/p/25014/105531.aspx#105531"]this link[/URL]. | |
Re: [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] | |
Re: 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) … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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. | |
Re: 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 … | |
Re: 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 … | |
Re: 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 '// … | |
Re: 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) : … | |
Re: 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 = … | |
Re: 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 = … | |
Re: [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 … | |
Re: 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] | |
Re: Check out [URL="http://www.daniweb.com/forums/post1443692.html#post1443692"]this thread[/URL] for "a simple If statement around it". | |
Re: 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) … | |
Re: 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 … | |
Re: [CODE] FileSize = CInt(GetSize(MyFile)).ToString("#,###,###,###") & " KB"[/CODE] | |
Re: 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] | |
Re: 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 … | |
Re: See if this helps. [CODE]Me.TextBox1.Text = CInt(myDR.GetValue(0) + 1).ToString("10000")[/CODE] | |
Re: 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. | |
Re: 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. | |
Re: 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. … | |
Re: See if this helps. [CODE] newtab.Controls.Add(newctrl) '// add control to new tab. TabControl1.Controls.Add(newtab) '// add tab to TabControl.[/CODE] | |
Re: [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 … | |
Re: 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 … | |
Re: 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. | |
Re: 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]. | |
Re: 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 … |
The End.