I have a small Windows Application that displays a .chm Help File when F1 is pressed. What I would like to do is to close the Help Display programatically for example when a Reset Button is clicked and the Form is 'Reset'.
long story short, I have created a ListView type control, using UserControls for the parent control and the ListViewItems. Most the of the control is written and works fine, right up to the point where I tried to replicate the 'Control.SelectedItems(0).Index' property and the 'SelectedIndexChanged' event.
Each child object knows its index value, and could pass this value via the SelectedIndexChanged event (assuming this is how it works in a normal ListView control -- user clicks on an item, and that item fires an event updating the selected index value in the parent object).
How does the child object raise an event in the parent object? I have a feeling this could be done with Delegates, but I'm still learning about their usage.
I have a small doubt: (VB.Net 2005, MS-Access 2007)Is it possible to add the current row from DGV to DB as soon as the row lost its focus..i.e. whenever i add a new row in DataGridView it should automatically get inserted into the database without pressing any buttons... Bcoz i need to add more new rows dynamically & hence i find little difficult in clicking the ADD button again and again to insert each and every Record.
I want to set link from a.aspx.vb page according to what person is viewing the page. How can i change this so that if user clicks on link it will replace current frameset contained in current window with a url provided according to user?
Or in another way:
How will i replace href code in aspx page by giving it value from aspx.vb page?
When i added a 2nd openfiledialog i lost the file list in both dialogs I deleted both file dialogs, added another openfiledialog and coded it the same as the first dialog was previously. now the openfiledialog and the savefiledialog does not show any file list. But when i start to type in the file name box a list of the files that are in the folder appear . if i click on one of them files and click open the image file will properly go into the picture box in the program. Here is the code for the open file dialog
I am developing an application which has a WebBrowser control, and it navigates to a tal.ki forum. Now tal.ki allows users to sign in using existing accounts in google or facebook, and opens a new window for the same.Now when i click log in, a new IE window opens up, which asks me to log in, i provide the information, the window closes, but the user is not logged into the forum.I have heard that session plays some part here, but i don't know anything i can do for this. I tried WebKitBrowser but that not even opens a window to log in.
We are looking to make a final decision on our Mocking framework. After trying several, I have fallen in love with Moq. I also love TypeMock - but because we are in the early stages of implementing TDD across the team, we do not want to make such a large investment quite yet. We are using VS 2008 now and are going to move to 2010 as soon as it is released.
So after doing much research I have decided on Moq because it's nearly as good as TypeMock and has super clean syntax, etc. Now here's the problem/question: we are mainly a VB.NET shop but are using C# for all of our CRM implementation code (plugsins, etc). It seems Moq only fully supports C# due to VB.NET lacking Lambda sub routines. Can anyone confirm that when VS2010 comes out Moq will work fully with VB.NET in its current version?
Is anyone here using Moq with VB.NET? w/ 2010? We need to make this decision asap, as we are under tight deadline and do not want to change frameworks again (went from NMock to TypeMock and now want to make final decision and move to Moq) or have 2 separate ones per language...
"Working with Multiple Forms in Visual Basic .NET: Upgrading to .NET" url...states very clearly, "you need an instance of a form before you can display it or work with any of its controls or properties". Granted, this was written for VB.NET 2003, but I can't find any reference where this has been changed in later versions. [code] Running this in Debug, both OriginalForm and InstantiatedCopy work fine. The Output window displays the values for both forms identically. (I'm using Visual Studio Professional 2010.)
I'm using a WebBrowser to print some HTML data, all works good except for the print preview called in the load completed event - It opens as a very small window in the top left, anything I can do to improve this?
Private Sub BtnPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnPrint.Click Dim webBrowserForPrinting As New WebBrowser() AddHandler webBrowserForPrinting.DocumentCompleted, New WebBrowserDocumentCompletedEventHandler(AddressOf PrintDocument) [Code] .....
I am using the Win32API function EnumWindows to populate a listview with the window text, handle. In this listview I would also like to populate the SmallImageList from an ImageList control of the window's small icon attribute.Now, I have the window handle for each, and I understand their is a number of ways to go about this. I have tried using SendMessage, sending the WM_GETICON value for ICON_SMALL...but that always returns zero.I've read something too about populating a WindowClass structure to get an icon for a particular window.
I know this is not the right place for this question but still I would like to create in Visual Studio a small site with related links based on what the current page is displaying, from what I understand it's about MVP/MVC
I can't seem to find a lot on how to use events in nested objects. I suspect that I should have access to the events in the nested objects through intellisense if I had done things right. I have many objects with 50 or so properties and I would like to access them with out adding handlers for each one and additional events in parent objects.
Example: Public Class Form1 Dim WithEvents myCombinedClass As New CombinedClass
I'm having a problem at the moment developing my application. What i need to do is find out how many modems they are connected to my system and send data to each one in turn. I have the programme working for one modem at the moment.
So I can send data to a modem that i specify, for example a modem on COM port 1. I have functions already that will give me a list of COM ports that I need to open.My problem is that i want to dynamically create a new modem object along side existing modems and store them in a collection.
I have an ArrayList that is populated with Objects. These Objects raise events at certain times. How can I capture these events from the ArrayList? i.e. I want something like this: Public Sub MyRaisedEvent(ByVal obj as MyObject) Handles MyArrayList.MyEvent End Sub
I created a Class which inherits Combobox and the listview is added . Now what I need is once the user click listview, the listview has to close and the clicked item has to added with combobox text. simply can say combobox1.text = listview.item(0).textFor closing & displaying the listview I need to handle the events. For
My Codings :========Public Class Combu_lstviewInherits ComboBoxPrivate treeViewHost As ToolStripControlHostPrivate Shadows dropdown As ToolStripDropDownPublic mylistview As New ListView Public Sub New()mylistview.BorderStyle = BorderStyle.Nonemylistview.View = View.Detailsmylistview.HeaderStyle =
I would like to use MS Office automation and have event handlers that fire for user-triggered events. For example, if the user clicks the save button in Word, I want to intercept that event and execute code in my program.
I don't want to be bound to a specific version of Word because I don't know what version my user will be running, so I instantiate a reference to Word using late binding. The problem is that the AddHandler and the Dim WithEvents commands require specific references to an object that is known at design time. Given this, how can I define an event handler without having an early bound reference to a specific version of the Word library?
I can try to a reference to an earlier version of Word with the expectation that newer versions of Word will be backwards compatible, but this seems kludgey and risky.
I have created a PictureBox array to hold 104 playing cards that are all visible at the same time.I did this with this line in the declarations:Shared Card(104) As PictureBox
And with these lines in the Form_Load module:
For I% = 1 To 104 Card(I%) = New PictureBox Card(I%).Name = String.Format("Card{0}", I%.ToString) Card(I%).Size = New Size(71, 96)
[Code]...
I have been successful in creating the array, positioning each and entering the images for all 104 PictureBoxes, but now I want to add code for the event "MouseDown.I copied the code for this event from my VB3 program and VB10 automatically updated the list of parameters, but nothing has linked the objects (Card) to the code.
I have tried to append "Handles Card.MouseDown" as well as several variations with brackets to indicate that it is an array.Auto-complete doesn't include "Card" as an option, and of course, since the array was never an object added to the form design, I can't create the empty module from there.
I'm currently designing an assembly that will be used by third parties. One of the classes has a long process of TCP connections and it informs about its process using events. For example
''# Do stuff that takes some time RaiseEvent CompletedFirstPartEvent() ''# Do stuff that takes some time
[Code].....
What I've seen if that if the handler of one of those events takes too long (or even worse, it blocks) I can have timeouts and it's hard for the developer to see that one class is not working fine because his handler is taking too long.
I was going to fire the events in a new Thread to avoid this issue but this looks strange to me because I've never seen something like that, what I've seen until now is the developer spawning a new Thread if his handler was going to be timeconsuming. So the question is:
What would you do? Create a new thread or force the user to create his own thread? (Or is -there a better approach that I don't know?)