725 Posted Topics

Member Avatar for josephbeluan

See if this helps. [B]1 PictureBox, 2 Buttons[/B] [CODE] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click PictureBox1.Top += 5 PictureBox1.Left += 5 End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click PictureBox1.Top -= 5 PictureBox1.Left -= 5 End Sub[/CODE]

Member Avatar for Jx_Man
0
99
Member Avatar for m1234ike

See if this helps. [CODE] Dim myPath As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) & "\Text" If Not IO.Directory.Exists(myPath) Then IO.Directory.CreateDirectory(myPath) '// create if it does not exist. For Each foundFile As String In My.Computer.FileSystem.GetFiles _ (My.Computer.FileSystem.SpecialDirectories.MyDocuments, _ FileIO.SearchOption.SearchTopLevelOnly, "*.txt") My.Computer.FileSystem.MoveFile(foundFile, myPath & "/" & IO.Path.GetFileName(foundFile)) Next[/CODE] The issue was that you are …

Member Avatar for codeorder
0
630
Member Avatar for kazekagerandy

See if this helps to draw on a PictureBox image and save the edited image. [B]1 PictureBox, 2 Buttons, 1 ComboBox[/B] [CODE]Public Class Form1 Private myOriginalImage As String = "C:\test.png" '// Original Image File. Private myEditedImage As String = "C:\test_EDITED.png" '// Image File to Save the Edited Image. Private myGraphics …

Member Avatar for kazekagerandy
0
3K
Member Avatar for billly

Check out [URL="http://www.daniweb.com/forums/post1421176.html#post1421176"]this thread[/URL] about "UserProfile". You can also use this to get a user's Desktop directory. [CODE] Dim sCoolDesktopDirectory As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) MsgBox(sCoolDesktopDirectory)[/CODE]

Member Avatar for sandeepparekh9
0
172
Member Avatar for bLuEmEzzy
Member Avatar for bLuEmEzzy
0
161
Member Avatar for spydanger

Check out [URL="http://www.daniweb.com/forums/thread324039.html"]this thread[/URL] about using SendKeys. To pause in between the SendKeys, you can use: [CODE]Threading.Thread.Sleep(1000) '// 1000 is a second.[/CODE]

Member Avatar for spydanger
0
2K
Member Avatar for xxxferraxxx

See if [URL="http://www.daniweb.com/forums/post1467540.html#post1467540"]this thread[/URL] helps for generating alphanumeric IDs, which can also be used to generate User Names and Passwords.

Member Avatar for xxxferraxxx
0
209
Member Avatar for JD69
Member Avatar for JD69

Seems that it is not your vb.net code, but your HTML. Try it with this HTML Button. [CODE=html]<input type="submit" onclick="javascript:alert('test');" value="Login" name="Login">[/CODE] I do believe that your [ICODE]onclick[/ICODE] for the button should be [ICODE]"onclick="fnbValidateLogin();"[/ICODE].

Member Avatar for codeorder
0
261
Member Avatar for Joshua Kidd

Use the _TextChanged Event of the TextBox. [CODE] Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged With TextBox1 '// shorten typing. If .Text = "!Help" Then '// to not make it case sensitive, use ( If .Text = "!Help".ToLower Then ). .Text = "Software by (whoever) …

Member Avatar for Joshua Kidd
0
79
Member Avatar for vbnetworker

See if this helps. [CODE] For Each line As String In TextBox1.Lines '// loop thru all lines in TextBox. If Not line = "" And line.Contains("-") Then '.. check if line is not empty and it .Contains "-". With line.Split("-") '// shorten code a little by using the "With" statement. …

Member Avatar for vbnetworker
0
169
Member Avatar for bLuEmEzzy

See if this helps. [CODE] For Each itm As ListViewItem In ListView1.Items If itm.Checked Then MsgBox("item checked: " & itm.Text) Else MsgBox("item NOT checked: " & itm.Text) End If Next[/CODE]

Member Avatar for codeorder
0
3K
Member Avatar for olegb

See if this helps. [CODE]Public Class Form1 Private cls As New myCoolClass '// get access to your Class. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click cls.myTimer.Enabled = Not cls.myTimer.Enabled '// toggle timer on/off. End Sub End Class Public Class myCoolClass '// WithEvents, to get the …

Member Avatar for olegb
0
990
Member Avatar for get connected

A bit confusing to understand. Are you trying to change the value of a String that has been already preset?

Member Avatar for codeorder
0
147
Member Avatar for discovery-power
Member Avatar for RenanLazarotto

For drag and drop, check out [URL="http://www.daniweb.com/forums/post1313057.html#post1313057"]this thread[/URL]. About "wiping" a file from the disk, do you want to just delete the file or shred the file a few times, then delete?

Member Avatar for RenanLazarotto
0
573
Member Avatar for shredder2794

As for adding a WebBrowser to the Form, check out [URL="http://www.daniweb.com/forums/post586897.html#post586897"]this thread[/URL].

Member Avatar for codeorder
0
100
Member Avatar for Heartis24K

See if this helps. [B]2 TextBoxes, 1 Label[/B] [CODE]Public Class Form1 Private iTeam1Total As Integer = 0 '// Declaration. '// Use the _TextChanged Event. Can add all TextBoxes that are for the same team, as the commented TextBox3.TextChanged. Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) _ Handles …

Member Avatar for codeorder
0
119
Member Avatar for simpleonline123

Do you happen to have a link to the website you are trying to programatically register to? ..The link and overlooking the HTML Source code of the site should help out quite a bit with your issue.

Member Avatar for codeorder
0
117
Member Avatar for RenanLazarotto

See if this helps. [CODE]Public Class Form1 Private myOFD As New OpenFileDialog Private Sub txt_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.Click, TextBox2.Click, TextBox3.Click If myOFD.ShowDialog = DialogResult.OK Then CType(sender, TextBox).Text = myOFD.FileName End If End Sub End Class[/CODE]

Member Avatar for RenanLazarotto
0
4K
Member Avatar for get connected

[B]If[/B] your Public [B]declaration [/B]is [B]on Form1[/B], then [B]call it[/B] like: [ICODE][B]Form1.MyPath[/B][/ICODE] from any other Form. Also, always set a Declaration Type when declaring something. In this case, "String" = Type. [CODE]Public MyPath As String = "C:\" [/CODE]

Member Avatar for get connected
0
100
Member Avatar for 8mir

See if this helps. [B]2 Buttons (Button1, Button2), 1 ProgressBar[/B] [CODE]Public Class Form1 '// Url for Paint.NET Download. ( http://www.getpaint.net/ ) Private myURL As String = "http://www.dotpdn.com/files/Paint.NET.3.5.6.Install.zip" '// File Location Saved to Desktop with the Original File Name and Extension. Private myFile As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) & myURL.Substring(myURL.LastIndexOf("/")) '// WebClient …

Member Avatar for 8mir
0
1K
Member Avatar for dipopo

See if this helps. [CODE]Public Class Form1 Private myCoolFile As String = "C:\test.txt" '// your File. Make sure there is NO Previous "C:\test.txt" File. Private arlUrlList As New ArrayList '// ArrayList to add your Urls. Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing '// Add some …

Member Avatar for codeorder
0
255
Member Avatar for JD69

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 WebBrowser1.Navigate("http://google.com") End Sub Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted AddHandler WebBrowser1.Document.Click, AddressOf getClickedElement '// Add .Click Event. End Sub Private Sub getClickedElement(ByVal sender As Object, …

Member Avatar for codeorder
0
186
Member Avatar for emily1989

Another approach. [CODE]Public Class Form1 Private myCoolClass As New testClass Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click myCoolClass.retrieveRec(Button1) End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click myCoolClass.retrieveRec(Button2) End Sub End Class Public Class testClass Public Sub retrieveRec(ByVal myCoolSelectedButton As …

Member Avatar for Ranx
0
424
Member Avatar for kipslem

See if this helps. [B]2 TextBoxes (txtUserName and txtPassword), 1 Button(Button1)[/B] [CODE]Public Class Form1 Private myCoolUserName As String = "codeorder" Private myCoolPassword As String = ".net" Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Not txtUserName.Text = myCoolUserName Then '// check if User Name is …

Member Avatar for codeorder
0
226
Member Avatar for lance7tour

Since vbScript is quite similar to vb.net, I decide to give it a try. My [URL="http://notepad-plus-plus.org/"]Notepad++[/URL] is nothing like the vb.net code editor :D, but it does quite nicely. See if this helps as my first attempt at VbScript. [CODE]Select Case LCase(Answer)'// to Lower Case, not to be Case Sensitive. …

Member Avatar for codeorder
0
653
Member Avatar for johmolan

Double click your TextBox1 and you will get the "[B]TextBox1_TextChanged[/B]" Event. This Event can also be located at the very top of the code window in the right ComboBox once your TextBox1 is selected in the left ComboBox. View attached image. Try this in a New Project with [B]1 TextBox …

Member Avatar for codeorder
0
126
Member Avatar for Luffy

Check out [URL="http://www.daniweb.com/forums/post1387744.html#post1387744"]this link[/URL].

Member Avatar for chetanbasuray
0
96
Member Avatar for RenanLazarotto

Also, check out [URL="http://www.daniweb.com/forums/post1401427.html#post1401427"]this link[/URL] for a more defined explanation to using "Command Line Arguments".

Member Avatar for anoopkh
0
1K
Member Avatar for airesh

See if this helps. [CODE] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If ComboBox1.Text = Nothing OrElse ComboBox2.Text = Nothing Then Exit Sub Label1.Text = CInt(ComboBox1.Text) + CInt(ComboBox2.Text) '// CInt = Convert to Integer, since .Text is considered a String. End Sub[/CODE]

Member Avatar for airesh
0
178
Member Avatar for Korenai

Why not [B]subtract the Value[/B] of your ListView2.SubItem just[B] before you remove[/B] your ListView2.Item?

Member Avatar for codeorder
0
105
Member Avatar for airesh

Check out your other thread. [URL="http://www.daniweb.com/forums/post1457647.html#post1457647"]http://www.daniweb.com/forums/post1457647.html#post1457647[/URL] Please do not double post. Refresh the thread if needed by replying to it. Thanks.

Member Avatar for codeorder
0
45
Member Avatar for MaddTechwf

Also, check out [URL="http://www.daniweb.com/forums/post1401427.html#post1401427"]this link[/URL].

Member Avatar for codeorder
0
82
Member Avatar for kruxena

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 For Each ctl As Control In Me.Controls '// Loop thru all controls. If TypeOf ctl Is TextBox Then '// Locate TextBoxes. AddHandler ctl.KeyPress, AddressOf txt_KeyPress '// Associate the KeyPress Event with …

Member Avatar for codeorder
0
21K
Member Avatar for senti.arasu

See if this helps about drawing a border around a Label. [CODE] Dim myCoolPenstyle As New Pen(Color.Red, 2) '// (color, pen width.) With Label1 '// draw just outside the Bounds of the Label. Me.CreateGraphics.DrawRectangle(myCoolPenstyle, .Location.X - 1, .Location.Y - 1, .Width + 2, .Height + 2) End With[/CODE]

Member Avatar for codeorder
0
83
Member Avatar for RenanLazarotto

[QUOTE=RenanLazarotto]yeH syug! woH nac I trevni ro( esrever, revetahw) a gnirts, tub gnisrever hcae drow? ekiL: sihT si a gnirts. tuptuO: This is a string. dna ton: string. a is This oslA, woh nac I od ti ot a eritne elif? sknahT ni ecnavda! [/QUOTE] teL em wonk fi siht …

Member Avatar for codeorder
0
2K
Member Avatar for RenanLazarotto

See if this helps for the TrackBar. [B]1 MenuStrip(MenuStrip1)[/B] [CODE]Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim myTrackBar As New TrackBar '// Declare New TrackBar. myTrackBar.Minimum = 12 : myTrackBar.Maximum = 25 '// Customize. AddHandler myTrackBar.Scroll, AddressOf TrackBar_Scroll '// Give it a …

Member Avatar for RenanLazarotto
0
541
Member Avatar for kruxena

[CODE] For x As Integer = 1 To CInt(UserInputTextbox.Text) For Each ctl As Control In Me.Controls '// Loop thru all Controls on Form. If TypeOf (ctl) Is Panel Then '// Locate Panels. If ctl.Name = "P" & x.ToString Then ctl.Enabled = True Exit For End If End If Next Next[/CODE]

Member Avatar for kruxena
0
303
Member Avatar for ayarton

See if this helps. [CODE] OpenFD.Multiselect = True '// Allow Multiple File Selections. If OpenFD.ShowDialog = DialogResult.OK Then For Each selFile As String In OpenFD.FileNames MsgBox(selFile) '// Show FullPath of File. Next End If[/CODE]

Member Avatar for codeorder
0
2K
Member Avatar for RenanLazarotto

See if this helps. [CODE] Dim fontName As FontFamily = TextBox1.Font.FontFamily '// Get the Current Font Name used. TextBox1.Font = New Font(fontName, TrackBar1.Value) '// Set Font Name and Size.[/CODE]

Member Avatar for RenanLazarotto
0
10K
Member Avatar for samm22

[CODE] '// 1 tabcontrol, 3 textboxes on tabpage 2 '// TabPages is index based, 0 = tabpage1, 1 = tabpage2, etc. MsgBox(TabControl1.TabPages(1).Controls(2).Text) '// will get the first added textbox's text . '//changing 2 to 0 will get the last control added to the tabpage.[/CODE]

Member Avatar for codeorder
0
135
Member Avatar for JD69

[CODE]Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Form2.TextBox1.Text = TextBox1.Text Form2.Show() End Sub End Class[/CODE]

Member Avatar for Luc001
0
93
Member Avatar for billly
Re: help

[CODE] Dim myCoolOpenFileDialog As New OpenFileDialog If myCoolOpenFileDialog.ShowDialog = DialogResult.OK Then '// Load File from Full Path. MsgBox(myCoolOpenFileDialog.FileName) End If[/CODE]

Member Avatar for codeorder
-1
111
Member Avatar for blondie.simon

See if this helps. [CODE]'//----- Pre-requisites: 3 Buttons, and a TON of CheckBoxes. ----------\\ Public Class Form1 Private arCB() As String = Nothing '// string Array to store the CheckBoxes Names and CheckStates. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Button1.Text = "save" Button2.Text = …

Member Avatar for blondie.simon
0
215
Member Avatar for afaque01

See if this helps. [B]New Project, 3 PictureBoxes.[/B] [CODE]Public Class Form1 '// renamed from "PictureBox1_Click". Private Sub myCoolPictureBoxes_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _ Handles PictureBox1.Click, PictureBox2.Click, PictureBox3.Click Dim pb As PictureBox = CType(sender, PictureBox) '// get Active PictureBox. myImageViewer(pb.Image) '// Call Sub and send the Active PictureBox's …

Member Avatar for afaque01
0
183
Member Avatar for Xcelled194

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 WebBrowser1.Navigate("http://google.com/") End Sub Private Sub WebBrowser1_Navigated(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserNavigatedEventArgs) Handles WebBrowser1.Navigated If WebBrowser1.Url.AbsoluteUri = "http://www.google.com/" Then WebBrowser1.Navigate(WebBrowser1.Url.AbsoluteUri & "?pass=123456") End If Me.Text = WebBrowser1.Url.AbsoluteUri End Sub End …

Member Avatar for Xcelled194
0
306
Member Avatar for mike42intn

Check out [URL="http://www.vbdotnetforums.com/localization-i18n-internationalization/14592-formatting-string-currency.html"]this link[/URL] about formatting to currency. Overlooking your code, I would set both, the EmplyeeType and RegularPay in the same hit. [CODE] If RadioButton1.Checked = True Then strEmployeeType = strTrainee : intRegularPay = 10 ElseIf RadioButton2.Checked = True Then strEmployeeType = strRegular : intRegularPay = 15 ElseIf RadioButton3.Checked …

Member Avatar for codeorder
0
165
Member Avatar for RSDev

Let me know if this helps. [B]New Project, 1 WebBrowser.[/B] [CODE]Public Class Form1 Private sVisitedURL As String = "" '// keeps track of Visited webpage, to not Reload. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load WebBrowser1.ScriptErrorsSuppressed = True '// since it will throw a few …

Member Avatar for codeorder
0
214
Member Avatar for get connected

See if this helps. [B]New Project, 2 Forms ( 1 Button(on Form1), 1 Button (on Form2)).[/B] [CODE]Imports System.Reflection Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim myAssembly As Assembly = Assembly.GetExecutingAssembly() For Each myType As Type In myAssembly.GetTypes() If myType.Name = "Form2" …

Member Avatar for codeorder
0
119

The End.