725 Posted Topics
Re: If you're trying to do a 30 day trial version, save the # from [B]Mitja Bonca[/B]'s post to a file and load the # back each time the app loads. I think that using the registry to save/load your trial #'s is a little more secure than a basic file, … | |
Re: use a [iCODE]Static [/iCODE]inside your Sub. [CODE] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click, Button2.Click, Button3.Click Static btnName As String = "" '// stores .Name of btn. With CType(sender, Button) If btnName = "" Then MsgBox(.Name) Else MsgBox("previous btn: " & btnName) btnName = .Name … | |
Re: [B]skilly[/B], .i left a few times also.:) | |
Re: Use the FormClosing event. [CODE] Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing '// save code here. End Sub[/CODE] | |
![]() | Re: .[B]line.14[/B], include those values in parentheses: [iCODE]"Total pay: " & (txtHoursWorked.Text * lstHourlyRate.SelectedItem + txtHoursOvertime.Text * DoubleRate))[/iCODE] and it should work. |
Re: Set the "[B]Shutdown mode:[/B]" in fileMenu/Project/your app's Properties, Application tab To [B]"When last form closes"[/B]. | |
Re: "_GotFocus" and other events are in the "_GotFocus". [CODE] Private Sub _TextBox1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.GotFocus, TextBox2.GotFocus '// TextBoxEtc.GotFocus With CType(sender, TextBox) If .Text.Length > 0 Then .SelectAll() End With End Sub[/CODE] | |
Re: >>in the property in the option MRL i gave the video address which should be played Seems that the url for the Files are not located in the same directory as the user's.directory. .ex: [iCODE]If your directories are "C:/some folder on my vb.net p.c./" Then If your user's directories are … | |
Re: Also, 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 ListBox1.Items.AddRange(New String() {"1", "f1", "f2"}) End Sub Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged Static selCoolItem As String '// stores the .SelectedItem to verify against … | |
Re: Secondary issue, see if this helps. [CODE] For i As Integer = 0 To picBoxes.Length - 1 With picBoxes(i) .pictureBox = CType(Me.Controls("PictureBox" & i + 1), PictureBox) .cover = My.Resources.ImperialLogo .pictureBox.Image = .cover End With Next[/CODE] [B]edit::[/B] To make it easier on you the next time you need to add … | |
Re: You should also check out this website, especially if vb.noob. [URL="http://www.homeandlearn.co.uk/NET/vbNet.html"]http://www.homeandlearn.co.uk/NET/vbNet.html[/URL] | |
Re: Are you just trying to get the value from the .SelectedItem in the ListBox? .reason asking: you already have the .SelectedIndex. | |
Re: Just taking a wild guess here; I think that this might be the cause of the issue. [CODE] While WebBrowser1.ReadyState <> WebBrowserReadyState.Complete Application.DoEvents() End While[/CODE] Try commenting out the [iCODE]Application.DoEvents()[/iCODE] and report back. The [iCODE]WebBrowser1.ScriptErrorsSuppressed = True[/iCODE] can be set "only once" in [iCODE]Form1_Load[/iCODE] and it will take care of … | |
Re: Use [URL="http://www.daniweb.com/software-development/vbnet/threads/409298/1746870#post1746870"]this[/URL] to get html.content. And extract data you need with this. [CODE] Dim sHtmlContent = "READ THE 3 CHARACTERS AFTER ""abc""... << this is the part im struggling at" Dim sToFind As String = "abc" With sHtmlContent If .Contains(sToFind) Then sHtmlContent = .Substring(.IndexOf(sToFind) + sToFind.Length) ' sHtmlContent = .Substring(.IndexOf(sToFind) … | |
Re: Just wondering; do the lines have to be in the Button's.Click event or can they be in separate Subs?as: [CODE] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click someCoolSub() someOtherCoolSub() End Sub Private Sub someCoolSub() MsgBox("someCoolSub") End Sub Private Sub someOtherCoolSub() MsgBox("someOtherCoolSub") End Sub[/CODE] Reason I'm … | |
Re: Where are you getting the images from? Another Folder? A web.page? And how? | |
Re: I would try to skip the entire Try/Catch on this issue and check if a numeric value. [CODE] If IsNumeric(txtPrice.Text) Then '// do stuff here Else MsgBox("Not a number") End If[/CODE] Just my 2.cents worth. | |
Re: Not related to the solved thread, though I hope it helps to minimize less lines of code. [CODE] For Each grp In New GroupBox() {GroupBox1, GroupBox2, GroupBox3, GroupBox4} For Each ctl As Control In grp.Controls If TypeOf (ctl) Is TextBox Then AddHandler ctl.TextChanged, AddressOf Text_Changed End If Next Next[/CODE] Btw, … | |
Re: Assuming that you are using the vb.net webbrowser, read on. If this is for a login to a website, [B]the link should have an Id[/B]. For example, using the following html page to navigate to, [CODE]<html><head><title>Untitled Page</title></head> <body> <a href="http://www.daniweb.com" id="myLink">to be clicked link</a> </body> </html>[/CODE] and using the following … | |
Re: Could be that some servers do Not allow files to be uploaded If greater in size than 4MB. Check w/your web.host provider. | |
Re: 1.Add a DateTimePicker. 2.Add some TextBoxes(NumericUpDowns might work better) for your Hour/Minutes/Seconds and a ComboBox for AM/PM. 3.Save the Date and Time to a File. 4.Add a Timer that .Ticks every second. 5.Check if File content ='s Today's Date and Time and alert user. I would load file content when … | |
Re: >>if some are empty it wont work What exactly are these "some"? | |
Re: >>"Separate in different DLL " It seems to me that you should create DLL's from the Modules and Classes and use the DLL's to run your app from. I have not worked with DLL's in projects, created a few samples, though I do believe that you add them as a … | |
Re: Not a database coder here, though could you not remove [ICODE]InvNomer,[/ICODE] from [ICODE]sSql = "SELECT FullName ,InvNomer, BalanceDue From Invoice"[/ICODE] and have it as [ICODE]sSql = "SELECT FullName , BalanceDue From Invoice"[/ICODE]? | |
Re: I used a DGV with 3 columns for this, hope it helps. [CODE] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click setHighLightsForConflicts(DataGridView1) End Sub Sub setHighLightsForConflicts(ByVal selDGV As DataGridView) With selDGV Dim s1, s2 As String, chrMain As Char : s1 = "" : s2 = … | |
Re: I d/l'ed the project and got the "Black Ops" issue taken care of. .The issues laid inside the [iCODE]Private Sub KillStreaks()[/iCODE](located it by commenting out lines for each called Sub) and I am not exactly certain as to why it froze, though I froze also when I took a look … | |
Re: See if this helps. [CODE]'//------- Pre-requisites: 1 Button, 1 TextBox named "phonenumbertxtbox". -------\\ Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click With phonenumbertxtbox If Not .Text = Nothing Then '// check if not empty. If .Text.Length > 0 AndAlso .Text.Substring(0, 1) = "(" … | |
Re: Not quite clear on your question. Are you using the KeyUp/KeyDown Events for the ListView or are you referring to the Up/Down arrow keys on your keyboard? | |
Re: >>i'm trying to do is define a two-dimentional array with the 2nd dimention as an undefined. See if this helps regarding the 2D Array. [CODE]Public Class Form1 Private x(6, 0) As String Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load x(0, 0) = "test" MsgBox(x(0, 0)) … | |
Re: See if this helps. [CODE] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click For Each txt In New TextBox() {TextBox1, TextBox2, TextBox3} '// your TextBoxes. If txt.Text = "" Then Exit Sub '// skip remain code in Sub. Next Button2.Enabled = True '// enable if all … | |
Having a bit of an issue with my file.scanner and that issue is that I cannot figure out how to run multi.threading when searching the files within a folder(8,000+ files). [CODE]Imports System.IO Module x Function xGetFolderFilesCount(ByVal selFolder As String) As Integer If Directory.Exists(selFolder) Then Return Directory.GetFiles(selFolder).Length Else Return 0 End … | |
Re: As a Daniweb.com vb.net detective:D, I assigned myself to this case. In order for me to fully understand the concept behind the strategy of creating a vb.net Connect 4 game, I had to start from the ground up and got some decent results.([iCODE]view attached image[/iCODE]) Also attached, are the 2 … | |
Re: See if [URL="http://www.daniweb.com/software-development/vbnet/threads/411631/1757177#post1757177"]this [/URL]helps, since it loads the xml.nodes into a list and loops thru them. | |
Re: See if this helps. [CODE]Public Class Form1 Private arlTemp As New ArrayList Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click With ListBox1 arlTemp.AddRange(.Items) '// store all lb.items. With .Items .Clear() '// clear lb.items for new input. For i As Integer = 0 To arlTemp.Count - 1 … | |
Re: [CODE]Public Class Form1 Private urlMain As String = "http://www.someurl.com/" Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load With WebBrowser1 .ScriptErrorsSuppressed = True .Navigate(urlMain & "solver.html") End With End Sub Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted With WebBrowser1 txt.Text = .Url.AbsoluteUri … | |
Re: See if this helps. [CODE] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click searchDGV(TextBox1.Text) End Sub Sub searchDGV(ByVal selSearch As String) With DataGridView1 Dim iTemp As Integer = 1 If .AllowUserToAddRows Then iTemp = 2 '// check if extra row or not, at bottom of dgv. … | |
Re: See if [URL="http://www.daniweb.com/software-development/vbnet/threads/312128/1335997#post1335997"]this.post[/URL] helps for other options. I personally prefer files to save/load to/from and in your case, I would save each ctl's.Text as a single line, load those lines into an Array and set values to each ctl.Text from there. | |
Re: This has Nothing to do with your question, though I hope it helps. [CODE] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click With TableLayoutPanel1 .ColumnCount = 7 : .RowCount = 2 : .CellBorderStyle = TableLayoutPanelCellBorderStyle.Single End With addLabel("Monday", 1) addLabel("Tuesday", 2) addLabel("Wednesday", 3) addLabel("Thursday", 4) addLabel("Friday", … | |
Re: Do you just need to add values on separate lines, as: [iCODE]txtCustomerRecord.text = "info1" & vbNewLine & "info2" & vbNewLine & "info3"[/iCODE]? .Or do you want to update a selected.line with a value? | |
Re: See if this helps. [B]New.Project, 3.Buttons, 3.Panels[/B](view attached image) [CODE]Public Class Form1 Private pnTemp As Panel, iSelPanel As Integer Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click pnTemp = Panel1 '// pnTemp, just easier to work w/. :) If pnTemp.Height = 0 Then expandPanel(pnTemp) Else collapsePanel(pnTemp) … | |
Re: Get Visual Basic 2010 Express and thank me later for it.:) | |
Re: Not a Function, though it gets the job done. [CODE]Public Class Form1 Private iT As Integer = Nothing '// TEMP.Integer to get # at end of TextBoxes. Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load setHandlersForCoolTextBoxes() End Sub Private Sub setHandlersForCoolTextBoxes() '///////////////////////////////////////////////////////////////// For Each txt As TextBox In … | |
Re: Main reason is your code order; and no, it's not me:D, it's your code. You have [iCODE]decSelection = Convert.ToDecimal(strSelection)[/iCODE] before your [iCODE]Select Case[/iCODE], Not after. | |
Re: Check out this [URL="http://www.daniweb.com/software-development/vbnet/code/353389/1508371#post1508371"]code.snippet[/URL], might help. | |
Re: .dgv(DataGridView) w/3 columns(to display row's values). [CODE] Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click verifyRows() End Sub Sub verifyRows() With DataGridView1 Dim iTemp As Integer = 0 If .AllowUserToAddRows Then iTemp = 2 Else iTemp = 1 '// check if extra row or not, at bottom of … | |
Re: >>...I have heard of a [iCODE]left mid and right[/iCODE] function. Does anybody know how to use these functions? I have heard that those are [B]vb6- Functions[/B] and you should try to move on from those; even though they are still available for the migrating.programmers from "basic?" to use .net, .net.Functions … | |
Re: See if this helps. [CODE] Private Sub ListView1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListView1.DoubleClick If Not ListView1.SelectedItems.Count = 0 Then '// check if item is selected. With ListView1.SelectedItems(0) Dim lvItem() As String = {.Text, .SubItems(1).Text, .SubItems(2).Text} '// get ListView selectedItem. DataGridView1.Rows.Add(lvItem) '// add it to DataGridView. End … | |
Re: I remember reading a while ago on [URL="http://www.w3.org/"]http://www.w3.org/[/URL], that for security reasons, you cannot add values to [iCODE]<input type="file"/>[/iCODE]. .If this were to be allowed, files could easily be uploaded from your p.c. without your knowledge. Best suggestion I can offer, is to click the "Browse" Button. [CODE] WebBrowser1.Document.GetElementById("the_file").InvokeMember("click")[/CODE] | |
Re: See if this helps. [CODE]Public Class Form1 Private myCoolUrl As String = "http://www.daniweb.com/" Private Function zCooLsub(selCoolParmeter As String) As String Return myCoolUrl & selCoolParmeter '// append Parameter to Url and Return it. End Function Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click Process.Start(zCooLsub("software-development/vbnet/58")) End Sub End Class[/CODE] | |
Re: See if this helps. [B]1.TextBox, 1.Button, 2.ListBoxes[/B] [CODE]Public Class Form1 Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load With ListBox1.Items '// FOR.TESTING .Add("http://www.daniweb.com/software-development/vbnet/threads/410236") .Add("http://www.daniweb.com/software-development/vbnet/threads/409298/1746870#post1746870") End With End Sub Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click If Not TextBox1.Text = "" Then With ListBox2.Items .Clear() For … |
The End.