I'm trying to make a button that when pressed for a short while will close the form but when pressed for a long time *e.g. 5s* the form's process will be killed. I'm trying to achieve this with a timer. Private Sub CloseLongTimer_Tick(sender As Object, e As EventArgs) Handles CloseLongTimer.Tick Dim SetTime As Integer = 0 SetTime = SetTime + 1 If SetTime < 500 Then Me.Close() ElseIf SetTime > 499 And SetTime < 1001 Then System.Environment.Exit(1) ElseIf SetTime > 1000 Then CloseLongTimer.Stop() End If End Sub Private Sub CloseButton_MouseDown(sender As Object, e As EventArgs) Handles CloseButton.MouseDown CloseLongTimer.Start() End Sub …

Member Avatar
Member Avatar
+0 forum 4

Hi, I'm getting the following error: NullReferenceExceptionWasUnhandled on `if (messageUserList[i].Contains("_0"))`. I can't seem to find where the data is null. I've tried debugging using breakpoint yet no luck. Basically what I intend to do is get the text from a particular textbox `txtSendMsg` and write it to `messageList` at position `messageListPos`. Then the textbox will be cleared. The current position `messageListPos` and current user `currUser` (which in this case is 0) will be writen to another array `messageUserList` at position `messageListPos`. So far the program identifies taht the value at `messageUserList[messageListPos]` is '0_0', (this I figured out from debugging). Later …

Member Avatar
Member Avatar
+0 forum 2

onsubmit return false still submitting form HTML: <!DOCTYPE html> <head> <script src = "Scripts/script.js"></script> </head> <body> <form action = "http://posttestserver.com/post.php" method = "post" onsubmit = "return age()"> <label for = "dob">Date of Birth</label> <input class = "TextArea" type = "date" id = "dob" name = "dob" required/> <br/> <p><span id = "invalid">&nbsp;</span><br/></p> <input id = "FormSubmit" class = "Buttons" type = "submit" value = "Submit"/> </form> </body> Javascript: function age() { var invalidStr = "You must be at least 18 to subscribe."; var submitOK = true; var dateOfBirth = document.getElementById("dob").value; var dateOfBirthD = dateOfBirth.split("/")[0]; var dateOfBirthM = dateOfBirth.split("/")[1]; var dateOfBirthY …

Member Avatar
Member Avatar
+0 forum 3

Sheet1 A1: Football A2: Rugby A3: Basketball Sheet2: A1: A2 A2: B4 How can I get a location of a field from String? Is it even possible? *eg. I want to tell the contents of cell A2 in Sheet1 by getting the string value "A2" from cell ''Sheet2'!A1'*

Member Avatar
+0 forum 0

Code 01: <head> <title> My Web Page </title> <link rel = "icon" href = "favicon.ico" /> <link rel = "shortcut icon" href = "favicon.ico" /> </head> Code 02: <head> <title> My Web Page </title> <link rel = "icon" href = "favicon.ico" type = "image/x-icon" /> <link rel = "shortcut icon" href = "favicon.ico" type = "image/x-icon" /> </head> I've tried all these in .ico and .png but neither seem to work, at least on Chrome and IE10. I have a 256 x 256 icon. I've also reduced the size to 16 x 16. Plus I've tried using the full path …

Member Avatar
Member Avatar
+0 forum 25

Hi, I'm using an ESX Virtual Drive and basically I want to allocate data to a VM Drive from unallocated space within the VM Drive due to lack of space. I've done some research and found this great software: http://www.youtube.com/watch?v=AnpOhiywWJw#at=65 . What do you think? Is there a better and a more suitable option/ software?

Member Avatar
Member Avatar
+0 forum 2

Public Class Form1 Dim CloseButton As New Close Dim RestoreButton As New Restore Dim MinButton As New Minimise Dim Drag As Boolean Dim MouseX As Integer Dim MouseY As Integer Dim WinBorder As New PictureBox Private Sub CloseButtonCode() Handles Me.Load CloseButton.Anchor = AnchorStyles.Top + AnchorStyles.Right CloseButton.Enabled = True CloseButton.Location = New Point(1170, 0) CloseButton.Size = New Size(30, 30) CloseButton.Visible = True Controls.Add(CloseButton) AddHandler CloseButton.Click, AddressOf CloseButtonClick End Sub Private Sub CloseButtonClick() Me.Close() End Sub Private Sub RestoreButtonCode() Handles Me.Load RestoreButton.Anchor = AnchorStyles.Top + AnchorStyles.Right RestoreButton.Enabled = True RestoreButton.Location = New Point(1140, 0) RestoreButton.Size = New Size(30, 30) RestoreButton.Visible = True …

Member Avatar
Member Avatar
+0 forum 1

I need to to this: If the selected option / item is "Enabled" I want to preview a textbox. I've tried this: If ComboBox6.SelectedItem = "Enabled" Then TextBox10.Visible = True Else TextBox10.Visible = False End If And also this: If ComboBox6.Text = "Enabled" Then TextBox10.Visible = True Else TextBox10.Visible = False End If Thanks in advance, Isaac PS: I'm using DropDownList

Member Avatar
Member Avatar
+0 forum 3

I've got these two tables on two different worksheets. A1: ID B1: Name C1: Locality D1: ID_2 E1: Status A1: ID B1: Name C1: Locality D1: Status Basically I need to match the two tables via "Name". If the names are similar I want to fill in "ID_2" with "ID" in WS2. I also want to display "Y" in status if there's a match. Is there a formula that does this? Or do I have to use VBA. Office Version: 2003

Member Avatar
Member Avatar
+0 forum 6

I'm trying to imitate the Windows 8 Start Menu preview'. Private Sub CornerHoverMouseOn() Handles CornerHover.MouseHover Dim CHL As Integer CHL = (Screen.PrimaryScreen.WorkingArea.Height - 100) CornerHover.Anchor = AnchorStyles.Bottom + AnchorStyles.Left CornerHover.Location = New Point(0, CHL) CornerHover.Height = 100 CornerHover.Width = 50 CornerHover.BackgroundImageLayout = ImageLayout.Stretch CornerHover.BackgroundImage = My.Resources.CornerHover End Sub Private Sub CornerHoverMouseOff() Handles CornerHover.MouseLeave Dim CHL As Integer Dim NewBackImage As System.Drawing.Image CHL = (Screen.PrimaryScreen.WorkingArea.Height - 50) CornerHover.Anchor = AnchorStyles.Bottom + AnchorStyles.Left CornerHover.Location = New Point(0, CHL) CornerHover.Height = 50 CornerHover.Width = 25 CornerHover.BackgroundImageLayout = ImageLayout.Stretch End Sub I need to know how to remove the image frome the picturebox. I've …

Member Avatar
Member Avatar
+0 forum 2

Close is a Custom Button I made. Dim CloseButton As New Close Private Sub CloseButtonCode() Handles Me.Load CloseButton.Anchor = AnchorStyles.Top And AnchorStyles.Right CloseButton.Enabled = True CloseButton.Location = New Point(1170, 0) CloseButton.Size = New Size(30, 30) CloseButton.Visible = True Controls.Add(CloseButton) AddHandler CloseButton.Click, AddressOf CloseButtonClick End Sub Whenever I Maximise, this button doesn't move to the top right corner like it's supposed to. Any help? Thanks in advance.

Member Avatar
Member Avatar
+0 forum 2

How can I close a user generated button? Here's the code for the button that creates new user generated buttons: Public Sub Button12_Click(sender As Object, e As EventArgs) Handles Button12.Click TC = TC + 1 Dim TCP As New Integer TCP = TC * 100 Dim NT As New MyButton NT.Anchor = AnchorStyles.Top And AnchorStyles.Left NT.Enabled = True NT.Location = New Point(TCP, 85) NT.Size = New Size(100, 30) NT.Visible = True Controls.Add(NT) End Sub MyButton is a custom button I had created.

Member Avatar
Member Avatar
+0 forum 10

Hi. I want to create a picturebox when a specific button is clicked. The code below displays nothing :( TC has an initial value of 0. It will count he number of times the picturebox has been created. Private Sub Button12_Click(sender As Object, e As EventArgs) Handles Button12.Click TC = TC + 1 Dim TCP As New Integer TCP = TC * 100 Dim NT As New PictureBox NT.Anchor = AnchorStyles.Top And AnchorStyles.Left NT.BackColor = Color.Transparent NT.Enabled = True NT.Image = My.Resources.Tab01 NT.Location = New Point(TCP, 85) NT.Size = New Size(100, 30) NT.SizeMode = PictureBoxSizeMode.StretchImage NT.Visible = True End Sub

Member Avatar
Member Avatar
+0 forum 3

Hey guys so how can I actually make a Tab Control using [this](https://docs.google.com/file/d/0Bx-ETTSBtAAfUFM0R2tBUDFpQUE/edit?usp=sharing) image as an active tab and [this](https://docs.google.com/file/d/0Bx-ETTSBtAAfRElBUnkyWkphMkk/edit?usp=sharing) one as an inactive tab. I've already read something about Drawing Tabs but I didn't quite understand it. Thanks.

Member Avatar
Member Avatar
+0 forum 6

Hey Guys! I've been working on a CLI. Basically I want to recreate the Command Prompt using more user friendly commands. The thing is, as I'm using a RTB the 'Return' Key won't produce a value but it will only skip a line. How can I fix this? Below is some of the code I have been working on. Thanks in Advance, Isaac Dim EnterKey As Keys = Keys.Return Private Sub RootMenu(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress If RichTextBox1.Text = "Command" Or "command" And EnterKey Then Me.CommandOptions() ElseIf RichTextBox1.Text = "Explore" Or "explore" Then Private Sub …

Member Avatar
Member Avatar
+0 forum 2

Hey, I'm a Happy Owner of a Razer Electra Headphones/Headset. The thing is that whenever I place the microphone wire into the line-in, sound is neither recorded or heard. Could it be that my VIA HD Sound Card isn't compatible with my headset? Thanks in advance, Isaac. Attached you should find a screenshot of my VIA HD Audio Deck. I had already posted this on the [ViaArena Forums](http://www.viaarena.com/forums/showthread.php?p=271122#post271122) but to be honest it is the worst forum ever.

Member Avatar
Member Avatar
+0 forum 3

Sample 1: Private Sub Get_URL() Dim AddressText As String = HttpContext.Current.Request.Url.AbsoluteUri.ToString ComboBox1.Text = AddressText End Sub Sample 2: Private Sub Get_URL() Dim AddressText As String = CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser)Url.ToString ComboBox1.Text = AddressText End Sub Neither of them successfully displayed a URL in my ComboBox. Any Help? Thanks.

Member Avatar
Member Avatar
+0 forum 2

I want to make a tab control that looks like this: ![6f8bc46c110356e34b73f3992d388de2](/attachments/large/3/6f8bc46c110356e34b73f3992d388de2.png "6f8bc46c110356e34b73f3992d388de2") Does anybody know how to this? I've searched all over the internet yet nothing really worked. Current Tab: ![9db2836000c6705c1e74ca8d818f3186](/attachments/large/3/9db2836000c6705c1e74ca8d818f3186.png "9db2836000c6705c1e74ca8d818f3186") 'Offline' Tab: ![c8393eabeab3324cf45c45d3caab472b](/attachments/large/3/c8393eabeab3324cf45c45d3caab472b.png "c8393eabeab3324cf45c45d3caab472b") Thanks :)

Member Avatar
Member Avatar
+0 forum 4

Public Class Close Inherits Windows.Forms.Button Public Sub New() Me.Size = New System.Drawing.Point(25, 25) Me.FlatStyle = Windows.Forms.FlatStyle.Flat Me.BackgroundImage = My.Resources.CloseNormal Me.BackgroundImageLayout = Windows.Forms.ImageLayout.Stretch Me.BackColor = Drawing.Color.Transparent Me.Font = New System.Drawing.Font("Calibri", 10, Drawing.FontStyle.Regular, Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.ForeColor = Drawing.Color.Black Me.FlatAppearance.BorderColor = Drawing.Color.DeepSkyBlue Me.FlatAppearance.MouseDownBackColor = Drawing.Color.Transparent Me.FlatAppearance.MouseOverBackColor = Drawing.Color.Transparent Me.FlatAppearance.BorderSize = 0 End Sub Private Sub Button1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown Me.BackgroundImage = My.Resources.ClosePress End Sub Private Sub Button1_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.MouseEnter Me.BackgroundImage = My.Resources.CloseNormal End Sub Private Sub Button1_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.MouseHover Me.BackgroundImage = My.Resources.CloseHigh …

Member Avatar
Member Avatar
+0 forum 6

How can I safely change the taskbar / explorer skin without installing any software? I really like the Vista taskbar and I would love to change it. Help would be appreciated. Thanks in Advance.

Member Avatar
Member Avatar
+1 forum 2

It sort of works - the thing is without clicking the picturebox or anything, the form, whenever I move the mouse, it moves any help? Thanks Public Class Form1 Dim drag As Boolean Dim mousex As Integer Dim mousey As Integer Private Sub CloseButton1_Click(sender As Object, e As EventArgs) Handles CloseButton1.Click System.Environment.Exit(1) End Sub Private Sub MaximiseButton1_Click(sender As Object, e As EventArgs) Handles MaximiseButton1.Click If Me.WindowState = FormWindowState.Normal Then Me.Height = Screen.PrimaryScreen.WorkingArea.Height Me.Width = Screen.PrimaryScreen.WorkingArea.Width Me.Left = (Screen.PrimaryScreen.WorkingArea.Width - Me.Width) / 2 Me.Top = (Screen.PrimaryScreen.WorkingArea.Height - Me.Height) / 2 Else Me.WindowState = FormWindowState.Normal End If End Sub Private Sub MinimiseButton1_Click(sender …

Member Avatar
Member Avatar
+0 forum 2

How do you link to a Database in VB.NET? Say you need to record Name, Password and Email Address. What shall I write in the db?

Member Avatar
Member Avatar
+0 forum 9

If (TextBox1.Text <> Bookmarks.ListView1.Items) Then NoResultsFound.Show() End If I want to display another class when the user's results dont match anything from the list. Help would be really appreciated. Thanks. ^The code above gave me this error: > Overload resoluton failed because no accessible '<>' can be called with these arguments. ...

Member Avatar
Member Avatar
+0 forum 5

I'm working on a web browser and I need to know how to store history & bookmarks permanently as currently after the browser is closed all data is lossed. Should I put it on a DB? Suggestions? PS: They are currently being saved on a ListBox.

Member Avatar
Member Avatar
+0 forum 11

Hwy guys how can one draw custom tabs. I found a link : http://www.codeproject.com/Articles/12538/Y-et-A-nother-TabControl-A-Custom-Tab-Control-With but I didnt quite understand the code.

Member Avatar
Member Avatar
-1 forum 2

How do you get the URL of a Web Page in VB.NET ? Thanks in advance.

Member Avatar
Member Avatar
+0 forum 4

Private Sub Refresh_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Refresh.Click If (AddressBar.Text.Contains("")) Then WebBrowser.Refresh() ElseIf (AddressBar.Text.Contains(".com") Or AddressBar.Text.Contains(".info") Or AddressBar.Text.Contains(".asia") Or AddressBar.Text.Contains(".aero") Or AddressBar.Text.Contains(".biz") Or AddressBar.Text.Contains(".cat") Or AddressBar.Text.Contains(".coop") Or AddressBar.Text.Contains(".int") Or AddressBar.Text.Contains(".jobs") Or AddressBar.Text.Contains(".mobi") Or AddressBar.Text.Contains(".museum") Or AddressBar.Text.Contains(".name") Or AddressBar.Text.Contains(".net") Or AddressBar.Text.Contains(".org") Or AddressBar.Text.Contains(".post") Or AddressBar.Text.Contains(".pro") Or AddressBar.Text.Contains(".tel") Or AddressBar.Text.Contains(".travel") Or AddressBar.Text.Contains(".xxx")) Then WebBrowser.Navigate(AddressBar.Text) Else WebBrowser.Navigate("www.google.com/search?q=" & AddressBar.Text) End If End Sub This is the code I made to navigate to a web page, search or refresh. Yet when I run the program and i type in the combobox nothing happens.

Member Avatar
Member Avatar
+0 forum 1

I want to make a combobox that will grow or shrink according to the screen size any help?

Member Avatar
Member Avatar
+0 forum 4

Problem : If ComboBox contains "x" display DialogBox1. Whats the code after it?

Member Avatar
Member Avatar
+0 forum 2

Private Sub RefreshGoSearchCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RefreshGoSearchCancel.Click If (AddressBar.Text = "") Then WebBrowser.Refresh() ElseIf (AddressBar.Text <> "" And "." And "") Then WebBrowser.Navigate("www.google.com/search?q=" & AddressBar.Text) Else WebBrowser.Navigate(AddressBar.Text) End If End Sub This is the code for The AddressBar to refresh when text hasn't changed, search when there is no website prefix and navigate to a web address when ther is. A runtime error is showing up any help?

Member Avatar
Member Avatar
+0 forum 3

The End.