725 Posted Topics

Member Avatar for get connected

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 …

Member Avatar for get connected
0
156
Member Avatar for DoctorGiraffe

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 …

Member Avatar for codeorder
0
990
Member Avatar for Commando123

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 …

Member Avatar for Commando123
0
110
Member Avatar for JD69
Member Avatar for codeorder
0
122
Member Avatar for luciahlocsin

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 …

Member Avatar for codeorder
0
206
Member Avatar for piyushseven

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 …

Member Avatar for nytro
0
10K
Member Avatar for DoctorGiraffe

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 …

Member Avatar for DoctorGiraffe
0
632
Member Avatar for deconstruction

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

Member Avatar for deconstruction
0
154
Member Avatar for horserider

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.

Member Avatar for codeorder
0
127
Member Avatar for Viperino

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.

Member Avatar for Viperino
0
4K
Member Avatar for drogers76

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 …

Member Avatar for codeorder
0
323
Member Avatar for codeorder

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

Member Avatar for codeorder
0
819
Member Avatar for RenanLazarotto

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 …

Member Avatar for RenanLazarotto
0
132
Member Avatar for Viperino

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 …

Member Avatar for Viperino
0
432
Member Avatar for a1a4a

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]

Member Avatar for codeorder
0
394
Member Avatar for RenanLazarotto

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

Member Avatar for RenanLazarotto
0
213
Member Avatar for Riga

See if this helps. [CODE] Dim rnd As New Random MsgBox(question(rnd.Next(0, question.Length)))[/CODE]

Member Avatar for codeorder
0
129
Member Avatar for Mike Bishop

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

Member Avatar for codeorder
0
155
Member Avatar for Noorul Ariff

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

Member Avatar for codeorder
0
569
Member Avatar for Noorul Ariff

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.

Member Avatar for Noorul Ariff
0
385
Member Avatar for FrodoBaggins

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]

Member Avatar for Mariandi
0
115
Member Avatar for dorothy.v

[QUOTE=dorothy.v;1363779]how to limit nos. using button for inputting? VB.NET[/QUOTE] [B]nos.[/B], like in race cars ???

Member Avatar for jlego
0
78
Member Avatar for jlego

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 …

Member Avatar for jlego
0
404
Member Avatar for nore

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

Member Avatar for nore
0
350
Member Avatar for jcb0806

See if this helps. [URL="http://www.devguru.com/technologies/vbscript/quickref/round.html"]http://www.devguru.com/technologies/vbscript/quickref/round.html[/URL]

Member Avatar for jcb0806
0
212
Member Avatar for cirno
Member Avatar for navachaitanya

See if this helps for Form TextBox. [CODE] If IsNumeric(TextBox1.Text) Then TextBox1.Text += 1 End If[/CODE]

Member Avatar for codeorder
0
112
Member Avatar for dre-logics

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]

Member Avatar for codeorder
0
201
Member Avatar for perryg30313

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 …

Member Avatar for perryg30313
0
280
Member Avatar for CharliePrynn

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 …

Member Avatar for codeorder
0
90
Member Avatar for Dr.Cooper

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]

Member Avatar for ANXIOUS117
0
183
Member Avatar for tusharbhatia

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]

Member Avatar for jlego
0
453
Member Avatar for jlego

Unless you plan to reuse your "id" Integer from multiple Forms, [B]method #2[/B] is probably the best way to go about it.

Member Avatar for jlego
0
112
Member Avatar for vbprogrammer1

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]

Member Avatar for vbprogrammer1
0
139
Member Avatar for piratesocrates

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 …

Member Avatar for piratesocrates
0
10K
Member Avatar for unika010690

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

Member Avatar for codeorder
0
6K
Member Avatar for hassan_wah

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]

Member Avatar for Luc001
0
178
Member Avatar for laks_samy

See if [URL="http://www.daniweb.com/forums/thread326179.html"]this[/URL] helps.

Member Avatar for Luc001
0
230
Member Avatar for RenanLazarotto

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 …

Member Avatar for RenanLazarotto
0
772
Member Avatar for BonezAphex

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.

Member Avatar for codeorder
0
97
Member Avatar for jlego

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

Member Avatar for jlego
0
171
Member Avatar for WHchaz1027

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

Member Avatar for kvprajapati
-3
226
Member Avatar for TechSupportGeek

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

Member Avatar for TechSupportGeek
0
238
Member Avatar for tcon
Member Avatar for Luc001
0
2K
Member Avatar for SaaDwTk

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 …

Member Avatar for thomas49th
0
189
Member Avatar for tariqi

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

Member Avatar for tariqi
0
590
Member Avatar for kberrianjr

Check out this thread. [URL="http://www.daniweb.com/forums/post1337225.html#post1337225"]Save/Load Listview Items + Subitems[/URL]

Member Avatar for Unhnd_Exception
0
992
Member Avatar for Xcelled194

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 …

Member Avatar for Xcelled194
0
265
Member Avatar for yongj

Add a Panel to your Form, set "AutoScroll" in Panel's Properties to "True" and place your Label inside the Panel.

Member Avatar for Netcode
0
383
Member Avatar for juan92

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 …

Member Avatar for codeorder
0
186

The End.