338 Posted Topics

Member Avatar for Nawsheen

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 the next character is a 0 you get a 100 …

Member Avatar for Nawsheen
0
125
Member Avatar for Fyrbeast

A third party control is a control written by someone other than the people that wrote the program. i.e. A column control for vb2008 writen by someone other than Microsoft, A control writen for use in AutoCad and by someone other then AutoDesk.

Member Avatar for waynespangler
0
202
Member Avatar for toko

Try this: [CODE]Imports System.Drawing Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.BackgroundImageLayout = ImageLayout.Stretch Me.BackgroundImage = Image.FromFile("C:\Graphics\tree1.jpg") End Sub End Class [/CODE]

Member Avatar for waynespangler
0
143
Member Avatar for densman

Use a FileInfo class: [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 file As New FileInfo _("C:\Users\densman\Documents\ImageUploader\Chickens1.jpg") TextBox1.Text = file.Name End Sub End Class [/CODE]

Member Avatar for waynespangler
0
113
Member Avatar for MrMie

The data control can't hook up with a text file. You will need to create a Access data base (.db) and put your data into it for the data control to work. The answer to your next question is "You can't". Use the setup in vb so all needed files …

Member Avatar for vb5prgrmr
0
1K
Member Avatar for stephen lowry

If it is always .xx then divide by 100. [CODE] Dim num As Decimal = 899 Dim s As String = CStr(num) If s.IndexOf(".") < 0 Then TextBox1.Text = (num / 100D).ToString End If [/CODE] As shown 8.99 would be put in the text box. But if num = 899.1 …

Member Avatar for stephen lowry
0
121
Member Avatar for A.kalyani

First I don't know what F is returning. Is it a decimal? Next you are converting a decimal to a string and then converting it back to a decimal. Big waste of resources. If F is returning a decimal then remove all Decimal.Parse. [CODE] Dim r(15), l(15) As Decimal Dim …

Member Avatar for A.kalyani
0
123
Member Avatar for babitha162
Member Avatar for waynespangler
0
3K
Member Avatar for Razza92

You must be using vb6. Your timer logic is wrong. 1. when you come into the timer you are setting the timer enable and then checking to see if it is enabled. Which will allways be true. 2. The timer will not fire unless it is enabled which causes the …

Member Avatar for waynespangler
0
113
Member Avatar for rickbill

Add this to your loop. [CODE]Imports System.Drawing Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Flip() Then heads = heads + 1 THeads.Text = heads [COLOR="Red"]PictureBox1.Image = New Bitmap("c:\coin1.jpg")[/COLOR] Else tails = tails + 1 Ttails.Text = tails [COLOR="red"]PictureBox1.Image = New Bitmap("c:\coin2.jpg")[/COLOR] …

Member Avatar for rickbill
0
188
Member Avatar for jhonnyboy
Member Avatar for waynespangler
0
266
Member Avatar for lukechris

Here is one way to do it. It assumes that the structure of the string remains the same all the time. [CODE] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim StartPoint As Integer = TextBox1.Text.IndexOf("str=") If StartPoint >= 0 Then StartPoint += 5 Dim EndPoint …

Member Avatar for iamthwee
0
219
Member Avatar for gouki2005

Try this: [CODE]Public Class Form1 Private count As Integer = 5 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim tb As New TextBox tb.Name = "Textbox" & CStr(count) tb.Visible = True tb.Location = New Point(10, 10) tb.Text = tb.Name ' add this if you want …

Member Avatar for waynespangler
0
128
Member Avatar for millanskie
Member Avatar for waynespangler
0
155
Member Avatar for Trekker182

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 your folder isn't there it is two folders back. What I do is copy the …

Member Avatar for Trekker182
0
120
Member Avatar for toko

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 editions do not have this feature. You have to use ClickOnce or copy all required files …

Member Avatar for toko
0
132
Member Avatar for yara.008

I put this in a wrong thread but: 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 editions do not have this feature. You have …

Member Avatar for Teme64
0
185
Member Avatar for sunnyalways1234

Go to here and watch each video. Very helpfull. [url]http://msdn.microsoft.com/vstudio/express/vb/learning/[/url]

Member Avatar for gracezika
0
327
Member Avatar for javaAddict

Try this: Double click on your button. This will take you to the code page showing the click event. [CODE]Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click[/CODE] Now all we do is add each button click to the back of this. [CODE]Private Sub Button1_Click(ByVal sender As …

Member Avatar for javaAddict
0
502
Member Avatar for maxcoder

As long as you use it on windows. VB Express 2008 is free. Get it here: [url]http://www.microsoft.com/Express/VB/[/url]

Member Avatar for Ramy Mahrous
0
85
Member Avatar for vampke

Try this (a couple of suggestions): [url]http://social.msdn.microsoft.com/Forums/en-US/vbide/thread/894ed8bf-22a7-444d-838c-59b79dbef448/[/url]

Member Avatar for waynespangler
0
144
Member Avatar for samir_ibrahim

If you take the remarks out it is not that long. This might be a bit shorter: [CODE] Dim MyString As String = "now is the now is the not now is th" Dim str As String = "now is" ' the search string Dim count As Integer = 0 …

Member Avatar for samir_ibrahim
0
209
Member Avatar for dthree

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 image. Otherwise you have to do all your drawing in the form paint event and …

Member Avatar for dthree
0
122
Member Avatar for donaldunca

vb 2005 and vb 2008: [QUOTE]My.Computer.FileSystem.RenameFile("c:\test\test.txt", "c:\test\NewName.txt")[/QUOTE]

Member Avatar for waynespangler
0
143
Member Avatar for edgar5

As RamyMahrous said use an array. If you deceide to add or remove anything later you only need to do it in one place. [CODE] Dim ary As String() = {" single space", "- hyphen", " - <single space>hyphen<single space>", "` open single quote", "=", "~", "!"} Private Sub Form1_Load(ByVal …

Member Avatar for edgar5
0
193
Member Avatar for pink bunny

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 text in it and calls the TextBox1_TextChanged You are changing the text in it and …

Member Avatar for toko
0
268
Member Avatar for thilinam

Try this: [CODE] Dim ary(,,) As Integer ReDim ary(10, 3, 5) ary = Nothing ReDim ary(2, 3, 4) [/CODE]

Member Avatar for waynespangler
0
101
Member Avatar for linux

Yes I think it is possible. It woluld take a lot of disk space for each note that could be played. A long time ago in a land far away in Windows 3.1 I did something like that. I know I don't have anything of it left and if I …

Member Avatar for Salem
0
374
Member Avatar for jbrock31

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 the line: Dim frm1 As New Form1() and change the next …

Member Avatar for jbrock31
0
152
Member Avatar for tkoopmi

To open a url: [CODE]Process.Start("www.google.com")[/CODE] To open internet explorer: [CODE]Process.Start("iexplore.exe")[/CODE]

Member Avatar for tkoopmi
0
115
Member Avatar for muthupalanisamy
Member Avatar for vinaysnarayan

Try this: [CODE] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim str As String = My.Computer.FileSystem.ReadAllText("C:\test\myFile.txt") Dim ary As String() = Split(str, vbNewLine) For x As Integer = 0 To UBound(ary) Dim startPos As Integer = ary(x).IndexOf("(") + 1 Dim endPos As Integer = ary(x).IndexOf(")") …

Member Avatar for waynespangler
0
86
Member Avatar for vagueante

Why not use a notify icon. Here's how to do one. [url]http://www.codeproject.com/KB/dotnet/notifyiconcontrol20.aspx[/url]

Member Avatar for Teme64
0
171
Member Avatar for noseforwine

The reason is because in your ReadFile you are opening the file, reading a set of data and then closing the file. The next time you use it, it is reading the same record. Move the Input.Close() to a button to close it and also in FormClosing. However, this is …

Member Avatar for waynespangler
0
155
Member Avatar for the_swan

In vb2005 and vb2008: Dim myText As String = My.Computer.FileSystem.ReadAllText(path & "test.txt")

Member Avatar for waynespangler
0
127
Member Avatar for hunnyz
Member Avatar for bpacheco1227

Will this help? [CODE] Dim zz As String = My.Computer.FileSystem.ReadAllText(path & "stocks.txt") Dim a As String() = Split(zz, vbNewLine) ListBox1.Items.AddRange(a) [/CODE]

Member Avatar for bpacheco1227
0
4K
Member Avatar for lich

try this [CODE] If e.KeyCode >= 48 And e.KeyCode <= 57 Then Label1.Text &= Chr(e.KeyValue.ToString) End If [/CODE]

Member Avatar for waynespangler
0
85
Member Avatar for shuey79

You can use the Windows Region and GDI++ GraphicsPath to set your shape then paint the interior like you want. I have code somewhere if I can find it.

Member Avatar for waynespangler
0
117
Member Avatar for arunkp

The simplist way is to add "New". [CODE]dim a as New system.net.networkinformation.tcpstatistics[/CODE] But you still have to set it to something before using ie a = something

Member Avatar for arunkp
0
149
Member Avatar for mbroadway

Put a panel control on your form and set the autoscroll property to true. Put 2 buttons on the panel. Set one property location to 1100,30 and the other to 30,1100. The scroll bars show up on the panel and can use it like word. You will have to do …

Member Avatar for waynespangler
0
196
Member Avatar for Alexpap

I don't think it is possible. Do something like this: [CODE] Select Case textbox1.text Case "case1" If CheckBox1.Checked Then 'code Else 'code End If Case "case2" If CheckBox1.Checked Then 'code Else 'code End If Case Else MessageBox.Show("none of the above") End Select [/CODE]

Member Avatar for sierrainfo
0
83
Member Avatar for dkstevens

Are you saving your settings? If so that is why it keeps getting smaller with each session. I see a lot of resizing in your code. If the tab control is made smaller then the other controls on it are made smaller. Something in your code is changing the size …

Member Avatar for rmblefsh
0
222
Member Avatar for barclays82

I agree with rapture. All good programers start out with a plan and knows how it will work before a single bit of code is written.

Member Avatar for waynespangler
0
106
Member Avatar for Sheryl99

At the begining of the property add this: <Category("This is the category you want it in"), _ Description("This is the description of the property")> _ Public Property YourProperty() As Type [CODE] Dim mText As String = Me.Name <Category("Appearance"), _ Description("Text is displayed in the center of the container")> _ Public …

Member Avatar for waynespangler
0
153
Member Avatar for Djanvk

Go here and download the PowerPack and install. [url]http://www.microsoft.com/downloads/details.aspx?FamilyID=371368A8-7FDC-441F-8E7D-FE78D96D4063&displaylang=en[/url] Use the PrintForm power pack.

Member Avatar for waynespangler
0
119
Member Avatar for sacarias40

try: [CODE] TextBox1.Text = TextBox1.Text.Substring(0, TextBox1.SelectionStart) & ComboBox1.Text & TextBox1.Text.Substring(TextBox1.SelectionStart) [/CODE]

Member Avatar for sourav bansal
0
110
Member Avatar for tyserman5674
Member Avatar for pete08

Put a panel control on your form and set its AutoScroll property to true. Now add your picturebox to this panel and set is SizeMode to AutoSize

Member Avatar for pete08
0
69
Member Avatar for leticiasue

Instead of a for next loop, use the new string function. ie. [CODE]str = New String(character,number of characters)[/CODE]

Member Avatar for waynespangler
0
75

The End.