Fire An Event Every Second?
Dec 1, 2009I need an event that fires every second, just like the timer1_timer() event of VB6. I'm using VB9/Silverlight, creating a small sidebar gadget.
View 2 RepliesI need an event that fires every second, just like the timer1_timer() event of VB6. I'm using VB9/Silverlight, creating a small sidebar gadget.
View 2 RepliesHow can I cause the Paint event to fire from a Form_Click() event? This is what I'm trying to do...
Public Class StrTests01
Private Sub StrTests01_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Click
Dim ps As Graphics = Me.CreateGraphics()
[code]....
Key Down event won't fire
View 1 RepliesI created a control that inherits from treeview. When I add it to my project the afterselect event does not fire.
<code>
Public Class TreeViewClaims
Inherits System.Windows.Forms.TreeView
End Class
</code>
When i clicked one of the node of treeview, it does not fire SelectedNodeChanged event.
View 1 RepliesHow do I fire an event from a background thread I created onto the main thread in a class in vb.net?
I've searched A LOT fot this, but could only find non vb.net examples, mainly C#, and have not been able to translate these.
I have a windows service in VB.NET 2008 and want to fire an event every hour on the hour within the service?
I have this working in an application were i assign the current hour to a variable and check each minute if the variable has changed. Is there a cleaner way of achieving this in a service?
I also want the service to read this in form an XML file i have modified from a service control app can i use app.config for this as i've read your not supposed to write to this file?
I have this function that totals a series of textboxes everything works fine except the last line, i need to call the function a second time for the correct total of last line,anyone have any ideas what i am doing wrong? I even tried to make the last line its own function and call it seperately but have the same behavior.
[Code]...
I am trying to drag and drop items from a listbox into a richtextbox? I can not get the .DragDrop event to fire? I have copied and past the code from [URL]
I can get the .DragEnter event to fire. The mousedown event fires the drag and drop, is there something for mouseup?
I have added the AutoPostBack = "true" attribute to the drop down list. It doesn't work.
<asp:DropDownList CssClass="dropDownList" ID="ddlBusinessUnit"
AutoPostBack="true" runat="server" Width="250px"
OnSelectedIndexChanged="ddlBusinessUnit_SelectedIndexChanged">
[Code].....
How can I ensure that the event method is called?
I have the following form1, when called as the startup, everything works fine. Usually after I added a new row, fill in the fields in that row and close the form without leaving that row, both bindingsource listChanged event will fire.
However, when called from the another form. It does not work. bindingsource listChanged event does not fire when I close the form after adding a new record. Likewise dataGridView1_RowValidated event as well.
Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.Common
[CODE]...
I can't seem to get the Form.GotFocus event to fire.I have two forms - a main window and a debug window.The debug window will always be shown with the main window. But, I don't want the debug window to appear in the task bar - it's unnecessary.While my program is running, when I select another program, my main window and the debug window are placed behind the program that I selected. From the task bar, I can bring my program back to the front by clicking on it in the task bar. The problem is, that now my debug window is behind the other program.I have code that will "DebugWindow.BringToFront", and it works. But I need some way to run do this when the main form gets the focus.I do not wish to make any of my forms Modal. At least not permanently. If the solution is to change the modal property of the form temporarily, then that wouldn't be a problem.
I tried Me.Enter, Me.Activated, Me.Click and a few other events. Me.Click only works when I click within the Form window, not the form's title bar. Me.Activated caused problems - The code ran, but it would always end with the focus on the Debug window. When I tried to click on the main form, the Activated event would fire again, sending the focus back to the debug window.[code]
I have a MDIcontainer form witch handles MDIchildren. The problem I'm having is when i open a new Mdi child and close the Main form , The app is supposed to ask if i want to save the current MdiChild. Heres my code
[Code]...
To execute some parts of code based on the voice(sound)
View 3 RepliesI have this function that totals a series of textboxes everything works fine except the last line, i need to call the function a second time for the correct total of last line,anyone have any ideas what i am doing wrong? I even tried to make the last line its own function and call it separately but have the same behavior. [Code]
View 2 RepliesI have a Textbox on my application that recieves data from another application via a sendmessage call from the other app.
I can see the data being entered in the textbox but the TextChanged event never fires when the text changes. I need to process the data that is sent but since the event does not fire I'm kinda stuck..
I am trying to implement an update panel on my web page. when I add this, everything works fine:
<script runat="server">
Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Me.Label2.Text = Date.Now.ToString
[code]....
This will cause the event to not occur. If i change the "<" from the string, all is well. why cant I have "<" in my strings? This is important because i wont allow me to put an xml string in the text box.
I am using a column with check box to be able to select my data row from a GridView. But The OnCheckChanged event won't fire. I have tried reading articles to make it work and copy code exactly and it just won't fire. I am using vb.net and asp.net
<asp:GridView ID="locationDetailGrid" runat="server">
<Columns>
<asp:TemplateField>
[code]....
in my application, I pull in http code from the server side. When this code is placed into the application - the event will happen when clicked in IE, but not in any other browser. Heres the part of the code that deals with the image that is clicked and the event.
<img canExpand="true" style="cursor:hand" id="img34635" src="../images/plus.gif" EntityID="346" EntityCat="35" onclick="LoadChild(this.EntityID, this.EntityCat, 0, this.lnEquip)">
LoadChild is a javascript function on the client side of the page. When the image is clicked in anything other than IE , nothing happens. Can anyone see why this is happening? It may be a formatting issue.
edit - here is the javascript function load child
function LoadChild(lnEntityID, lnEntityCat, FullExpand, EquipID) {
document.getElementById('dropTypes').disabled = false;
document.getElementById('dropTypes').style.background = "white";
[code]....
My web user control is [code]...
The problem now is that the click event does not fire upon clicking at the button.
I want to create a service that sets up a user specific environment. So I would like to know when a user has logged on to the computer.
View 3 RepliesI created for my app unhandled exception it ask the if they want it to "phone home" and report the problem. I want to test the code, but I can't, since if I try to fire an unhandled exception when debuging, by typing Throw New Exception() at a point in the code, the debuger just stops the code there, not letting the UnhandledException code run.
View 4 RepliesI am writing a VB.Net app that interacts with an Internet website via a browser control. Basically, my VB.Net app fills in some textboxes, makes a selection in a listbox (<SELECT> <OPTION>...</SELECT> construct), then hits submit.
View 2 RepliesDoes anyone know how to make an event that will fire when the value from a label is changed? (In VB.NET)
View 3 RepliesI just downloaded that New Window Event for my web browser. It comes with the WebBrowserEx1 which I placed in my form. Does anyone know the code for the new window event to fire for this component?
View 1 RepliesI have a form contains NumericUpDown1, TextBox1, TextBox2, at design time i set NumericUpDown1.Value to 4 and TextBox2.Text to 100, and i have this sub[code]...
View 13 RepliesI need to fire an event when the mouse enters a panel with the mouse button already down. It seems the standard mouse enter, mouse move, etc events don't fire when the mouse is already down. With test code i'm using, all of the events fire when the mouse button is up, none fire when the mouse button is down.
edit...here is my test code..
vb
Public Class Form1
Private Sub Panel1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseDown
Debug.Print("MouseDown")
[code]....
I have a GridView which you can click on a row and it should call the SelectedIndexChanged method (which updates another part of the page based on which row was selected). I have done something similar to this before and it worked, but I can't seem to get the SelectedIndexChanged part to be called for some reason.The page is held in a master page which has a form runat="server" tag, and an <asp:ScriptManager> tagI am using e.Row. Attributes.Add("onclick", ClientScript.GetPostBackClientHyperlink(Me.gridMessages, "Select$" & e.Row.RowIndex)) to allow the SelectedIndexChanged to fire by clicking anywhere on the row.To check that the code does work apart from that, I added a CommandField with a SelectButton and that successfully fires, but i would prefer to find a solution without having to use that.[code]
View 1 RepliesI have a Windows form UserControl that receives electrical signal waveform data into a 128 element byte array Property every 1,000 ms.
I would like to have the Paint event draw a a subset of the 128 sample points of the array every
100ms (12-13 graphic.drawline operations) to simulate a rolling waveform display such as one would see on an oscilloscope or a medical monitoring device. Is it possible, and if so, how would I set the paint event handler to fire every 100 ms?
I have a user control (SomeUserControl), that I am using in a Main Window. I write my application entirely on SomeUserControl, and Main Window is hosting SomeUserControl and nothing else.
Right now I have a shutdown button (in SomeUserControl), that is supposed to close the Main Window. The reason for this is that I do not want anything from SomeUserControl to close the application itself, but to fire an event from SomeUserControl, and Main Window receives it, and Main Window will close the application instead of SomeUserControl.
How do I do it? I am not familiar with the concept of creating and handling custom events, so if someone could explain it in words and in code as an example, I will be very grateful to you!
Edit: Here's my code so far.
(in Window 2)
Public Event CloseApp As EventHandler
Private Sub CancelButton_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles CancelButton.Click
DialogResult = False
[Code]....
I want to close the application when I click cancel in Window 2, but I don't want to do it in such a way that Window 2 closes itself, but by sending some notification to Main Window, and Main Window closes the application.