725 Posted Topics
Re: See if this helps. [CODE]Public Class Form1 Private myImagesFolder As String = Nothing Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load myImagesFolder = "C:\TEMP\" '// your Folder Path. For RELREF As Integer = 1 To 30 '// Loop from 1 to 30. For Each pb As … | |
Re: I'm not quite clear on your question. ..Are you trying to login a website? ..Scroll to a section in the webpage that has been loaded in your vb.net WebBrowser? ..OR just extract the data from a certain section when an item is checked in your CheckedListBox? Btw, if you are … | |
Re: See if this helps. [CODE] '// If Button is on Form, use: For Each ctl As Control In Me.Controls If TypeOf (ctl) Is Button Then If ctl.Name = "Button" & l.Text Then ctl.Text = "blabla" End If End If Next '// If Button is in a Container, as in a … | |
Re: See if [URL="http://www.daniweb.com/forums/post1328780.html#post1328780"]this[/URL] helps. | |
Re: See if this helps. [B]1 Button, 1 Panel[/B] (for loading image(s)). [CODE]Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Panel1.AutoScroll = True '// Scrollbar(s) if needed. Button1.Text = "Load Images" : Button1.Width = 96 End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal … | |
Re: See if this helps. [B]Option 1.[/B] [CODE] Select Case MsgBox("Are you sure to DELETE?", MsgBoxStyle.Critical + MsgBoxStyle.YesNo, "WARNING") Case MsgBoxResult.Yes MsgBox("YES Clicked.") Case MsgBoxResult.No MsgBox("NO Clicked.") End Select[/CODE] [B]Option 2.[/B] [CODE] If MsgBox("Are you sure to DELETE?", MsgBoxStyle.Critical + MsgBoxStyle.YesNo, "WARNING") = MsgBoxResult.Yes Then MsgBox("YES Clicked.") Else MsgBox("NO Clicked.") End … | |
Re: If you just need to extract data from a webpage, see if this helps to extract the "Tags" from the "Tag Cloud" of this page. [B]New Project, 1 ListBox, 1 WebBrowser.[/B] [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.daniweb.com/forums/thread335473.html") End Sub Private … | |
Re: [CODE] Private Sub TextBox1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyUp If e.KeyCode = Keys.Return Then keyPressed() End If End Sub Sub keyPressed() MsgBox("Enter key Pressed.") End Sub[/CODE] | |
Re: I believe that is actually a [B][URL="http://msdn.microsoft.com/en-us/library/system.windows.forms.listview.listview.aspx"]ListView[/URL][/B]. ..Personally, I use [URL="http://www.piriform.com/"]CCleaner[/URL] as well. Could do better with the Registry, but not complaining. Great software. | |
Re: See if this helps. [CODE]MsgBox("Num Name HF" & vbNewLine & "1: something(11)" & vbNewLine & "2: somethingelse(22)" & vbNewLine & "3 andsomethingelse 33")[/CODE] Also, check out [URL="http://www.daniweb.com/forums/post1340694.html#post1340694"]this link[/URL] for a custom message box. | |
Re: Also, see if this helps. [CODE]Public Class Form1 Private myFile As String = "C:\test.txt" '// your File to Load/Edit if needed/Save. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If IO.File.Exists(myFile) Then '// check if File Exists. Dim arTemp() As String = IO.File.ReadAllLines(myFile) '// Load File … | |
[B]In this case, Form1 is the Main Form.[/B] Pre-requisites: [B]2 Forms (Form1 and Form2), 1 Button (on Form1)[/B]. [CODE]Public Class Form1 Function centerForm(ByVal Form_to_Center As Form, ByVal Form_Location As Point) As Point Dim pLocation As New Point pLocation.X = (Me.Left + (Me.Width - Form_to_Center.Width) / 2) '// set the X … | |
Re: If your INI File content is exactly as you have posted, see if this helps. [CODE]Public Class Form1 Private myFile As String = "C:\test.txt" '// your File. Private arlFileInfo As New ArrayList '// ArrayList to store Information for each Entry. Dim arTemp() As String = Nothing '// String Array to … | |
Re: See if this helps. [B]New Project and No previous Clients.txt File.[/B] [CODE]'//------ Pre-requisites: 4 TextBoxes (ID/Name/Address/Phone) '------------------------ 2 Buttons (Add Client/Clear Fields) '------------------------ 1 ComboBox (Load Client Information) -------\\ Public Class Form1 Private myClientsFile As String = "C:\Users\codeorder\Desktop\Clients.txt" '// your File to Load / Save. Private arlClients As New ArrayList … | |
Re: See if this helps. [CODE] '// Save Image as .txt File. PictureBox1.Image.Save("C:/test.txt", Imaging.ImageFormat.Png)[/CODE] [CODE]'// Load Image from .txt File. PictureBox1.Image = Image.FromFile("C:/test.txt")[/CODE] | |
Re: A [B]simple way[/B] is to "[B]use a TabControl[/B]". Try this in a [B]New Project[/B]. Add a [B]Panel[/B], place a [B]TabControl [/B]inside the Panel, possibly at .Location(0,0), and add [B]2 Buttons[/B] to the Form. [CODE]Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load TabControl1.Location = … | |
Re: See if this helps. [CODE] Dim rnd As New Random MsgBox(question(rnd.Next(0, question.Length)))[/CODE] | |
Re: See if this helps. [CODE]Public Class Form1 Private myCoolFile As String = "C:\test.txt" '// your file. Private myCoolFileLines() As String = Nothing '// String Array to read File Lines into. Private sTemp As String = Nothing '// temp String to be used as needed. Private Sub Form1_Load(ByVal sender As System.Object, … | |
Re: See if the following Start-Up Project helps. Paste in new Project as is. [CODE]Public Class Form1 '// create Original controls. Private cmbCODE1 As New ComboBox With {.Name = "cmbCODE1", .Location = New Point(0, 0), .Size = New Size(121, 21)} Private cmbCATEGORY1 As New ComboBox With {.Name = "cmbCATEGORY1", .Location = … | |
Re: Since this question is probably more ASP.NET related than it is VB.NET, [URL="http://www.daniweb.com/forums/forum18.html"]the ASP.NET forum[/URL] might help a little better. Although, if your website already has the current number of "users(REGISTERED) are LOGGED-IN CURRENTLY " and you just need to retrieve the information, see if [URL="http://www.daniweb.com/forums/thread317295.html"]this link[/URL] helps. | |
Re: See if this helps. [CODE]'//----- Pre-requisites: 4 TextBoxes. -------\\ Dim arTemp() As String = {"text 1", "text 2", "text 3", "text 4"}'// your Array. TextBox1.Text = arTemp(0) TextBox2.Text = arTemp(1) TextBox3.Text = arTemp(2) TextBox4.Text = arTemp(3)[/CODE] | |
Re: [QUOTE=dorothy.v;1363779]how to limit nos. using button for inputting? VB.NET[/QUOTE] [B]nos.[/B], like in race cars ??? | |
Re: See if this helps for populating a ListView from a .csv file. [CODE] '// file located here: http://seepeoplesoftware.com/downloads/older-versions/11-sample-csv-file-of-us-presidents.html Dim myCSVfile As String = "C:\USPresident Wikipedia URLs Thmbs HS.csv" '// read File into Arrays. Dim arFileLines() As String = IO.File.ReadAllLines(myCSVfile) '// read line 1 to get Columns. Dim arLineContent() As String … | |
Re: [CODE] Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress Select Case e.KeyChar Case "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", vbBack '// numeric and backspace. Exit Sub Case Else e.Handled = True End Select End Sub[/CODE] Should work. Using shortcut keys to Cut, … | |
Re: See if this helps. [URL="http://www.devguru.com/technologies/vbscript/quickref/round.html"]http://www.devguru.com/technologies/vbscript/quickref/round.html[/URL] | |
Re: [CODE] Dim dt As Date = "12/13/2010" MsgBox(Format(dt, "yyyy-MM-dd"))[/CODE] | |
Re: See if this helps for Form TextBox. [CODE] If IsNumeric(TextBox1.Text) Then TextBox1.Text += 1 End If[/CODE] | |
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 Asc(e.KeyChar) = 46 Then '// if "dot". e.Handled = True '// cancel out the key pressed. TextBox1.SelectedText = "- test -" '// replace the selection. End If End Sub[/CODE] | |
Re: I do not/have not coded any SQL server applications, so I am not certain if a problem could occur from SQL, but... The operating system you are trying to install your software to might not have the [B]appropriate .NET Framework installed as the .NET Framework you have designed your application … | |
Re: From what I know about HTML, you cannot click a <span> and have it return something unless it has a option like the "onclick" option. Example: [CODE=html]<style type="text/css"> span.default_message {color:SteelBlue;font-size:25px;cursor:pointer;} </style> <span onclick="location.href='http://www.daniweb.com'" class="default_message">Link to DaniWeb.com</span>[/CODE] Your HTML <span> code uses a CSS class value that sets that <span>'s formatting … | |
Re: Why use a "StreamReader" to "WRITE" to a File? Have you tried using a Stream"WRITER"? [CODE] Dim ioFile As New StreamWriter(myStream)'<---------------------------ERROR WAS HERE ioFile.Write(text) '<---------------------------AND HERE ioFile.Close()[/CODE] | |
Re: See if this helps. [CODE] For Each lvItem As ListViewItem In ListView1.Items If lvItem.Checked = True Then Dim newLvItem As New ListViewItem(lvItem.Text) '//-- if it contains subitems. --\\ 'newLvItem.SubItems.Add(lvItem.SubItems(1).Text) 'newLvItem.SubItems.Add(lvItem.SubItems(2).Text) ListView2.Items.Add(newLvItem) ListView1.Items.Remove(lvItem) End If Next[/CODE] | |
Re: Unless you plan to reuse your "id" Integer from multiple Forms, [B]method #2[/B] is probably the best way to go about it. | |
Re: Confusing to understand since both, the line with spaces and the line that should be read as, contain spaces.:D See if this helps otherwise. [CODE] Dim sTemp As String = "12 25.53 35" '// your String. sTemp = sTemp.Replace(" ", "") '// replace space with nothing. MsgBox(sTemp) '// display result.[/CODE] | |
Re: You can always add images to your Application's Resources. [B]..File Menu / Project / "your application's name" Properties. ....Resources Tab, top Button for "Add Resource", click Drop-Down arrow, select "Add Existing File...", and load your images.[/B] To access them, view the following code sample. This code is from me adding … | |
Re: [QUOTE=unika010690]the items in the listview should be display in the [B]textboxes [/B]in the other form whenever i click select data[/QUOTE] See if this helps. [CODE] Private Sub ListView2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListView2.Click If Not ListView2.SelectedItems.Count = 0 Then '// check if item is selected. With … | |
Re: In Form1, when calling Form2, remove "Me" from this line: Form2.Show(Me) Final result: [CODE] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Form2.Show() End Sub[/CODE] | |
Re: See if [URL="http://www.daniweb.com/forums/thread326179.html"]this[/URL] helps. | |
Re: Here is something for Arguments. In the application you want to load with Arguments, in Form_Load add similar code. [CODE] Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load For Each myCoolArg As String In My.Application.CommandLineArgs Select Case myCoolArg Case "bgSteelBlue" Me.BackColor = Color.SteelBlue Case "bgSpringGreen" Me.BackColor … | |
Re: The link you posted returns invalid. [B]Page Not Found[/B] Try posting the entire <html> source code of that web-page and specify if to use a WebBrowser to retrieve the information, or extract without a WebBrowser. | |
Re: Let's take the "other" programmer's example and see what results we get. [CODE]Dim stringSomething As String = "some string" stringSomething = "some other string" MsgBox(stringSomething)[/CODE] [B]Total characters: 109[/B] Now let's take "your" example. [CODE]Dim strSomething As String = "some string" strSomething = "some other string" MsgBox(strSomething)[/CODE] [B]Total characters: 100[/B] ... … | |
Re: I hope I'm in the proper Forum for posting the following solution. :icon_eek: [CODE] Dim myChars() As Char = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890" Dim idString As String = "" For idLength As Integer = 0 To 9 '// this will return a 10 character ID number. Dim i As Integer = Rnd() * … | |
Re: See if this helps. [CODE]'//----------- Pre-requisites: 3 Buttons, 1 RichTextBox. ---------------\\ Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Button1.Text = "New" Button2.Text = "Open" Button3.Text = "Save" : Button3.BackColor = Color.LightGreen RichTextBox1.Tag = "new" '// set .Tag to determine as New File. … | |
Re: [CODE] Dim myCoolTimeDate As String = Format(DateTime.Now, "hh:mm:ss tt MM/dd/yy") MsgBox(myCoolTimeDate)[/CODE] | |
Re: Since the pages you want to retrieve data from are in total of over 15 thousand, I would use [B]Net.HttpWebResponse[/B] to retrieve the innerHtml of a web-page instead of using a WebBrowser. This way you do not overload your Temporary Internet Files folder with Files that you have no use … | |
Re: See if this helps. [CODE] Dim startDate As Date = "10/09/10" '// preset Start Date. Dim endDate As Date = "10/25/10" '// preset End Date. Dim tempDate As Date = "10/23/10" '// Date that is currently being searched and compared to Start/End Dates. If tempDate > startDate And tempDate < … | |
Re: Check out this thread. [URL="http://www.daniweb.com/forums/post1337225.html#post1337225"]Save/Load Listview Items + Subitems[/URL] ![]() | |
Re: See if this helps. (code originated from [URL="http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/e8fad050-e0ae-4f7d-945c-0b7408321b91"]here[/URL]) [CODE]Public Class Form1 Private Declare Function GetDC Lib "user32" (ByVal hwnd As Integer) As Integer Private Declare Function InvalidateRect Lib "user32" (ByVal hwnd As IntPtr, ByVal lpRect As IntPtr, ByVal bErase As Boolean) As Boolean Private WithEvents myTimer As New Timer With … | |
Re: Add a Panel to your Form, set "AutoScroll" in Panel's Properties to "True" and place your Label inside the Panel. | |
Re: See if this helps for "the first part". [CODE]Public Class Form1 '/////////////////////////////-- array for 10 Integers. Dim x(9) As Integer '///Array for the numbers is order '////////////////////////// Dim y() As Integer '///array for the reversed numbers Dim z() As Integer '///array for the average Dim sr As IO.StreamReader Sub read(ByRef … |
The End.