VB Calling Parent Form's Methods In A Usercontrol?

Aug 9, 2009

control that contains a button. the user control is placed on my main form. when the button on the user control is clicked I need to to call a method that is located in the

View 9 Replies


ADVERTISEMENT

VB Calling Parent Form Methods In A Usercontrol

Sep 29, 2010

control that contains a button. the user control is placed on my main form. when the button on the user control is clicked I need to to call a method that is located in the mainform.vb

View 2 Replies

Calling Both Parent And Inherited Methods With The Same Name?

Mar 30, 2012

It's been a while since I've had the time to browse through here, answer questions and ask some of my own. Just got a job at a custom business software developing company! But I do have a question I'd like some clearing up on.

What I have here is 2 classes, one inherits the other. Both function similar so a lot of the methods are the same for each. The one in particular is Reset_Class()

Here is a sample code of what I'm trying to do.. My question is, is it correct?

vbnet
Public Class Form1
Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As

[Code].....

View 6 Replies

Pass A Listbox Selecteditem In Usercontrol To Parent Form?

Oct 19, 2010

I have a user control which contains several buttons and a listbox. Clicking a buttondetermines what items are in the listbox. When a user clicks an item in the listbox I want the selecteditem passed to the parent form.

View 6 Replies

Limit The Default Events, Properties And Methods Exposed From A UserControl?

May 11, 2010

limit the default events, properties and methods exposed from a UserControl so it only displays to the developer the new events etc that I code myself.What i mean is I have created a UserControl with a panel and 5 buttons, written 1 Public Eventonly at this stage, I have placed an instance of the control on a form in a new project, but in the drop down menu that comes up after say (myUserControl1.), there is a massive list of options, I don't want those to appear.

View 3 Replies

Calling Methods From The Tabpage In VB

Jun 26, 2009

I have a tab control on first page of which there is a flexgrid. some functions are called which throughout make chages to this flexgrid. now during runtime I create more tabpages with exactly the same Flexgrid (as in I have named it the same as the first one so that I should be able to call the same functions and the same modifications should happen with this flexgrid as well. How should I call the function so that the flexgrid used is the one on my new tabpage. if I just call the function with the code Call functionname(), it modifies the same flexgrid control in the first tabpage and does nothing to the new ones on the newly created tabpages

View 14 Replies

MDI Child Maximized - The Child Form Shows Maximized In The MDI Parent But Behind The UserControl

Nov 12, 2010

Note: I am working with Visual Studio 2010 Professional. Note: There are a lot of MDI Child posts, but none (that I have found) that apply to my scenario... Scenario I have an MDI form with a UserControl docked at the top. The UserControl is for navigation and is ~50 pixels in height. When I show a child form with its WindowState property already set to 'Maximized', the child form shows maximized in the MDI parent, but behind the UserControl.

[Code]...

View 3 Replies

An Array Of Objects And Calling Their Methods?

Apr 19, 2009

I've been wasting so much time on this. Basically I want to have a list of objects and I want to call some specific methods of some specific bjects..g.MsgBox(Instances(0).Position(0).ToString)It should alert a number that presents the X position, but it is not working... the box does not even appear and no errors.

View 8 Replies

Calling Methods On Interop Objects - VB Vs C#

Apr 7, 2009

In C# I'm calling a function on an interop class (Connection, written in VB6), which itself returns a plain object (System). Then there's a function on that object (InitialiseData) that I also call (even though the compiler isn't aware of it). var isInitialised = Connection.System.InitialiseData(path); The problem is, because that System object is returning a mere Object, I get the compile error "cannot resolve symbol". I can see why, but the same thing works fine in VB.NET:

[Code]...

View 1 Replies

Calling Private Shared Methods?

Aug 8, 2011

I have a form (frmMain) that contains a custom control (con class). frmMain contains a combo box control and when the user selects a value from it, I pass this value to a sub routine within con class (see red line below). This purpose of the sub routine is to populate a set of comboxes contained in con class according to the value that is passed in.

Private Sub cboGuidelines_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboGuidelines.SelectedIndexChanged
If bChanged = True Then

[code].....

View 6 Replies

Calling Shared Methods From .NET Class Library In VB6

Jan 25, 2010

I have the following class in a .NET class library:

Code:
Public Class JasonTest
Sub New()
End Sub

[Code]....

The .AddNumbers call works fine, but the AddStrings call yields the error 'Object doesn't support this property or method'.

Is there any way to call a shared method from .NET in VB6? I was unable to find any documentation on this.

View 5 Replies

Homework - .Net - Inheritance - Parent And Child Both Have ToString Methods? Can Both Be Accessed / Used?

May 28, 2012

I am learning inheritance in VB.Net. A homework assignment asks me to write a base class with a name (String) property and a ToString method that displays the name. It also asks me to create some child classes of the base class and also implement a ToString method in those child classes. Is it possible for me to call the ToString method from both the child and base class?

[Code]...

Again, I am wondering if there is a way to call the ToString() method within the child class and then base class to generate output something like: "Hello VB.Net This is the name"

View 1 Replies

Calling Methods In Non-assembly (non-managed) Dlls Through Reflection In .net?

Dec 26, 2011

I want to use reflection to dynamically call a dll (not an assembly, non-managed, possibly COM object model) in vb.net.I've seen several different methods of calling a method in a dll that is a .net assembly - but I have not found the way to dynamically call a method inside of a dll like user32.dll or winmm.dll. I believe this would be called late-binding?

The reason I'm asking is because I am building a language that will depend on external libraries for lots of different functionality. An example (in this language I'm building):

Declare Function mciSendStringA using "winmm.dll" (strCommand As String, strReturn As String, returnLength As Integer, blah As Integer) As Integer

Declare Function WriteConsoleA using "kernel32.dll" (hConsoleOutput As Integer, lpBuffer As String, numberofcharstowrite as Integer, lpReserved as Integer) As Boolean

When I build the interpreter for the call to mciSendString in winmm.dll, how can I use reflection to handle this? I want the user to be able to reference any dll/method they wish.Can I get some guidance in the right direction? Perhaps even some vb.net code that I can take apart and understand?

View 1 Replies

Calling Methods In Forms From Embedded User Control Class?

Jul 21, 2010

control which will need to be reused in several forms in my program. It basically consists of several buttons in a panel. To start with, what I need to do is get the button values from the control into a text box on the first form. But I don't want to have a method calling the textbox directly from within the control, because then it won't be reusable in my other forms. Is there something I can do in VB like parentform.textbox.append for example, where you can generically call the methods of the form in which the control appears?

View 2 Replies

Calling A Sub And Pass In Parent Object?

Jul 6, 2009

I have a statement that will call a Sub.

Charts(CurChartNo) = Server.CreateObject("ChartFX.WebServer")
Call InitChart()

Inside this sub, I will assign values to the properties of the Charts object that is

Public Sub InitChart()
Charts(CurChartNo).RGB2Dbk = &HC0FFFF&
Charts(CurChartNo).Chart3D = False

[code]....

But the Charts is not recognized in the Sub. This is current program under ASP, I am converting to ASP.Net.

View 3 Replies

.net - RaiseEvent From A UserControl That's Placed On A UserControl That's On A Form?

Jul 11, 2011

I have a Windows Form that contains a custom control container as a UserControl. For the sake of this question, this custom control container is called Dashboard. This container called Dashboard contains numerous other controls depending on their permissions. I need to raise events that are contained on these controls through the Dashboard control and over to the Windows Form.

How can I bubble up the event? I'm using VB.NET for this project, but can convert C# into VB.NET.Also, to complicate matters, the main Windows Form is a VB6 project. So, I'm using the InteropFormsToolkit to accomplish this.

View 1 Replies

Manage The Same Form Through A Usercontrol On The Control Form?

Jul 11, 2011

I have a form that I am managing, works well, but now I am thinking about using a usercontrol embedded in the control form. Is it possible to manage the same form through an usercontrol on the control form? Dont think I phrased that right, say if you had form1 that loads(manages) form2, which I can do, how can I manage form2 with an usercontrol embedded in form1? Is this possible?

View 1 Replies

Mvc - Repository Pattern Implements Methods By Adding Add1 But Should Use Methods Of The Baseclass?

Aug 29, 2011

This is the original code in c#

public class CategoryRepository: RepositoryBase<Category>, ICategoryRepository
{
public CategoryRepository(IDatabaseFactory databaseFactory)
: base(databaseFactory)

[Code]...

Does anyone has an idea what i should change to let it work and let my UserRepository use the methods in RepositoryBase while implementing the IUserRepository?

View 1 Replies

C# :: Call Function From UserControl On ASPX From UserControl On MasterPage?

Jan 31, 2011

I have MainLayout.master that has UC_Menu.ascx on it. I have a page named Customer.aspx that uses MainLayout.master. Customer.aspx also contains a UserControl named UC_Details.ascx.How can I have UC_Menu.ascx call a function that is in UC_Details.ascx with this scenario?

View 3 Replies

2003 Control On Child Form To Create Event On Parent Form?

Oct 28, 2010

Here is the pertinent part of my code:

Public Class Form1
Inherits System.Windows.Forms.Form
Private Sub MenuItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

[code].....

View 3 Replies

Change Startup Position And Move A Docked Form With Parent Form?

Mar 23, 2011

well i successfully docked a perpixel alpha form with the main form(form1). but the perpixel alpha form always appears at the top left corner of the screen and when i move the main form the form(perpixel alpha form) inside it dosen't move it stays at the top left corner. ALWAYS. to dock the perpixel alpha form i used

Me.toplevel = false
Me.parent = form1

View 6 Replies

VS 2010 Sub/Child Form Close When Click On Main/Parent Form?

Jun 5, 2012

i am having some trouble in my Windows form application. i have 2 forms1st Main / Parent Form2nd Sub / Child Form (Menu)

View 7 Replies

Write Text From A Parent Form To The Active Mdi Child Form VB 2010

Jan 28, 2012

It has to be a simple line of code but I do not know how to construct it. Using VB 2010 Express, I have a MDI parent form and many child forms. I want the parent form to determine what child form is active and load data into the RichTextBox1 on the child form. Each Child form has a RichTextBox1. The parent form gets its data by loading a file.

I am close to a solution but just can't get there. You will see in the code below, if I make a direct reference to a specific child form, it works great. What I want to do is to use the Active Form function to determine which form to write to. I have looked at the MS tutorial which gets me close.

Private
Sub OpenToolStripMenuItem_Click(ByVal sender
As System.Object,

[Code].....

View 6 Replies

Communicating Form.vb And UserControl.vb

Jul 25, 2009

I have VB.net Simple application with form1.vb , UserControl1.vb and a simple Dataset with few records included. In my UserControl1.vb I'll added a Bound DataGridView1 with Products Datasource. My question is.. How can i filter the Products table from UserControl1.vb? The Filter Value ("ProdID") is from Form1.vb with textbox1(receive the value.). here is my Form1 code

[Code]...

View 4 Replies

Embed UserControl In A Form?

Feb 19, 2010

What is the code to embed a UserControl in a Form?

View 4 Replies

Simple Form With A Usercontrol

Aug 25, 2010

Description of problem: I have a simple form with a usercontrol on it. There is a drop down box with a list of departments in it and a button, this is all in the usercontrol. I pick a department then press the button to view the employees in a listview for the department picked. All worked fine until I moved the code for drop down and button into the usercontrol from the form.

The data is taken from oracle database express 10G edition and I am using a cursor package (CP) and I pass parameters from the code to the oracle procedure within the CP. One of these parameters is the selected department from the drop down list (which I have picked) and my code does not seem to be picking up this parameter, it keps saying that the bold bit of code below is nothing:

myCmd.Parameters.Add(New OracleParameter("n_dept", OracleDbType.Varchar2)).Value = usr1.cmbDepartments.SelectedItem

Everything else seems to be fine. Because it is not picking up the selected item then the dr.read (no data by the looks of it) is false and it just falls out without populating any employees for that dept in the listview.

Does anyone care to take a stab at suggesting what might be wrong? Why won't it pick up the selected item in the user control I have just picked it in?

View 11 Replies

Call A Form Load Parent Event From A Child Form?

Jun 3, 2011

I have two forms. Form A and Form B. Form A has a datagrid that is populated from a SQL Database Table query. When a button is pressed Form B is launched that allows you to add a record to the database table. I need for the datagrid to be refreshed and show the newly added record when I close form B and go back to the parent.

[Code]...

View 2 Replies

Create New Instance Of A Form That Does Not Close Then The Parent Form Closes?

Oct 28, 2009

I have been making a webbrowser for a while now, everything works well, except i am unable to make the 'open in a new window' button work right. So far i have managed to get a new instance of my form to open with the right url, but i am unable to keep that new form open when the orginal parent form closes.

Code:

Private Sub WebBrowser1_NewWindow(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles WebBrowser1.NewWindow
e.Cancel = True
Dim Href As String

[code]....

View 2 Replies

DB/Reporting :: PopUP Form Refresh Combobox On Parent Form

May 31, 2008

I have a parent form that has a combobox. Whn the form loads I get the data from the db and bind to the combobox. that works fine and here is the code I use in form load to cause this to happen: [code] Now if there is not an Account Type, I have a button that will pull up a small form to allow the addition of an account type. The popup form adds the data back to the database just fine, but I am now trying to get the combobox to refresh its data. So I call a public Sub that is located in the parent form to from the popup form to accomplish this task and I have walked the code and the sub is called and appears to work correctly, but the new data never appears in the combobox. Here is my public sub that i call to try and refresh the combobox on the parent form. [code] But when I go back to the parent form, the combobox is not updated with the new account. How can i get the combobox to refresh from the database with the new data?

View 4 Replies

Open A MDI Child Form Using A MenuList On The Main MDI Parent Form?

Feb 6, 2011

I have a MDI Parent form created with a MenuList, I also have the MDI child form created.ow do I go about using the MenuList to open the MDI child form within the parent form?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved