725 Posted Topics
Re: See if this helps. [CODE] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click '// create and customize. Dim myCoolTextBox As New TextBox myCoolTextBox.Text = "my new textbox." myCoolTextBox.Multiline = True myCoolTextBox.ScrollBars = ScrollBars.Vertical myCoolTextBox.Size = New Size(200, 500) '// add to form. Me.Controls.Add(myCoolTextBox) End Sub[/CODE] | |
Re: [QUOTE=xVent;1340790]Hello , I have a label on my code and i have 3 lines on it , what i want to do is to have my first line on white color and bold , next line normal white and third line on yellow normal .. still searching for a solution. … | |
Re: See if this helps. [CODE]'// Prerequisites: 1 Label, 3 PictureBoxes. Public Class Form1 Private myClickCounter As Integer = 1 Private myCursorLocation As Point Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Label1.Visible = False End Sub Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) … | |
Re: [CODE] Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged TextBox1.Text = TextBox1.Text.Replace("case", "cAsE") End Sub[/CODE] | |
Re: Using .txt [B]File[/B]. [CODE]Public Class Form1 Private myCoolFile As String = "C:\test.txt" '// your file. Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing IO.File.WriteAllText(myCoolFile, TextBox1.Text) '// overwrite/create file. End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If IO.File.Exists(myCoolFile) Then '// … | |
Re: [CODE] Private Sub TabControl1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TabControl1.SelectedIndexChanged Select Case TabControl1.SelectedIndex Case 0 MsgBox("Tab 1 Activated.") Case 1 MsgBox("Tab 2 Activated.") End Select End Sub[/CODE] | |
Re: [B]Prerequisites[/B]: 1 Timer, 2 Buttons, 1 NumericUpDown. [CODE]Public Class Form1 Private myCount As String = "positive count" Private intCounter As Integer = 0 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Button1.Text = "Start" : Button2.Text = "Positive" Me.Text = "0" NumericUpDown1.Minimum = 1 NumericUpDown1.Maximum = … | |
Re: See if this helps. [URL="http://stackoverflow.com/questions/107936/how-to-add-some-non-standard-font-to-website"]http://stackoverflow.com/questions/107936/how-to-add-some-non-standard-font-to-website[/URL] | |
Re: If the file is exactly as you posted and each line does not have any extra spaces added to the end of the line, the project should respond as asked. Copy and Paste the entire source code in a new Project. [CODE]Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, … | |
Re: [QUOTE=http://www.xtremevbtalk.com/showthread.php?t=175057]Sounds like you got a good topic :"Online Gaming". There are many aspects of this subject...[/QUOTE][URL="http://www.xtremevbtalk.com/showthread.php?t=175057"]http://www.xtremevbtalk.com/showthread.php?t=175057[/URL] Do you have a personal interest that can be used as a topic? | |
Re: [CODE] If Not ListView1.Items.Count = 10 Then ListView1.Items.Add("new item") End If[/CODE] | |
Re: See if this helps. [CODE] For i As Integer = 1 To 35 ListBox1.Items.Add("item " & i) '// add 35 items to the ListBox. Next For i As Integer = ListBox1.Items.Count + 1 To 50 ListBox1.Items.Add("item " & i) '// add the remaining items to the ListBox. Next MsgBox("Total Items: … | |
Re: Something like this? Pre-requisites: 2 Forms, each containing a Label. [CODE]Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Form2.Label1.Text = "text from Form1" Form2.Show() End Sub End Class[/CODE] [CODE]Public Class Form2 Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load … | |
Re: Add a ToolStrip from the Toolbox, right click it, and select "Insert Standard Items". (see attached image) The standard icons are very limited, so online icon websites can become second nature towards locating the proper icons for your application. Here is a link for a few [URL="http://www.iconarchive.com/category/application/toolbar-icons-by-ruby-software.html"]Toolbar Icons[/URL]. The entire … | |
![]() | Re: Use the [B].ProgressChanged Event[/B] of the Webbrowser you are using. [CODE] Private Sub WebBrowser1_ProgressChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserProgressChangedEventArgs) Handles WebBrowser1.ProgressChanged ProgressBar1.Maximum = e.MaximumProgress ProgressBar1.Value = e.CurrentProgress End Sub[/CODE] |
Re: Hi. I have found the following c# code [URL="http://geekswithblogs.net/dapostolov/archive/2009/06/14/the-validating-event-can-prevent-a-form-closing-properly.aspx"]here [/URL]and converted it to vb.net. [CODE]Public Class Form1 Const WMCLOSE As String = "WmClose" Public Function IsFormClosing() As Boolean Dim stackTrace As System.Diagnostics.StackTrace = New System.Diagnostics.StackTrace For Each sf As System.Diagnostics.StackFrame In stackTrace.GetFrames If (sf.GetMethod.Name = WMCLOSE) Then Return True End … | |
Re: You can also use the (ApplicationSettings) located in a control's Properties. For example, Label1: Double-click or click the little arrow for (ApplicationSettings), which should be located at the very top of the Label1 Properties. Locate Text, click the litte arrow and select (New...). Give it a unique Name,press OK, and … | |
Re: [CODE]Imports System.IO Public Class Form1 Private file_name As String = "jpeg.rtf" Private tempString As String = Date.Now Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load '///////////////////////////// tempString = tempString.Replace("/", "-") '// unless you replace these character, the file name returns invalid and causes errors. tempString = … | |
Re: See if this helps. [CODE] Dim myCoolFileLines() As String = IO.File.ReadAllLines("C:\config.ini") '// load your file as a string array. Dim array() As String = {""} '// go thru each line. For Each rLine As String In myCoolFileLines array = rLine.Split("=") For i As Integer = 0 To array.Length - 1 … | |
Re: [QUOTE=Naveed_786;1315508]No body has any idea about pictures in vb.net[/QUOTE] Images in vb.net, Yes. Images in Sql Server, No. | |
Re: Does using (sender, e) help? [CODE]Public Class Form1 Private Sub Button2_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Button2.BackColor = Color.Orange End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Button2_MouseMove(sender, e) End Sub End Class[/CODE] | |
Re: [CODE] Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load WebBrowser1.Navigate("http://www.ritani.com/salespersons/login") End Sub Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted If WebBrowser1.Url.AbsoluteUri = "http://www.ritani.com/salespersons/login" Then WebBrowser1.Document.GetElementById("SalespersonEmail").SetAttribute("Value", "myCoolEmail@myCoolWebsite.com") WebBrowser1.Document.GetElementById("SalespersonPassword").SetAttribute("Value", "myCoolPassword") WebBrowser1.Document.Forms(1).InvokeMember("submit") End If End Sub[/CODE] You might find this [URL="http://www.daniweb.com/forums/thread270186.html"]link [/URL]useful. | |
Re: Add this to your code. [CODE] Dim iconBitmap As Bitmap = New Bitmap(favicon) Me.Icon = Icon.FromHandle(iconBitmap.GetHicon)[/CODE] | |
Re: [CODE] Private Sub ToolStripDropDownButton1_DropDownItemClicked(ByVal sender As Object, ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs) Handles ToolStripDropDownButton1.DropDownItemClicked Dim myCoolFile As String = ToolStripDropDownButton1.DropDownItems.Item(0).Text MsgBox(myCoolFile) End Sub[/CODE] | |
Re: I am not sure if you were able to get anything accomplished from the posted link, but I could not figure out what a Label.[B]Caption [/B]is.:D I hope this is a little more up to date. [CODE]Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles … | |
Re: What is wrong with the code from your other thread "[URL="http://www.daniweb.com/forums/thread306287.html"]Drag and drop[/URL]"? | |
Re: [URL="http://www.daniweb.com/forums/thread110343.html"]simple chat box..[/URL] | |
Re: Hi. This was my first attempt at creating a translation software so I hope the following project sample is of use. Hopefully I got the correct words for the translations and not something else. :D [CODE]'// Pre-requisites: 2 buttons, 1 richtextbox \\ Public Class Form1 Private translateTo As String = … | |
Re: [URL="http://www.projectguidance.com/"]http://www.projectguidance.com/[/URL] [B]the_carpenter[/B], I believe "engg" is for Engineering, at least that is what google led to. | |
Re: I am not for certain, but unless you dispose of a control, it could still be taking up space. Try adding this piece of code right before you remove the tab. [CODE]TabControl1.SelectedTab.Controls(0).Dispose()[/CODE] | |
Re: First, your If statement needs a closing [B]End If[/B] statement. [CODE] If TextBox2.Text = "1" Then TextBox2.BackColor = Color.LawnGreen 'C:\Users\Nick\Desktop\good_work.play End If[/CODE] Second, you cannot just paste a file's full path, especially one without a file extension and expect nothing but errors. You have to declare it. [CODE] Dim myCoolFile … | |
Re: [CODE] Dim myCoolMsgBox As DialogResult '// declare a message box. myCoolMsgBox = MessageBox.Show("Nickname?", Me.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question) Select Case myCoolMsgBox Case DialogResult.Yes MsgBox("You pressed Yes.") Case DialogResult.No MsgBox("You pressed No.") End Select[/CODE] | |
Re: Giving it a shot. If your text file displays as the following: [CODE=text]price: $10/total items in stock: 100 price: $20/total items in stock: 200 price: $30/total items in stock: 300 price: $40/total items in stock: 400 price: $50/total items in stock: 500[/CODE] The following code will read a line from … | |
Re: I had problems in the past publishing as well, just not sure if it was the same error, but it sounds like it was the same problem. One solution I have found, was to use a 3rd party setup installer, like [URL="http://www.jrsoftware.org/isinfo.php"]Inno Setup[/URL]. Then I would simply build the application, … | |
Re: See if [URL="http://www.boutell.com/newfaq/creating/powerpointtoweb.html"]this [/URL]helps. Quoted from the posted link. [QUOTE]This works well [B][COLOR="red"][COLOR="Green"]for users who already have PowerPoint (or OpenOffice)[/COLOR][/COLOR][/B]. And that's usually a safe bet on your company Intranet. But for an Internet audience, it's not such a hot choice. [/QUOTE] | |
Re: Unless you need to keep certain data in ListBox1, clearing the ListBox before running the code should do the trick. [CODE] ListBox1.Items.Clear() For Each itemlist As ListViewItem In ListView1.Items If itemlist.Checked = True Then ListBox1.Items.Add(itemlist.Text) Else ListBox1.Items.Remove(itemlist.Text) End If Next[/CODE] | |
Re: Your post is very confusing to figure out. [B]In just a few words[/B], explain what "exactly" is the problem you need help with. | |
Re: On Form1 [B]you are declaring your variables "Locally"[/B], therefore only Form1 has access to them. To declare something "Globally" you need to change "Dim" to "Public". Example of a "Global Declaration" on Form1: [CODE] Public Gcoins As String = "1,000,000 gazillion & a couple billions."[/CODE] And to get the variable … | |
Re: Start New Project and click the Save All option. You should get an option to choose a location for your new project. This new location gets stored for the next time you [B]save [/B]a new project. As for non-saved projects, it uses the Temporary Projects folder. Those projects get deleted … | |
![]() | Re: [CODE]Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load TextBox1.Text = "http://daniweb.com" End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click WebBrowser1.Navigate(TextBox1.Text) End Sub Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress If e.KeyChar = … ![]() |
Re: [CODE]Me.Text = Date.Now.ToLongDateString & " - " & TimeOfDay[/CODE] | |
Re: See if the following sample project helps about using a Tab's [B].Tag[/B] property. [CODE]Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load '// clear the default tabs. should be done from designer mode. For Each coolDefaultTab As TabPage In TabControl1.TabPages TabControl1.TabPages.Remove(coolDefaultTab) Next Button1.Text = … | |
Re: [QUOTE=UWILL;1315804]Hey what's up. How would I save a file to the application resources? Like I would be able to save text files using the GUI and then when I re-open the application I'd be able to access them again.[/QUOTE] For adding files to your resources view the following [URL="http://social.msdn.microsoft.com/Forums/en/netfxbcl/thread/da73465a-0790-4250-8693-7adaf7979a88"]link about … | |
![]() | Re: The following code will play [B].wav files[/B]. [CODE]Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim myCoolSoundFile As String = "C:\!vb.net\mission2.wav" '// your sound .wav file here. If IO.File.Exists(myCoolSoundFile) Then My.Computer.Audio.Play(myCoolSoundFile) Else MsgBox("No sound file found.", MsgBoxStyle.Critical) End If End Sub End Class[/CODE] ![]() |
Re: Question: Is [B]txtAddress1 [/B]a ComboBox or TextBox? | |
Re: You probably do not have the correct colors somewhere. Try adding the the following code and see if you get the same results: [CODE] Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Button1.BackColor = Drawing.Color.DarkViolet End Sub[/CODE] Since you will probably need help accessing more controls … | |
Re: Quick question. [B]Is this an HTML web-page or a Flash web-page?[/B] If Flash based, I cannot be of further help. | |
Re: The following code will allow you to drop files on your form and get their full path. Since it will return a file's full path, the rest should be easy. The code had to be slightly modified for it to respond properly, and originated from [URL="http://www.dotnetcurry.com/ShowArticle.aspx?ID=192"]here[/URL]. [CODE]Imports System.IO Public Class … | |
|
The End.