Forum: VB.NET Apr 10th, 2009 |
| Replies: 10 Views: 646 By using text changed you are checking everytime a new character is entered. So the first character entered is 1 and you get a <100. The next character makes it a 10 so it is still less than 100. If... |
Forum: VB.NET Mar 23rd, 2009 |
| Replies: 3 Views: 743 If it is always .xx then divide by 100.
Dim num As Decimal = 899
Dim s As String = CStr(num)
If s.IndexOf(".") < 0 Then
TextBox1.Text = (num / 100D).ToString... |
Forum: VB.NET Feb 10th, 2009 |
| Replies: 4 Views: 1,356 You have to copy the images into the resources. Copy your images to the clipboard. Double click on the MyProjects in the Solution Explorer. Click on the resources tab. Now right click on the... |
Forum: VB.NET Feb 9th, 2009 |
| Replies: 4 Views: 1,356 You still have to tell it where the file is. It it something I have always had trouble with because your program is run in bin subdirectory and either debug subdirectory or release subdirectory and... |
Forum: VB.NET Jan 28th, 2009 |
| Replies: 6 Views: 1,844 Sorry about my answer I don't know what happened but I ment to put that in another thread. Again, Sorry. |
Forum: VB.NET Jan 28th, 2009 |
| Replies: 6 Views: 1,844 I don't have Visual Studio 2008 but I have Visual Studio 2005. In 2005 if you go to New Project then Other Project Types. You should see several setup projects including Setup Wizard.
Express... |
Forum: VB.NET Jan 18th, 2009 |
| Replies: 5 Views: 1,137 Try this:
Double click on your button. This will take you to the code page showing the click event.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles... |
Forum: VB.NET Jan 10th, 2009 |
| Replies: 5 Views: 1,169 If you take the remarks out it is not that long.
This might be a bit shorter:
Dim MyString As String = "now is the now is the not now is th"
Dim str As String = "now is" ' the search... |
Forum: VB.NET Jan 7th, 2009 |
| Replies: 5 Views: 400 Yea, love Cass myself. This summer we are going to take the Mistery Train ride and see if I'm smart enought to solve the crime. I was away from West Virginia for 40 years and now I will never leave... |
Forum: VB.NET Jan 7th, 2009 |
| Replies: 5 Views: 400 create a new project and add this code. Start it with the window minimized.
Public Class Form1
Private bmp As Bitmap = New Bitmap(100, 200, System.Drawing.Imaging.PixelFormat.Format32bppArgb)
... |
Forum: VB.NET Jan 7th, 2009 |
| Replies: 5 Views: 400 Instead of using the form graphics use a bitmap and set the form background equal to the bitmap image. Now when you write to the bitmap it will be transfered automatically to the form background... |
Forum: VB.NET Jan 1st, 2009 |
| Replies: 3 Views: 1,045 As RamyMahrous said use an array. If you deceide to add or remove anything later you only need to do it in one place.
Dim ary As String() = {" single space", "- hyphen", " - <single... |
Forum: VB.NET Dec 21st, 2008 |
| Replies: 20 Views: 1,468 A static variable is used when you leave a subroutine and return to it the variable hasn't changed. If it were 5 then the next time you called the routine it would still be 5. It is not a public... |
Forum: VB.NET Dec 20th, 2008 |
| Replies: 20 Views: 1,468 There doesn't seem to be an edit so do this.
Delete this:
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles... |
Forum: VB.NET Dec 20th, 2008 |
| Replies: 20 Views: 1,468 First of all - When submitting code please use comments inside the code so we know what you are doing or thinking.
1. Your code in TextBox1_TextChanged creates an infinite loop. You are changing the... |
Forum: VB.NET Dec 19th, 2008 |
| Replies: 2 Views: 631 Well, it depends. Are you destroying Form1 when you go to Form2? If you are then you are right. I feel though that you are not, so, what you have is Form1 and Form2 and then creating frm1.
Delete... |
Forum: VB.NET Dec 5th, 2008 |
| Replies: 4 Views: 1,130 Why not use a notify icon. Here's how to do one.
http://www.codeproject.com/KB/dotnet/notifyiconcontrol20.aspx |
Forum: VB.NET Nov 27th, 2008 |
| Replies: 9 Views: 3,133 Will this help?
Dim zz As String = My.Computer.FileSystem.ReadAllText(path & "stocks.txt")
Dim a As String() = Split(zz, vbNewLine)
ListBox1.Items.AddRange(a) |
Forum: VB.NET Nov 17th, 2008 |
| Replies: 4 Views: 615 I've never used it before but here is MS site. Example is in C#.
http://msdn.microsoft.com/en-us/library/system.net.networkinformation.tcpstatistics(VS.85).aspx |
Forum: VB.NET Nov 15th, 2008 |
| Replies: 4 Views: 615 The simplist way is to add "New".
dim a as New system.net.networkinformation.tcpstatistics
But you still have to set it to something before using ie
a = something |
Forum: VB.NET Nov 9th, 2008 |
| Replies: 6 Views: 3,424 Do you really need a 1d array. Why not just put the info into the listbox. i.e.
Public Class Form1
Dim ary(4, 3)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As... |
Forum: VB.NET Nov 5th, 2008 |
| Replies: 4 Views: 1,021 Show the code you used to write the file. |
Forum: VB.NET Sep 19th, 2008 |
| Replies: 2 Views: 435 Each tab page has a name. The default is TabPage1, TabPage2, ..., etc.
use:
TabControl1.SelectTab(TabPage2) |
Forum: VB.NET Sep 19th, 2008 |
| Replies: 1 Views: 3,760 You have to redimension your lines array:
Dim sr As StreamReader = New StreamReader("csvSTOCKS.TXT")
Dim lines() As String
Dim index As Integer = 0
Do While... |
Forum: VB.NET Sep 5th, 2008 |
| Replies: 3 Views: 4,680 Try this:
Public Class Form1
Private CountDownTime As DateTime
Private span As Integer = 1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)... |
Forum: VB.NET Aug 26th, 2008 |
| Replies: 7 Views: 4,241 If you want short and simple, try this:
Dim b As String() = Split(TextBox1.Text, vbNewLine)
TextBox1.Text = String.Join(vbNewLine, b, 1, b.Length - 2) |
Forum: VB.NET Aug 22nd, 2008 |
| Replies: 4 Views: 941 Follow this tutorial.
http://www.example-code.com/vbdotnet/default.asp |
Forum: VB.NET Aug 22nd, 2008 |
| Replies: 4 Views: 941 Did you install Chilkat and reference ChilkatDotNet.dll? |
Forum: VB.NET Aug 21st, 2008 |
| Replies: 11 Views: 1,631 You have too many loops, you only need one. You also have to refresh your textbox. Try this:
Public Class Form1
Dim readcontents As String = "The quick brown fox jumps over the lazy dog"
... |
Forum: VB.NET Aug 19th, 2008 |
| Replies: 11 Views: 1,631 What is happening is you don't have a delay in your loop. All the words are going there but is happening so fast you don't see it. After the "Label1.Text = splitout(i)" put in a Sleep(1000). |
Forum: VB.NET Aug 5th, 2008 |
| Replies: 2 Views: 538 Set TopMost property of form. |
Forum: VB.NET Jul 20th, 2008 |
| Replies: 2 Views: 1,435 As far as I know, you can't. Change the regional and language options in the control panel.
You can use:
TextBox1.Text = Format(Me.MonthCalendar1.TodayDate, "dd/MM/yyyy") |
Forum: VB.NET Jul 19th, 2008 |
| Replies: 4 Views: 1,648 Try this:
Dim ary As New ArrayList()
Dim str As String = FormatNumber(CLng(TextBox2.Text), 0)
If str.Length < 9 Then str = StrDup(9 - str.Length, " ") & str
str &=... |
Forum: VB.NET Jul 8th, 2008 |
| Replies: 2 Views: 421 Show us the code you are using to load the array. |
Forum: VB.NET Jul 7th, 2008 |
| Replies: 2 Views: 1,476 Try this:
If Me.Controls.Contains(UserControl1) Then
Me.Controls.Remove(UserControl1)
End If |
Forum: VB.NET Jul 6th, 2008 |
| Replies: 5 Views: 2,378 Go to this site:
http://windowsclient.net/learn/videos.aspx
go about 1/3 way down and click on the NotifyIcon video. It will show you how to do it. |
Forum: VB.NET Jul 6th, 2008 |
| Replies: 2 Views: 1,701 Post the section of code where you are having problems. |
Forum: VB.NET Jul 3rd, 2008 |
| Replies: 8 Views: 719 If you tried the last code I sent, you will see it does what you want. |
Forum: VB.NET Jul 2nd, 2008 |
| Replies: 8 Views: 719 Try this then:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
TextBox1.Text = "The quick brown fox jumps over... |
Forum: VB.NET Jul 1st, 2008 |
| Replies: 8 Views: 719 Here is one way.
Three textboxes and button.
Public Class Form1
Dim KeyWord As String = "aid"
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles... |