338 Posted Topics
Re: 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 … | |
Re: 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. | |
Re: 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] | |
Re: 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] | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: Try this site: [url]http://msdn.microsoft.com/en-us/library/ms996492.aspx[/url] | |
Re: 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 … | |
Re: 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] … | |
Re: try: [CODE]For i As Integer = 0 To users.Count -1[/CODE] | |
Re: 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 … ![]() | |
Re: 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 … | |
Re: You can't change the path. I would suggest you use Inno setup instead. | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: Go to here and watch each video. Very helpfull. [url]http://msdn.microsoft.com/vstudio/express/vb/learning/[/url] | |
Re: 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 … | |
Re: As long as you use it on windows. VB Express 2008 is free. Get it here: [url]http://www.microsoft.com/Express/VB/[/url] | |
Re: Try this (a couple of suggestions): [url]http://social.msdn.microsoft.com/Forums/en-US/vbide/thread/894ed8bf-22a7-444d-838c-59b79dbef448/[/url] | |
Re: 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 … | |
Re: 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 … | |
Re: vb 2005 and vb 2008: [QUOTE]My.Computer.FileSystem.RenameFile("c:\test\test.txt", "c:\test\NewName.txt")[/QUOTE] | |
Re: 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 … | |
Re: 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 … | |
Re: Try this: [CODE] Dim ary(,,) As Integer ReDim ary(10, 3, 5) ary = Nothing ReDim ary(2, 3, 4) [/CODE] | |
Re: 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 … | |
Re: 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 … | |
Re: To open a url: [CODE]Process.Start("www.google.com")[/CODE] To open internet explorer: [CODE]Process.Start("iexplore.exe")[/CODE] | |
Re: Answer deleted. I don't know. | |
Re: 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(")") … | |
Re: Why not use a notify icon. Here's how to do one. [url]http://www.codeproject.com/KB/dotnet/notifyiconcontrol20.aspx[/url] | |
Re: 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 … | |
Re: In vb2005 and vb2008: Dim myText As String = My.Computer.FileSystem.ReadAllText(path & "test.txt") | |
Re: 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] | |
Re: try this [CODE] If e.KeyCode >= 48 And e.KeyCode <= 57 Then Label1.Text &= Chr(e.KeyValue.ToString) End If [/CODE] | |
Re: 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. | |
Re: 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 | |
Re: 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 … | |
Re: 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] | |
Re: 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 … | |
Re: 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. | |
Re: 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 … | |
Re: 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. | |
Re: try: [CODE] TextBox1.Text = TextBox1.Text.Substring(0, TextBox1.SelectionStart) & ComboBox1.Text & TextBox1.Text.Substring(TextBox1.SelectionStart) [/CODE] | |
| |
Re: 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 | |
Re: Instead of a for next loop, use the new string function. ie. [CODE]str = New String(character,number of characters)[/CODE] |
The End.