VS 2010 Calling MDI Child Sub?

Jun 5, 2012

I have a MDIParent Form named "frm_discipulus.vb" which opens a MDIChild Form named "frm_gestionare_cursanti.vb"

Private Sub tsm_cursanti_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tsm_cursanti.Click
Me.Cursor = Cursors.WaitCursor
Dim frm_mdi_gestionare_cursanti As New frm_gestionare_cursanti
frm_mdi_gestionare_cursanti.MdiParent = Me

[code].....

I have tried to call the "Public Sub frm_gestionare_cursanti()" by using the code

frm_gestionare_cursanti.afisare_note_obtinute()

And nothing hapends.Why ?What should i do to refresh the DGV on MDIChild?

View 2 Replies


ADVERTISEMENT

Calling Method Between Child MDI?

Apr 22, 2010

I have a form call form1 which is a mdi tab. Within form1 there is a datagridview and a button. When the button is clicked it will fire a method within form1 to update and repopulate the dgv.

Now my problem now is that I have another form call form2 which I load using .showdialog. Whenever I update the data within form2, it will fire method from form1 and update the dgv in form1. However the dgv doesn't seem to repopulate the updated data.

View 6 Replies

.net - MDI Child Form Calling, Not Generation?

Jul 7, 2009

I have an MDI form with 3 nested children with in it. As of right now all it can do is display a new form.For example: each time I press the menu button, the new child form(Form1) is created. Now, if I press that same menu button a second or subsequent time a new Form1 is created and it appears over the previous one.

What I would like is that each time the event handler is triggered (a menu item_click on the parent form) that instead of a completely "new" child form being produced(a new window popping up) it would instead pull up the appropriate child form that is attached to the trigger.

[Code]...

View 2 Replies

VS 2010 : MDI Child Set Other Child Property?

Jun 9, 2012

I have 1 form as parent MDI (frmParent.vb) and have 2 child form (frmChild01.vb & frmChild02.vb).the code for parent form as per below.

Public Class frmParent
Private Sub OpenChild01ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenChild01ToolStripMenuItem.Click
Dim child01 As frmChild01

[code]....

My problem is how can I set label1.text in frmChild02.vb when user click button1 in frmChild01.vb

View 3 Replies

Interface And Graphics :: MDI Parent / Child - Child To Check To See If It Is The Last Child Object Before Closing

Feb 18, 2011

Im working with MDI parent/child objects. when closing the child objects i need the child to check to see if it is the last child object before closing. i couldn't find anything on google, maybe im searching for the wrong thing.

View 2 Replies

Calling A DLL Using Express 2010?

Feb 5, 2011

I have an application written in 2005 using VB Express. It uses a DLL from a supplier who is now defunct, so I have no idea what language it was written in.I have moved to a new machine running Windows 7 (64-bit) and installed the DLL on it OK (it installed into the x86 folder, so I assume it's 32-bit). The sample program supplied with it runs OK, so I know that it works. However, the application's .exe file which I copied over fails with an error message saying "cannot create ActiveX component".The offending line of the program is:

objCDDeviceManager = CreateObject("CDTextReader.CDDeviceManager")

CDTextReader is the name of the DLL.I've downloaded VB Express 2010, but when I build the program using it the same thing happens.how I can get it to work? I've tried compiling it for 32-bit but get the same result.

View 1 Replies

VS 2010 Calling A Sub In Another Class?

Mar 12, 2011

If I have two classes, one and two:

Public Class One
End Class
Public Class Two

[Code].....

Is there any way that a sub in class one can call the sub in class two?

In other words, I have a main class that instantiates objects from other classes, but I want one of those other classes to be able to 'talk back' to the main class without being polled.

View 5 Replies

VS 2010 Calling An API Function

Oct 6, 2010

Can someone please show me how to call this API function?

View 1 Replies

Calling Method From Class In VB 2010?

Jul 18, 2012

essentially I need to create a class that houses the methods and then call the methods in the form but I can't seem to find out what the right code is to call it. I think there may be an issue with the conversion from a double to a string.

This is what I have for the Class

Public Class Aircraft
Dim Names() As String = {"A-747", "A-737", "C-150", "D-240"}
Dim TakeOffVelocity() As Double = {250, 264, 270, 240}
Dim Acceleration() As Double = {33.5, 44.2, 37.1, 51.9}

[code]...

View 3 Replies

VS 2010 - Calling A Control Not Yet Created?

Sep 11, 2010

I have create a small routine to Generate Tabpages on a tabcontrol, and on each tabpage I have Created a label and a combobox, my problem is that since Im generating them in the code and the name of the two controls change based on an index.. ie. Combobox.name = "cmb" + Index I need to be able to retrieve the selected item from this combobox in order to move on to my next routine.. but I do not know how to reference these comboboxs since there is no pre or defined named for them.

View 4 Replies

VS 2010 - Calling Public Sub On Another Form

Aug 26, 2011

I'm having trouble on calling a public sub on another form. Here is the sub:
Public Sub BOTAO_NUMERICO(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles N0.Click, N1.Click, N2.Click, N3.Click, N4.Click, N5.Click, N6.Click, N7.Click, N8.Click, N9.Click
Dim Res_ant As String
Dim Res_atu As Double
If (Res <> 0) Then
[Code] .....

On form Normal, BOTAO_NUMERICO works fine, but on Cientifica it don't.
OBS: All objects on both forms are the same, with same name.

View 2 Replies

VS 2010 Calling Powershell File

Jun 9, 2011

I'm currently having issues calling a .ps1 file in my vb.net project. The program is supposed to provide a simple way for end users to unlock Active Directory accounts. The vb.net project is simply a text box with a button. Users will type the username of the locked account. When the button is pressed, the program writes whatever is in the text box into a CSV file. The CSV file has a samAccountName column in it. After the file is written to, the program then calls a Powershell script that reads the CSV file and unlocks the account based upon what is in the file.The program does everything it is supposed to except for calling the Powershell script to actually unlock the account. I've tried a Process.Start(filePath) which would open the file, but opened in notepad and didn't execute anything. Right now the program is calling a batch file which is supposed to run the script in Powershell but that attempt also failed.

View 3 Replies

VS 2010 Calling Text When Using Daytime

Feb 3, 2011

So the reason i'm creating this tread is this, i'm programming a app that display the cafeteria opening time and closing time at my school. This program is running as a system tray app which on mouse-on display the opening/cosing time at the tray, also other features but thats not important at this point.

I'm getting the wrong output, a random value from my "regnestykke", at my tray.

My code is this:

vb.net
Public Sub New()
'Opbygning af menuen

[Code]....

View 6 Replies

VS 2010 EXE As MDI Child?

Oct 19, 2010

I'm trying to load an exe made in another language for a project I'm doing into my VB.net MDI parent form, but I can't seem to find anything. I've tried using the SetParent API and the like to try and achieve it, but nothing seems to work. SetParent freezes the parent form completely and makes it non-responsive.

View 2 Replies

Code For Calling Up Microsoft Excel In 2010?

Aug 25, 2010

I am pretty well a novice to Visual Basic 2010 and am trying out the VB2010 express edition. I not the the coding syntax for VB2010 is different from VB6. I'd like well documented code for opening Excel, creating/opening a Workbook, reading and writing data and closing Excel Workbook when I exit the VB2010 form.

I am developing a VB2010 application form which I'd like to work dynamically with an existing MS 2003 Excel spreadsheet that will be provided with the application . The VB2010 form provides some data input for cells in a worksheet (named "Fuels") in an existing Excel Workbook called "carbonfootprinter.xls". Based on the input data, calculations are performed and the corresponding results are output to other cells in the same "Fuels" worksheet. The results are then also graphed in the Excel Workbook. When the application form loads, I'd like VB2010 code that checks if the "carbonfootprinter.xls" exists and is open, if not then it should be opened to receive data input from the VB2010 form and to perform calculations,and finally the VB 2010 application should close the Excel spreadsheet

View 1 Replies

VS 2010 - Calling API From Resource Or External Place

Jan 15, 2011

In a program of mine, I have a resource (which is a textfile). This contains also vb.net code, It is resource which is binded to an .exe, with the mainprogram that I have. So the main program calls the resource, and the resource bind to an exe file.

I have this line:
Declare Function GetProcAddress Lib "kernel32" (ByVal handle As IntPtr, ByVal name As String) As IntPtr
In the source.txt and I want to replace this whole line by a string(or word) which calls this line from somewhere else. For example in another source.txt. A textbox is not possible because this is not a vb form, but a .txt-file. Maybe I can create another resource, which IS a vb.net form, call it or something? In this case. I can create a textbox with this line that I gave above, And I can use it by: textbox1.text.

View 2 Replies

VS 2010 Calling A Function And Adding Marks

Jul 6, 2010

In the exam paper, student have to check the checkboxes [usercontrol does not work] whether the question is correct or wrong.Now as I have hundreds of questions, I cannot write the same code again and again with the IF conditions, is there anyway to make it a function or something then call it whenever is needed.As well as I wanted the marks to be added when a student submits the paper.

View 5 Replies

VS 2010 Error Calling A Control From Another Thread?

Feb 20, 2012

A thread listens for incoming information from a server will add the received string to a custom control (containing a textbox and a listbox, I've called it console). This requires an invoke so I used the following

Dim InvWriteCons As Console = Gary.ChatCons
Dim INvWriteText As String = "DEFAULT"
Public Sub InvWrite(ByVal cons As Console, ByVal message As String)

[code].....

View 2 Replies

VS 2010 PInvoke Stack Imbalance Calling C++ DLL?

Aug 30, 2010

I've got a dll, written in C++ (which I have the source code for and have compiled it under VS2010)It has a function I want to call in VB

SHARED_FUNCTION int yasdiMasterInitialize(const char * iniFile,DWORD * pDriverNum );

I've declared it as follows:

<DllImport("yasdimaster.dll")> Public Function yasdiMasterInitialize(ByRef IniFile As String, ByRef DriverNum As UInt32) As Integer
End Function

as when I try and use it as follows I get a pInvoke error:

Console.WriteLine("Initialise:" & yasdiMasterInitialize("yasd.ini", Drivers))

From reading around this is something to do with the declaration but I don't know what to change as this is the first time I've tried calling a DLL.

View 2 Replies

VS 2010 Calling A C/C++ String Search Function From A VB Thread

Mar 30, 2012

I created a STRING SEARCH function in C/C++ - and I'm trying to use it in a multi-threaded situation in VB. I started this problem in a thread in the C/C++ section of the forum - here [URL] my last post shows me getting this error trying to call the function. Ran the code - got to that point - and in the immediate window I did

[Code]...

View 4 Replies

VS 2010 Calling An External Application And Setting Focus On The Same?

Oct 8, 2010

I am wondering if it is possible to call an application, say "notepad.exe" (among other application's that are already open) and setting focus on the same, so the user can readily start working on it.

View 6 Replies

VS 2010 : XML Child Nodes 'loops'?

Jun 1, 2011

I have a bunch of XML's that need to be put into an SQL database. One XML represents all orders for a certain department of a store. The problem (for me) is that in one XML there can be (and are) multiple orders (called distributions in my case.) The XML looks as follows (truncated):

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<order><process_id>322867</process_id>
<key1>RET</key1>
<key2>40_134985</key2>

[code]....

So in this example I have two 'distributions'. Now I can get all data out of the XML fine, which I do like this:

get xml data
awsFeed = XDocument.Load(fileName)
Dim orders = From order In awsFeed...<order> _

[code]....

However, in this case my SQL input would have to result in 2 entries, because there are 2 orders. Both entries would have the same data, except for different entries. I know how to post to SQL, that's not the problem. My real problem is, how do I 'loop' it through the XML. I think i'm looking for something like:For each 'distribution' in orders -> put into array.Or something like that. After that I could query the array and put it in the database.

View 5 Replies

VS 2010 All Child Controls Disappeared?

May 17, 2011

In the project I'm working on, I was editing a class and when I got done, I clicked save all. I moved on to my main form's designer. When it came up, the custom tab control I have on the form was blank. There used to be a ton of controls in it, so I am extremely confused about where everything went.I checked the properties window and it thinks everything is still there:ut when I check the Document Outline window, everything is gone. The tab control is still there, "AVERT Wizard", but all of it's child controls and tab pages are gone.

View 2 Replies

VS 2010 MDI Child Form Focus?

Jul 22, 2011

I have MDI application and couple of child windows...This is how I'm opening one child window

Private Sub Membe*******tripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles Membe*******tripMenuItem.Click
Dim members As New members
members.MdiParent = Me

[code]....

My problem is that I dont have an idea how to check is that form already opened and if it is simply to focus it... Now I can open as many as I want same forms (on the picture this are couple same child forms, what I don't want...So I need simple check is this child form opened and if yes focus it?

View 3 Replies

VS 2010 Open A Child Form?

Dec 7, 2011

I have a form that opens in full screen, like this:

Public Function setFullScreen()
With Form1
.MaximizeBox = False
.MinimizeBox = False
.TopMost = True

[Code]...

I want to make a button that will open a form (show it), but show it on the current Form1, and that it wont be able to elave the borders. When I open it, It doesn't show it ON the form1. How do I do it?Another question is ... How can I prevent users from quitting the application by ALT F4, And also prevent them from using the computers functions like Task Manager, ALT Tab,

View 1 Replies

VS 2010 Using The Same Event For All Child Panel?

Nov 9, 2011

I'm a bit confounded about how to proceed. I'm creating some kind of gameboard for a friend of mine. I have a splitpanel and the game grid will appear in the 1st panel. I put a panel with a 100x100 square in tile background format. called it gridpanel.i want that when I double click on gridpanel, a semi-transparant picture box frame (called Target) appears on your grid-square. I handled it like this :

Private Sub Targetting(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles gridPanel.MouseDoubleClick
If yourTurn Then

[code].....

View 2 Replies

VS 2010 Borderless Child Maximized Still Has Controlbox

Aug 11, 2011

I have an MDI parent form and multiple child forms. Child forms are borderless and set to start in the maximized position because I want the forms to completely fill/resize within the parent form and only display the selected form, one form at a time.

Problem I have is whenever I load a form it puts another bar at the top of the screen and another control box. Is there any way to get the child forms to load in maximized state without this bar? I tried .controlbox = false and it gets rid of the control box but the bar is still there.

View 2 Replies

VS 2010 Nested MDI Parent/Child Forms?

Mar 3, 2012

I have a MDI project that has a parent and several children forms. In some of the children forms I would like to make one of the forms to be a parent form with children. On this child form I wanted to make a tabbed MDI, which I can do, but I have found out that I can't make a child form a parent, from what I have found.

Is there any way to get around this? (As in nested MDI forms.)

View 1 Replies

VS 2010 Parent-Child Form Using DataGrids

Aug 5, 2011

I am trying to create a simple parent-child form in VB2010. I use a datagridview for each table/datasource and each is bound to the parent/child table and each table grid fills correctly. What I want is the parent-child relation to enforce filling the child table with only rows that fulfill the current row on the parent. I have created a DataRelation in the form load, but it will not permit a relation between tables in 2 different datasets. If I attempt to place both tables in a single dataset and define the PK-FK relation in the SQL Server I cannot create 2 separate datagrids from the same dataset.

View 2 Replies

Creating A Parent-Child Window Form In VB 2010?

Aug 4, 2011

I am trying to create a simple parent-child form in VB2010. I use a datagridview for each table/datasource and each is bound to the paretn/child table and each table grid fills correctly. What I want is the parent-child relation to enforce filling the child table with only rows that fulfill the current row on the parent. I have created a DataRelation in the form load, but it will not permit a relation between tables in 2 different datasets. If I attempt to place both tables in a single dataset and define the PK-FK relation in the SQL Serve,r I cannot create 2 separate datagrids from the same dataset.

View 12 Replies







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