Search results

  1. VBobCat

    Question Implement Column/Cell/EditingControl derived classes, host custom ComboBox control

    I have this custom Control class, derived from ComboBox. Its purpose is to provide a standard behavior for controls whose list of items will be populated depending on what user types in it as search criteria. Imports System.ComponentModel Public Class SearchBox Inherits ComboBox Private...
  2. VBobCat

    Question WebBrowser Control disables the Form when it navigates while not visible

    Hello friends, My application has a single Form. It always shows in full dock one of a set of several UserControls. They alternate as user demands different functions from the application, so that the Form is one along all runtime and it remains the same. Note: this is the desired design. To...
  3. VBobCat

    Late-bound Event Sink: works with Word, not with Outlook. Why?

    Dear friends, I need your help with solving this puzzle. I wanted to wrap Word and Outlook interop code in classes that work regardless of Office Version on target user machines. For that reason, I chose late binding instead of adding reference to a specific PIA. Much with help of examples...
  4. VBobCat

    Mouse command with Windows API SendInput function - why doesn't it work?

    Dear friends, I would like to command mouse operations with Windows API SendInput function. So I wrote the code below, but it doesn't work. Can anyone point out what I am doing wrong here? Thank you very much. Public Sub MouseMove(ByVal x As Integer, ByVal y As Integer) Dim...
  5. VBobCat

    Warning due to conflict between Form's Shared Function and its Default Instance

    My project has a "Dialog" Form. Its purpose is to allow user to select none, some or all itens among the content of a default array. This default array with all possible choices must be dynamically generated on runtime. This gets done by function defined into the class of that class. Whenever...
  6. VBobCat

    Mouse Move and Click with Windows API Function SendInput

    Dear folks, I need your help on this. I need to move the mouse pointer to a give x,y coordinate, and then perform a click. I've found several samples of how to use Windows Api "SendInput" function in order to do so, but they're all in C++/C#, which I can't straightly understand...
  7. VBobCat

    Error casting Integer()-typed arrays into Object()-typed parameters

    This may be a silly question, but if I can send an Integer value into a sub/function whose parameter is typed Object, why can't I send an Integer() array into a sub/function whose parameter is typed Object() ? This throws this exception: "Unable to cast object of type 'System.Int32[]' to type...
  8. VBobCat

    Functions and ReadOnly Properties

    This is a theoretical question: When designing custom classes, how should I choose between implementing a Function or a ReadOnly Property? Is there any practical consequence about this choice? What is the difference between them? Thank you very much.
  9. VBobCat

    Doubt on implementing Multithreading

    Hello people, I'll explain this theoretically because I feel I need some conceptual guidance before coding. My application manages bureaucratic flow of paper documents, in order to distribute them to the due personal which has to deal with them. The main user has a huge pile of papers, and he...
  10. VBobCat

    How to clear Sorting of a DataGridView?

    My Form has two data-unbound datagridviews, with the same structure, differing only about which columns are visible. It aims to allow user to select persons from the first one, and add them to the second one. In this second datagridview, some settings are to be made about each person, hence it...
  11. VBobCat

    Debugger doesn't point out errors

    I'm debugging my application, which is wrote in VB.NET At one given point, I made a mistake: I created a DataTable and added a DataColumn with the same name of another DataColumn I already had added before. At another point, I made something like this: I created a Dictionary(Of String, String)...
  12. VBobCat

    Question Event handlers execution order

    If one control has one of its events (for instance, TextBox.Leave) being handled by more than one routine, is it possible to predict in which order these routines will run? Thanks!
  13. VBobCat

    Question Getting array of digits from Decimal

    Hello People, I wrote this function, which performs validation for a sort of Tax-ID number in my country: Private Shared Function vCPF(ByVal num As Decimal) As Boolean If num Mod 11111111111 = 0 Or num > 99999999998 Then Return False Dim Dig As Integer() = (From c As Char In...
  14. VBobCat

    Question Changing DataGridViewCell from DataGridViewTextBoxCell to DataGridViewComboBoxCell

    I have a DataGridView with two columns: The first column's cells are of type DataGridViewCheckBoxCell I'm already able to catch its validation and get its value, whether true or false. Now I want to do something I don't know how (and if) is possible: - If the value of the cell in first column is...
  15. VBobCat

    Question How to identify one given instance from a class when debugging?

    Hello people, I wrote a class that helps me to validate entries on textboxes and comboboxes. The constructor takes the control to be validated as parameter, so the class can handle some of its events. Then, each Form declares so many instances of it as the number of controls that require...
  16. VBobCat

    Question How to cancel class' construction?

    Hello people, I have a class which is constructed by a Sub New with parameters. In this sub, these parameters are used to query a database in search of data that will define new class' properties. Though unlikely, it may happen that the query returns no elements with such combination defines...
  17. VBobCat

    Question Issue passing Now as OleDbParameter in Update Query

    Hello people, I'd like you to help me figure out this. I've added a field to one given table of my database. Its datatype is DateTime, for I want to store in it the date/time of each record's last update. These updates were being successfully done with a SQL "UPDATE TABLE" query, passed with...
  18. VBobCat

    Question Parsing HTML content into a TreeView

    Hello people, I wrote this code in order to parse HTML elements within an HTML document into a treeview, so I can study its structure. But my iteration must have something wrong, for it doesn't recover all the elements. Could someone help me to fix it? Thank you very much! Public Sub...
  19. VBobCat

    Question Where to learn basics on ADO.NET data handling?

    Hello people. I'm working on a VB.NET application that works with an Access Database. This database's file is stored in a network folder, for it is used also by several previous, still-in-use VBA applications, and Excel data connections. That is, I cannot change its location neither its...
  20. VBobCat

    Question How to prevent WebBrowser control from downloading images?

    Is there a way to set WebBrowser control not to download images while rendering HTML documents? That would help to speed up automation. Thank you very much!
Top Bottom