338 Posted Topics
Re: If you have your info in textboxes then use: Messagebox.Show(Textbox1.text & VbNewline & Textbox2.text & VbNewline & Textbox3.text & VbNewline & Textbox3.text) | |
Re: The same as the button. [CODE] Private Sub ListBox1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListBox1.DoubleClick Dim i As Integer For i = ListBox1.Items.Count - 1 To 0 Step -1 If ListBox1.GetSelected(i) = True Then ListBox2.Items.Add(ListBox1.Items(i).ToString) ListBox1.Items.RemoveAt(i) End If Next End Sub [/CODE] However it does not act … | |
Re: As with any program written there is 101 ways to do the same thing. This is mine. Define FileName outside the function as: [CODE]Private FileName As String = "C:\Test.txt"[/CODE] 1. If you are using vb 2002 or 2003 [CODE] Try Dim Reader As New IO.StreamReader(FileName) lstAnimals.Items.AddRange(Split(Reader.ReadToEnd, vbCrLf)) lstAnimals.SelectedIndex = 0 … | |
Re: Your: ratesLabel.Text = rates.ToString should be some thing like this: ratesLabel.Text = rates(Index).ToString Index is set to the rate you want. | |
Re: check to make sure you do not have two or three items marked with the 0 tabindex. | |
Re: Microsoft has seen fit to place it in the following location (on my computer): "C:\Documents and Settings\wayne spangler.SHED\Local Settings\Apps\2.0\RWNYMT95.9ML\H6513CTM.Z37\hexv..tion_193567cfbc350b05_0001.0000_4213353f3b5ed070/HexView.exe" | |
Re: Try something like this: [CODE] Dim myArray(10) As Integer Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click AddArray(myArray, Integer.Parse(TextBox2.Text)) TextBox1.Text = myArray(Integer.Parse(TextBox2.Text)).ToString End Sub Private Sub AddArray(ByVal thisArray As Array, ByVal Index As Integer) thisArray(Index) = Index + 3 End Sub [/CODE] I didn't do it … | |
Re: Put whatever was initally in the string before your fitst calculation back in instead of a null. | |
Re: I use another form with a webbrowser on it. On the form I have a property: [CODE] Public WriteOnly Property HelpFile() Set(ByVal value) Me.WebBrowser1.Navigate(value) End Set End Property [/CODE] In the button or menu click event I put the path and file I want to show. [CODE] Private Sub Button1_Click(ByVal … | |
Re: I have not used vb 2003 but I think all you have to change is: [CODE]My.Computer.Screen.Bounds.Width, My.Computer.Screen.Bounds.Height[/CODE] to [CODE]Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height[/CODE] | |
Re: A little FYI. You do not need a random number seed. Just use: [CODE] Dim RanGen As New Random Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ' The next number TextBox1.Text = RanGen.Next End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) … | |
Re: I agree with iamthwee, it is not practial. | |
Re: Try this: [url]http://www.codeproject.com/useritems/findandriplace_rtb.asp[/url] | |
Re: If you are using vb 2005 then use this in your loop. [CODE]Do While Boolean ....... ....... My.Application.Doevents Loop[/CODE] | |
Re: You problem is your array is 2 wide. When you get to an index of 3 your code is trying to read a(1,2,3) Do this instead: [CODE] aisleLabel.Text = videoBonanza(categoriesListBox.SelectedIndex, 0) - or - aisleLabel.Text = videoBonanza(categoriesListBox.SelectedIndex, 1) [/CODE] | |
Re: Me.CheckBox1.Focus() In your forms property find AcceptButton and set it to the button you want the enter key to press. You can also set the CancelButton to press if you hit the Esc key. | |
Re: 4.3 percent is .043 so you are making it 4 times the size. i.e. 100 * 4 = 400 sould be 100 * .04 = 4 | |
Re: Try this site. Good article and code example. [url]http://www.startvbdotnet.com/controls/printdialog.aspx[/url] | |
Re: Look at this: [url]http://www.vb-helper.com/howto_net_unsafe_flood.html[/url] | |
Re: Being picky but you should use the following: [CODE] mlblInitialValue = Double.Parse(txtInitialValue.Text) mlblSalvageValue = Double.Parse(txtSalvageLife.Text) mlblAssetLife = Single.Parse(txtSalvageLife.Text) [/CODE] or [CODE] mlblInitialValue = CDbl(txtInitialValue.Text) mlblSalvageValue = CDbl(txtSalvageLife.Text) mlblAssetLife = CSng(txtSalvageLife.Text) [/CODE] | |
Re: 1. In the formload of your main form load tool tip as a dialog box. If you place this before anything else in the form load it will show before the main form. [CODE] Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ToolTip.ShowDialog() End Sub [/CODE] … | |
Re: Try this. I would personally use a label instead of a listbox. [CODE]Public Class Form1 Dim ary() As String Dim index As Integer = 0 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim str As String = My.Computer.FileSystem.ReadAllText("c:\test.txt") ary = Split(str, vbNewLine) End Sub Private … | |
Re: Here is a quick I put together. If doesn't do much but will show you what to do. | |
Re: I don't have or know vb 2003 but use the Try Catch. Under the catch send the error to your log file. Try this: [CODE]Imports System.IO Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim x, y As Integer y = 0 Try … | |
Re: It appears that you want to use vb6 code in a Try:Catch block. You do need to learn the things stated above but try this: [CODE]Imports System.IO Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim x, y As Integer y = 0 … | |
Re: It dosen't matter whether vb net is installed or not. You have to have the correct version of Net installed. i.e. vb 2002 and 2003 require Net 1 and 1.1. vb 2005 requires Net 2.0. | |
Re: You can use the following to find the width of the string going into the label control. I used the return values to set the size of the label. [CODE] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim g As Graphics = Label1.CreateGraphics Dim s … | |
Re: Go here and watch some of these videos. They are helpful. I didn't think the transition was that bad from vb6. It took about 2 weeks. [url]http://msdn.microsoft.com/vstudio/express/beginner/windows/tier1/[/url] | |
| |
| |
Re: You are assigning a value to a varialbe with an IF statement. You can't do that try this: [CODE]if price <= money Then money = money - price Else If price >= money Then TextBox1.Text = "Sorry! Not Enough Money!" End If [COLOR="Red"]End If[/COLOR] 'Fixing the money going into the … | |
Re: String str = "00" & Hex(NUM); Format_Hex2 = str.Substring(str.Length - 2); | |
Re: Try this link. Let me know if it helped. [URL="http://www.daniweb.com/forums/thread78954.html"]http://www.daniweb.com/forums/thread78954.html[/URL] | |
Re: [CODE]Dim a1 As Decimal = 11 Dim a2 As Decimal = 10.89 TextBox1.Text = (a1 - a2).ToString[/CODE] | |
![]() | Re: [url]http://www.thescripts.com/forum/thread176620.html[/url] ![]() |
Re: Here: [url]http://www.w3schools.com/vbscript/default.asp[/url] | |
Re: If you are using vb 2005 then: Label1.Text = "This product registered to: " & My.User.Name.ToString if you are using vb 2002 or 2003 then Label1.Text = "This product registered to: " & System.Threading.Thread.CurrentPrincipal.Identity.Name | |
Re: Check this: [url]http://msdn.microsoft.com/vstudio/express/vb/easytolearn/[/url] | |
Re: With Option Strict on VB will not make any implicit conversions, you have to do it yourself. This is because VB might make the wrong conversion and you will have a terrible time finding it. Your problem is: [CODE]MessageBox.Show(obj.CalculateDistance(10, 10))[/CODE] With Option Strict off VB converts the obj.... to a … | |
Re: Could you show your code for the calculation? Integer does return a whole number, so you must be using it with a single. VB will convert the integer to a single and return a single. This is one reason you should use Option Strict, so VB won't do any conversions, … | |
Re: Try this and see if it is what you want. [CODE] Private Sub btnCropImage_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCropImage.Click If PictureBox1.Image Is Nothing Then Exit Sub [COLOR="Red"]'----------------------------------------------------------- ' The size is how wide and tall the cropped protion is ' The Point is x,y of where … | |
Re: What do you want to do? Convert C++ code to c# code? You can't just convert a dll, you have to rewrite it in the language you want and recompile. Can't you just reference the dll and use it as is? It doesn't matter what language a dll is written … | |
Re: I don't know much about raise ing events between forms, but what I see is you have in your "DA.RunSP" in the true part you have 4 "DA.CreateParam" and in the false you have 3 "DA.CreateParam". I don't know if this is the problem or not. Just a suggestion. | |
Re: I don't see where you are trying to play your sound but if you are using vb express 2005 then use this to play sound. [CODE]My.Computer.Audio.Play(Filename, AudioPlayMode.WaitToComplete)[/CODE] | |
Re: check out this msn site [url]http://msdn.microsoft.com/vstudio/express/vb/easytolearn/[/url] | |
Re: Do you know how a dxf file is formated? You might check out this: [url]http://www.freedownloadscenter.com/Best/asp_net-dxf-2d.html[/url] |
The End.