VS 2008 .NET Child Form Controls Method Calls?

Sep 14, 2010

I have a MDI Form that has a child form containing a text box. I want to be able to make a call to the TextBox's cut() method on the currentlly active child form. Here's what I have so far, but it is complaining about using ctrl.cut()

[Code]...

View 3 Replies


ADVERTISEMENT

VS 2008 - MDI Child - Controls Move Up The Form At Runtime

Jul 29, 2009

I have an MDI application which uses fixed sized forms. I've started to change the forms to sizeable and anchored the controls so they move when the form is resized. If the child form has a menu this jumps onto the parent menu (as it always has done) but all the controls move up the form at runtime and leave a space at the bottom of the child. If I change the form in design mode to cut through the bottom controls i.e. so the form doesn't appear tall enough, it corrects itself at runtime. Is there another workaround as it looks misleading in the designer.

View 3 Replies

VS 2008 Mdi Form Controls Are Visible In Child Forms

Feb 12, 2010

i use a picture control in mdi form .. but when i load child froms then mdi form picture are also show in front of child form...

View 7 Replies

How To Make Thread-safe Calls To Windows Form Controls

Sep 20, 2011

[URL]

In my program, I created a list of a class that contains 5 picture boxes, a button, a label, an identifier, and some other stuff. I've got roughly 65 of these in this list. I'd be stupid to hard code all that in. The identifier is a 2nd way of identifying which specific location I'm working on.

Anways, all this is created at compile time. Works perfectly fine.

I then manually start a background worker that pings a collection of components. Based off the success of those pings, the picture boxes are enabled or disabled. Basically a proactive way to see if a collection of devices over multiple locations are actually working.

It's the background worker that fails because of thread-safe calls.

Private Sub bgwStatus_DoWork(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles bgwStatus.DoWork
Dim status As Integer

[Code].....

View 1 Replies

Controls Not Return All The Child Controls For The Form?

Apr 15, 2010

I have a slight problem With an enumaration of child controls on a form. The following code will not get but about have the controls that are on the form. The controls show that the count is correct but when it goes through the loop it skips over some of the controls. If you run it through the enumeration two or three times it will get all the controls a few at a time. The solution uses two forms, one that has the controls and the other that labels are made and displayed on. The Tx is just a index to add a number to the label.name and rename the label. So each label is identified seperately. This works for all the the controls that are seen in the for each loop.

View 11 Replies

MDI Child Form Call Method From MID Parent Form?

Dec 7, 2009

I have two form :

class form1 'parent form dim number as integer

public sub create ()
dim f2 as new form2
f2.MdiParent = me[code]....

In form2.vb how to use variable number and method test

View 3 Replies

Forms :: Mdi Call Active Child Form Method?

Aug 20, 2009

I'm trying to call a method defined within a child form from the menu strip of the parent form when the child form is active.

View 1 Replies

Adding Controls At Runtime To Child Form?

Jan 27, 2010

Updating a VB6 prog in VS2005 on Windows 7. The prog has an MDI + child forms and there are a number of content types, with varying numbers of controls being set up and positioned from setup files.On forms which are not child forms I can easily add controls at run time like this:

Dim lab As New Label
With lab
.Left = 0 : .Top = 0
.Width = 800 : .Height = 800

[code]....

This doesn't work on a child form, no label is visible. Can't see any obvious problem in quickwatch.

View 2 Replies

Adding Controls To Child Form At Runtime?

Jan 27, 2010

Updating a VB6 prog in VS2005 on Windows 7. The prog has an MDI + child forms and there are a number of content types, with varying numbers of controls being set up and positioned from setup files.On forms which are not child forms I can easily add controls at run time like this:

Dim lab As New Label
With lab
.Left = 0 : .Top = 0

[code]....

This doesn't work on a child form, no label is visible. Can't see any obvious problem in quickwatch. Is there some known reason for this or do I just have a wierd bug?

View 6 Replies

Making Controls Resize With The MDI Child Form

Jan 23, 2011

Does anyone know how to make the controls on an MDI Child form resize along with the form itself? I inherited a project from another developer and I was asked specifically to make the form resize. With advice I received on this forum I now have the form resizing as expected. It will minimize, restore and maximize as well as resize with the mouse pointer.

The problem is that when I increase the size of the form all I get is more blank space on the screen. The controls to do change at all. Although I thin this is normal behavior for a Windows form my bosses all seem to think that the controls resize on every other widows for they see. I wondered if anyone had successfully accomplished this. I was already advised to write a FormResize handling subroutine and this unfortunately did not work.

View 10 Replies

Controls On MDI Form To Display Child Form?

Apr 15, 2010

I took picture box and some container controls on my MDI form but when I am opening my child forms it going to backside of my MDI forms controls.

How can I resolve this issue because I cannot remove my controls from my MDI form but at the same time I want to use my child form worked properly.

View 1 Replies

Mdi Child Maximize, Form Tiling And Alignment Of Controls?

Jun 22, 2010

my project is on the verge of completion and a large part of the credit goes to daniweb.now m stuck with a very annoying problm. ive googled the whole day but to no avail.m using visual studion 2005 and access 07.ive clubbed these three problms together cause i thought they might be related somehow...

1) i want the mdi child screen to be maximized. but on the first attempt only the control box goes to the top rite corner. however on the 2nd attempt it gets sorted out.ive tried to set the initial state to maximized but with same result. please help

2) whn the form loads it gives this tiling effect.. like the effect a tube light gives whn it is switced on...which is very annoying.
ive search for the result and some recommended to change the resolution of the user screen which is not acceptable to me.cant i change the resolution of my application depending on the user's resolution.

3) whn the form is maximized i want its user control or contents to change their alignment accordingly...anchor property only changes the size however the ideal thing will be to change the controls position w.r.t the container or form...

View 1 Replies

Change The Size Of Child Form And Add Controls From Parent In A Showdialog Mode?

Mar 17, 2012

I have an outlook application, whenever the user receive a new mail I show him a form and some controls

The user needs to insert information and close the form. Sometimes the user is not near his machine so whenever there is a new mail I am adding new controls and modify the child size.

It has been successful using the Form.show() method but not in showdialog() i cant add controls and change the form size can someone please help on the subject?

[Code]...

View 8 Replies

Set Up For Multiple Calls Of Same Method?

Jun 24, 2012

I have problem setting up the mock to fail if the user has attempted to log in three time with failure. My code looks like this[code]...

View 2 Replies

Get Name Of Current Class Which Calls Method?

Jul 24, 2009

I need to get the name of curent class which calls the method (which parent is another class) from inside of that method. Is it possible in vb.net?

View 6 Replies

Dynamically Remove Method Calls At Runtime?

Jan 24, 2011

What's the best way to dynamically remove method calls at runtime? Essentially what I'd like to do is pass a parameter to my application. Let's call the parameter level. Depending on the value of level, I'd like to essentially remove all the calls that have higher levels. I have the following but was wondering if there were a simpler/cleaner way to remove the calls:

Ideally I'd really like to write something like:

Log5("message")

And just have Log5 work or not call if it doesn't exist. My goal is to actually remove the call. The overhead for calling level 5 logs that test and return is fairly high and I rarely use it.

Module Module1
Delegate Sub Log(ByVal message As String)
Public Log1 As Log = Nothing
Public Log2 As Log = Nothing

[Code].....

View 4 Replies

Switching Byref To Byval On Method Calls .NET?

Mar 1, 2010

Switching Byref to Byval on method calls I have many warnings raised due to: "Implicit conversion from xxxx to yyyy in copying the value of 'ByRef' parameter zzzz back to the matching argument."

My feeling is that it would be safe to change the function parameters from byref to byval as nothing special is being done with the reference type pointers inside these methods the reference types are simply being used and I think the behaviour would be exactly the same if running with a copy a pointer rather than the original.

Another consideration is that I have two classes which inherit from a base class. The same situation is occuring in that the byref params are causing implicit casting from the base class to the narrower concrete class. Again I can't see any problems with this code running byval either.Does anyone have any tips regarding use of parameters in functions when dealing with reference types?

Some of the other things that are currently being passed around byref in my project are database connection objects i.e. OracleConnection and SqlConnection. Is there any good reason for passing these around byref?

[Code]...

View 1 Replies

Tool To Extract Sequence Of Method / Event Calls For NET?

Sep 15, 2010

When i run the application i need to extract the information about the sequence of methods or classes the application touches when any event is performed on the application.

Is any there other tool other than profiler?

View 2 Replies

Possible To Get The Name Method Of That Calls Another Method?

Mar 24, 2009

This is what I am talking about:

Public Shared Sub Test1()
Test2()
End Sub

[code].....

View 4 Replies

Thread Safe Calls On Forms Controls Array

Jun 2, 2012

I am trying to access a dynamically generated Control from a separate thread. But I am always getting a "Stack Overflow Exception" with my code. I am using following code:

[Code]...

View 1 Replies

Winforms - .NET 2.0 - StackOverflowException When Using Thread Safe Calls To Windows Forms Controls

Sep 22, 2011

I have a Windows Forms app that, unfortunately, must make calls to controls from a second thread. I've been using the thread-safe pattern described on the [URL].. Which has worked great in the past.

The specific problem I am having now: I have a WebBrowser control and I'm attempting to invoke the WebBrowser.Navigate() method using this Thread-Safe pattern and as a result I am getting StackOverflow exceptions. Here is the Thread-Safe Navigate method I've written.

[Code]...

View 1 Replies

Unable To Place A Label Box In The MDI Parent Form And Then Open A Child Form The Label Box Highlighted In Child Form?

Dec 15, 2011

I have an issue when I place a label box in the MDI Parent form and then open a child form the label box highlighted in child form?

View 6 Replies

VB 2008 - Change Child Form Combo Box From MdiParent Form

Feb 23, 2010

In VB 2008, I have a Parent form with a combo box on it. There is a child form also with a combo box on it. I want to be able to change the values on the child form based on what the user selected from the main form. The user launches the child form from a toolbar on the Parent form. The following code is run:

[Code]...

What I want to do is if the Parent's combo box has "Red", "Blue", "Green" values and the user selects "Green", the child form's combo box(With the same values) will also change to "Green". (I do not need to change the Parent form if the child form changes.) I've tried changing the Child's combobox from the combobox's change event on the Parent form, and the code runs, but nothing changes on the child form.

View 5 Replies

VS 2008 Populating Cbobox On Form Load For A Child Form?

May 14, 2009

i am having an issue populating two combo boxes on form load. The program will connect to an access database and pull data as instructed. Then as it pulls each record it puts it into the combo box.

This was working.. atleast i think it was. i dont recall it ever not working, however i wasn't looking for it.

My problem is that if when i load the MDI parent form and have it skip the selection form and the login form and load the next form in the sequence, it loads everything perfectly. However if the select form is loaded first, then the login form and then the form i need loaded, it will not populate. The only difference between the two different loads is that the login form calls a function that loads the form as a new project.form

I did this so that I can have multiple forms open at a time. I am assuming my problem is that I need to get the child forms handle then populating controls using that handle? but i think if I had to do that then I would beable to populate the comboboxes on the first form load using the login method of opening the form.

Here's my code.

vb.net
Private Sub frmLine1t5_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.Text = "Line " & LineNumber & " Test Form"

[Code].....

View 20 Replies

File To Open As Mdi Child Form / Save From Child Form

Nov 17, 2011

I have a MenuStrip with File > New, Open, Save, Exit located in a parent form, and a RichTextBox located in a child form.The problem I'm running into is concerned with the destination of the file elected from "Open" and the save.When a user selects their file from "Open", I need it to open the child form and put the text into the RichTextBox.I also need the program to be able to "Save" from a child form, whether it's been brought up via "New" or "Open".

View 3 Replies

Win32 API - Equivalent To Making System Calls Abd And Library Calls In UNIX?

May 8, 2010

What the Win32 API is? I have looked around but no where really outlines what it is. Is it basically a set of procedures, outlined by Microsoft for programmers in order to get services from the operating system? In essence is it the equivalent to making system calls abd and library calls in UNIX? And yes I now Windows makes library calls too.

View 2 Replies

VS 2008 Making A Form To Child Form

Sep 28, 2010

1) I m very new to VB.NEt 2008. I have placed a MDI Form in my project and a Form too. I want to make the form to a Child Form of MDI. is there any property or how can it possible.

2) I want to set the lable back color to Transparent but found no property.

View 6 Replies

Method Calls On Objects That Aren't "Guaranteed" To Be Instantiated?

Sep 10, 2010

I recently wrote a section of code wherein upon finishing, I received a warning from the compiler telling me that one of my variables is being used before it is assigned a value. In practice, the method call on this object will never be made without the object being instantiated beforehand. Here is the snippet of code

Try
fs = New FileStream(fileName, FileMode.Open)
Dim PolarMatrix As PolarMatrix
PolarMatrix = DirectCast(bf.Deserialize(fs), PolarMatrix)

[code]....

I assume I'm receiving this warning because the first line in the Try section may be the line to throw the error, and the Object will never be instantiated. FileName though, is a variable being passed to this method which has already been checked for errors, so it is guaranteed to be correct. The error I'm expecting to perhaps be thrown comes during the deserialization.

So my question: When warnings are given on objects that the compiler thinks may not have been instantiated, does this overrule the user knowing that a problem will never arise on that line? Is it sometimes necessary to add code simply to appease the compiler?

View 1 Replies

VS 2008 A Child Form On Top Of The Other?

Apr 3, 2010

I've got an MDI vb project with several child forms. Now I want each child to be placed on top of the other open childs when I create it. In simple words, I don't want it to hide behind the other open childs.

View 6 Replies

Call A Method That Compute Some Data That Method Is On Another Form In Windows Form Application?

Mar 17, 2012

i want to which way is better when concentration is on processing speed. i want to call a method that compute some data that method is on another form in my windows form application then what you prefer is better way 1) to call that method in another form and use returned value or create similar method in form where it is required.i want to make it's processing fast.

View 3 Replies







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