725 Posted Topics

Member Avatar for nv136

[QUOTE=ÜnLoCo;1310867]hello you may use "settings" to store settings project properties> settings> valid Boolean user false then in the load event [CODE] If Not My.Settings.valid Then 'ask for the serial End If[/CODE][/QUOTE] Just simplifying the above quote. From the vb.net top Menu, click Project and select yourApplication Properties... Locate the Settings …

Member Avatar for nv136
0
537
Member Avatar for pmardle

[CODE] Dim myFile As String = "c:\EveOreData.csv" If IO.File.Exists(myFile) Then Dim readLines() As String = IO.File.ReadAllLines(myFile) TextBox1.Text = readLines(0) TextBox2.Text = readLines(1) TextBox3.Text = readLines(2) TextBox4.Text = readLines(3) TextBox5.Text = readLines(4) TextBox6.Text = readLines(5) TextBox7.Text = readLines(6) End If[/CODE]

Member Avatar for codeorder
0
230
Member Avatar for jlewis_cardsfan

[QUOTE=sean7725;1311838]How did you have your application wait until the page was done loading before continueing?[/QUOTE] [CODE] Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted End Sub[/CODE]

Member Avatar for codeorder
0
1K
Member Avatar for sumanpk

[QUOTE=sumanpk;1310550]HI, pleae can any one help me regarding the issue: I am trying to develop system where i can add run time some user control like button, textbox, checkbox . Thanks suman[/QUOTE] Adding controls without events, especially the ones mentioned, might be kind of pointless. Since there is already a …

Member Avatar for codeorder
0
111
Member Avatar for johmolan

If you are using the Try/Catch statement as the following code, [CODE] Try '// your code here that might cause the error. Catch ex As Exception MsgBox(ex.Message) '// display the default message, which in your case is probably the message your get. End Try[/CODE] you can easily modify the Message …

Member Avatar for codeorder
0
152
Member Avatar for ceal21c

Quite simple. Add a Panel to your Form, place all the controls you would like not to be accessed in it, and disable the Panel. After your code is done processing, set it back to Panel1.Enabled=True. If you disable the Form, you cannot access it, as to closing or moving …

Member Avatar for PsychoCoder
0
3K
Member Avatar for xfrolox

[CODE]Public Class Form1 Sub keepCentered() Dim x As Integer = CInt((Me.Left + (Me.Width - Form2.Width) / 2)) Dim y As Integer = CInt((Me.Top + (Me.Height - Form2.Height) / 2)) Form2.Location = New Point(x, y) End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Form2.Show() Form2.TopMost …

Member Avatar for xfrolox
0
217
Member Avatar for cocoll

[CODE] Private Sub ListView1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ListView1.MouseUp If ListView1.SelectedItems.Count > 0 Then MsgBox(ListView1.SelectedItems.Item(0).Index, MsgBoxStyle.Information) End If End Sub[/CODE]

Member Avatar for codeorder
0
143
Member Avatar for lukechris

[QUOTE=bwskurd;1297066]hae im trying to make a countdown timer can you tell me hoe to stop the time thanks Hawre Eliassi[/QUOTE] [CODE]Public Class Form1 Private myCounter As Integer = 60 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Timer1.Interval = 100 '// tick every 1/10th of a …

Member Avatar for codeorder
0
443
Member Avatar for cocoll

[CODE] Private mouse_Click As Integer = 0 '// keep track of clicks. Private Sub Button1_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) _ Handles Button1.MouseClick, Button2.MouseClick, ListBox1.MouseClick, TextBox1.MouseClick, TextBox2.MouseClick, _ TextBox3.MouseClick mouse_Click += 1 '// increase count by 1. Me.Text = mouse_Click End Sub[/CODE]

Member Avatar for codeorder
0
133
Member Avatar for Tweed

About displaying 2 message boxes, I somehow managed to put something together with setting a Boolean to True/False. [CODE] Private allowCheck As Boolean = True Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged Select Case CheckBox1.Checked Case True allowCheck = False If MessageBox.Show("Are you sure you …

Member Avatar for codeorder
0
607
Member Avatar for mustoora

[QUOTE=GeekByChoiCe;1299922]yeah good job bumping a 3!!! years old thread....[/QUOTE] :D I guess it is better to try and solve those threads, than to leave them unsolved and have them return empty from a search engine. Plus, replying to posts seems to help out with educating one self in vb.net. Well, …

Member Avatar for codeorder
-4
140
Member Avatar for aquarian

If you follow the Example from the following link, [URL="http://en.wikipedia.org/wiki/Apriori_algorithm"]http://en.wikipedia.org/wiki/Apriori_algorithm[/URL] you should be able to figure out the algorithm yourselves.

Member Avatar for codeorder
0
251
Member Avatar for Orphæus

If you Append text to a File for each week worked, and save each day's date, hour logged in, hour logged out, and the total hours worked for the day in one line, you should easily access the information and get a sum total for the week. Here is an …

Member Avatar for codeorder
0
120
Member Avatar for xfrolox

You should be able to use the _MouseDown and _MouseUp events to trigger to outlook of the image. [CODE]Public Class Form1 Private imgX As Image = Image.FromFile("C:\!vb.net\images\x.png") Private imgXclicked As Image = Image.FromFile("C:\!vb.net\images\x_clicked.png") Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Button1.BackgroundImageLayout = ImageLayout.Stretch Button1.Image = …

Member Avatar for codeorder
0
97
Member Avatar for Marc.Gauthier9

The following solution should help. First, locate the Textbox on each Tab that you would like to have selected when changing Tabs, and add a "[B]_X[/B]" to the end of the Textbox's Name. For example, Textbox1 would now be named Textbox1_X. [CODE] Private Sub TabControl1_SelectedIndexChanged(ByVal sender As Object, ByVal e …

Member Avatar for codeorder
0
470
Member Avatar for Denxerator

[QUOTE=Denxerator;1299669]Is there such a code...[/QUOTE] Of course.:) [CODE] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim txt As New TextBox With {.Multiline = True, .ScrollBars = ScrollBars.Vertical, .Dock = DockStyle.Fill} Dim newForm As New Form newForm.Controls.Add(txt) Dim myFile As String = "C:\!vb.net\temp.txt" '// change this …

Member Avatar for codeorder
0
2K
Member Avatar for TrueVb.NetNoob

Just adding my 2 cents worth. In the File Menu, Project/Properties, Application Tab, you can locate the Shutdown Mode: Options which allow you to Shutdown the application "When startup form closes" or "When last form closes". Selecting when last form closes, always show the other form first, then close the …

Member Avatar for codeorder
0
590
Member Avatar for QB_Pete

Depending on the .NET Framework you designed your application with, if it is designed in vb.net, then as [B]deepdotnet [/B]mentioned, you will need the .NET Framework installed on the foreign computer. View the following links for the 2.0 and 1.1 .NET Frameworks. [URL="http://www.microsoft.com/downloads/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5&displaylang=en"]Microsoft .NET Framework Version 2.0 Redistributable Package (x86)[/URL] …

Member Avatar for codeorder
0
1K
Member Avatar for jithumathew

I can spot one error. Placing.. [CODE]Dim check As Integer[/CODE] in the same event as the rest of the code posted, you will always get a [CODE]MsgBox("data has been entered")[/CODE] By Dimming something as an integer, it automatically sets it's self to 0, unless Dimmed as =2, 5, etc... The …

Member Avatar for codeorder
0
158
Member Avatar for Bold Eagle

[CODE] Dim lines As String() = IO.File.ReadAllLines("C:\!vb.net\temp.txt") '// your file here For i As Integer = 4 To lines.Count - 1 '// start at line 5 ListView1.Items.Add(lines(i)) Next[/CODE]

Member Avatar for codeorder
0
197
Member Avatar for michtan

I have never heard of a [I]"Thumbnail control box"[/I], but it seems that when you click an image in it, it uses something as [CODE]Process.Start("c:\your image location here.png")[/CODE] which loads the file in the default viewer/editor. If you want to load the image on another form, add a Form2 to …

Member Avatar for codeorder
0
126
Member Avatar for Simran Kaur

I have never used vb6, but in vb.net if you want to add an item to a listbox, you would use... [CODE] ListBox1.Items.Add("Hello")[/CODE]

Member Avatar for codeorder
0
394
Member Avatar for Saima_Khan

Here is something simple using a picturebox, listbox, timer, and a button. [CODE]Public Class Form1 Private myFolder As String = "C:\!vb.net\images\" '// your images folder. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load For Each img As String In My.Computer.FileSystem.GetFiles _ (myFolder, FileIO.SearchOption.SearchTopLevelOnly, "*") ListBox1.Items.Add(IO.Path.GetFileName(img)) '// …

Member Avatar for codeorder
0
737
Member Avatar for tferrier18

[CODE] Dim tempList As New List(Of String) '// create temp list. For Each itm As String In ListBox1.Items '// loop thru listbox. If itm.Length > 7 Then '// to not get errors, check if item's length is greater than 7. tempList.Add(itm.Substring(0, 7)) '// if greater than 7, get the substring. …

Member Avatar for codeorder
0
169

The End.