VS 2008 MDI Multiple Instance Of Same Form?
Mar 24, 2010
I am in the process of trying to build an app that will permit multiple instances of the same form be added to an mdiparent as seperate mdichildren. The reason for this is that the child's data is based on a sql table's row information. Thus child one shows requested data from row 1, child two shows requested data from row 3 etc.
I have this setup so that each child is its own seperate tab in a tabcontrol. My problem is that after the second instance of the child is created the form in the first tab is disappearing after the line:
child.midparent = me
I don't understand what is causing this.
Dim child As Form = Support
Dim tab1 As New TabPage
child.MdiParent = Me
[Code].....
View 3 Replies
ADVERTISEMENT
Feb 8, 2012
creating single instance form in MDI Application. How to check whether form's instance created or not?
View 6 Replies
Jul 15, 2009
I have a form template on my IDE, I want to open a new instance of it depending on what button is clicked, how can I do this?
View 18 Replies
Jun 25, 2009
in Old vb/VBA, I am accustomed to doing THIS when I instance a form object (as in "pop-up"):
Private WithEvents SomePopUpForm As Form_PopUpForm
Private Sub cmdEdit_Click()
Set SomePopUpForm = New Form_SomePopUpForm
SomePopUpFOrm.Visible = True
End Sub
[Code]...
View 5 Replies
Dec 8, 2009
I have a form that creates an instance of a New Class. The code is simple so there is no issues with the programming.
I can step through the code on the Main Form without issues. Stepping Into moves from 1 line to the next.
I can't seem to debug the code within the class though. I set breakpoints but "stepping into" doesn't work. The code gets executed, but it doesn't step through each instruction.
I've tried changing many of the options within Tools > Debug with no luck.
I've tried deleting files from bindebug and obdebug.
Not being able to debug my programs.
View 6 Replies
May 19, 2009
I have a Parent form that loads a child form and I only want to allow one instance of the child form. I have this on the button to open the form. Stepping through the code with the debugger it "appears" to work OK when the form is open (I say appears because nothing changes) but when the form is closed it doesn't open as I would expect. What am I missing?
[Code]....
View 6 Replies
Oct 19, 2010
I developing a windows application. i dont want to allow multiple instance of the application how i will achive that?
View 1 Replies
Jun 28, 2011
There are 3 project in vb.net MAIN PROJECT, BLL(Business Logic Layer), DAL(Data Access Layer) now we are trying to maintain one single instance of some values through out the assembly or what we can called single instance should get used in all projects...for example there is a class called clsParameter we need only one instance of this class should get used through out all projects so if i made any change in MAIN PROJECT same values also get updated in BLL or BLL should receive same values....
View 3 Replies
Aug 29, 2011
I don't know how to do this and I've googled this to death.
View 2 Replies
Jul 14, 2009
I need to be able to run multiple instances of a standalone (3rd party) application. This application prevents multiple instances from being ran from within the application. I need to basically override this.
I know it can be accomplished by hexing the original executable, however I would like to stay away from this method as I'd like for other users to be able to use my application from the get go without needing to hex the 3rd party app themselves or me having to send them the hexed app. Is there any way to achieve this or am I just taking crazy pills?
View 2 Replies
May 4, 2012
I will know how do I work with the opened excel instance, when I use multiple userforms. I have on my form1_load open a excel file. Then I observed that on my next userform, was unable to write to that file again. Project have no instance of APP.workbook.
View 8 Replies
Sep 22, 2011
I am facing a problem in VB .net Client/Server application where I am successfully able to talk between them using TCPListener and TCPClient class usage. However, when I try to connect another Client to the same server on the same welcome port, it errors out throwing an exception or behaves very unexpectedly.Isn't it true that the Server connection is on a WELCOME PORT for all the clients, and that each client connected gets a new port to carry on its communication with the server AUTOMATICALLY (according to the Tomcat webserver working)
View 2 Replies
Dec 13, 2008
I have set the "Make single instance application" check box.And when my application version is 1.0.0.0 for example, it is OK and won't load multiple instances.But when I create a new version, for example 1.0.0.1, then I can run 2 instances of my application, when the 1st instance is 1.0.0.0 and the second instance is 1.0.0.1.What should I do to prevent this?
View 2 Replies
Jul 22, 2010
I am using this:
Dim oFile As System.IO.File
Dim oWrite As System.IO.StreamWriter
oWrite = oFile.CreateText("e: est.txt")
oWrite.WriteLine("TEST")
oWrite.Close()
Which works, but I would like to have it so instead of creating test.txt it names the document using multiple input text instance.
View 2 Replies
Aug 30, 2011
I have 30 instances of the same form running. Video array with different video on each. Each form is named "oneForm". I'm looking for a way to close all forms with one click. I have found that I can hide the forms no problem like this.
for each killfrm as form in my.application.openforms
if killfrm.name = "oneForm" then
killfrm.hide()
[code].....
View 4 Replies
Jan 15, 2009
Within the subroutine, I am counting the number of open Forms and dividing the bounds of the screen by the number of open forms everytime a button is clicked.his gives me a way to Size each video box perfectly according to the number of forms open.This is where I have found a problem. The size of the new window only sizes the newly opened on and will not resize the ones that are already open. I will give an example of my subroutine.Note: Because of the nature of my program, I am not allowed to take any code out of the work zone and so I will be summarizing what I am doing rather than showing the actual code.
Private videoShow (byval videoName, byval videoIp)
dim videoForm as new form
videoForm.size = New Drawing.Size
[code]......
View 11 Replies
Feb 11, 2009
I'm trying to set up a system to resize multiple objects on a form (40+) when the form resizes. I've got it working but it's rather slow, when I resize the form it stutters a lot from looping through the objects to resize them. Is there a better way to do this that would not cause the stuttering effect?
View 10 Replies
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
Nov 10, 2010
I have a form that I will be using to keep track of data for computers I build and will eventually link into a database for configuration management, but for right now I'm just trying to get the basic form layout done and functional. I need this for to be customized for each job I do, that means I can have multiple computers, PC card, peripheral equipment, etc. So with that said basically what I have done is created a user control for each separate item that I want to add (i.e. computer, PC card, etc) that has all the fields and functions I require. When I want to add another computer I just add a tab and place my "computer" user control on it, no big deal...
My issue is when I want to add my "PC card" user control to that "computer" user control. What I am trying to do is to add the first user control(PC Card Info) I created under a button called "Add New PC Card" (which is part of the "computer" user control.)and that part works! What I want to do is keep added as many "pc card"user controls as I need and basically keep appending them under the last control on the bottom of the page (which is the "pc card" user control, that is a groupbox with a few drop down boxes and text boxes in it.)with a little spacing between them. The biggest problem I am having is when I add the first "PC Card" user control, it works.. but when I try to add another one and search the current page for all user controls under a certain point or with a specific name, I don't get any results.
I think I'm on the right track with the following code but I am running into 2 things I can't do that are critical to my needs. 1: I need to define the text of the user control I just added so I can uniquely identify it, so If I need to remove it I can and will also play a role later( I thought if there was some way in code to make my control # a variable that may work) 2: I need to know what to look for since I have a count that represents how many of that particular control exist on my form, that way I can name them properly, this will also allow me a method to delete the user control if desired.
Dim pccard As New PC_Card
Dim x As Integer
Dim name As String
[Code].....
View 3 Replies
Jan 28, 2009
After making the changes or adding a record I use invoke childmethod from my toolbar to call these subs. The first table updates and adds, but the second does not. I have set all of my textboxes databindings and double checked them. I get no error, but it does not update the second table. What am I doing wrong?
Public Sub AddRecord()
'Clear out the input data fields on a new Add.
ClearInputFields()
[code].....
View 2 Replies
Oct 5, 2010
I'm trying to figure out the best way to reference a control on a form from within a module. Unfortunately the form is just an instance, so it's not as easy as calling form.control...
Dim ChildForm As New frmSearch
' Make it a child of this MDI form before showing it. '
ChildForm.MdiParent = Me
ChildForm.Show()
That form has an option for printing, which calls another form where certain options are chosen. The print form in turn calls a function in a module, which tries to reference back to the origional form.
childform as new frmSearch -> frmPrintForm -> sub okToPrint (in module Print)
okToPrint tries to reference a listview on frmSearch, but can't find it.
For Each itmX In frmSearch.lstResults.Items
So the solutions I can think of off the top of my head are:
1. Somehow divine which form is the caller of frmPrintForm
2. Pass ChildForm to the frmPrintForm as a variable to be passed on to module Print..
3. Use frmSearch directly instead of using an instance of it.
Number 1 would be my preference, as I don't want to have to pass forms around like that.
View 4 Replies
Aug 31, 2009
I am developing a program and stuck up with an issue. I am able to enter single value in MSAccess database however, when I create a programe to enter multiple entries I am getting an error. developing a code to enter multiple entries in MSAccess 2002 db with the help of VB based form?
I Following code I am using for single entry:
Private Sub Button1_Enter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Enter
Dim query As String
[code]....
View 1 Replies
Jul 27, 2009
Ok I have a project which has a MDI parent. Inside the parent I have multiple isntances of a form load(frmLine1t5). When my program loads it will load a different form(frmSelect) and if I manually load a different form(frmRetests) I can put frmSelect on top of frmRetests and bring one another to the front if it's clicked on(without using the bringtofront method)However as soon as I load a single instance of frmLine1t5 I immediately can no longer bring ANY form loaded into the MDI parent(before or after frmLine1t5 has loaded) to the front. I can only bring them to print IF I use .bringtofront method
View 1 Replies
Jun 21, 2010
I have so many form in different module in one solution. I already instantiate a new Form as a global variables in my parent form. Then, call the code
frm.show()
in my button1 event
View 6 Replies
Sep 2, 2009
I have program requirement, I need to call an existing form to an MDI form by using a new form button and when I click it of course it will show my existing form, but I want is to create a new instance of the existing form, which make the the other forms different from one another inheriting the controls of the form I called. What I mean is I can create many child forms inheriting the controls of the existing form I called.
Dim newform as new System.windows.form
'this the function will call when on click the new form
Public Function newform()
[Code].....
View 4 Replies
Jul 7, 2011
I have a form with a button. I want the button to show a new instance of the same form but I don't know what to do. I'm working in vb.net 2010
View 3 Replies
Jan 15, 2011
there is The (Name) property, which represents the name of the Form class.This property is used within the namespace to uniquely identify the class that the Form is an instance of and, in the case of Visual Basic, is used to access the default instance of the form.
Now where this Default Instance come from, why can't C# have a equivalent method to this.Also for example to show a form in C# we do something like this:
//Only method
Form1 frm = new Form1();
frm.Show();
But in VB.Net we have both ways to do it:
//'First common method (used slash because editor wouldn't format it properly)
Form1.Show();
//'Second method
Dim frm as New Form1();
frm.Show();
1) My question comes from this first method. What is this Form1, is it an instance of Form1 or the Form1 class itself. Now as i mentioned above the Form name is the Default instance in VB.Net. But we also know that Form1 is a class defined in Designer so how can the names be same for both the Instance and class name. If Form1 is Class then there is no (StaticShared) method named Show().So where does this method come from.
2) What difference they have in the generated IL
3) And finally why C# can't have an equivalent of this.
View 2 Replies
Mar 15, 2007
I have windows application and a form. If I open a form named "DetailForm" from main form named "Main1" by clicking the button, it should open only once. The problem I am having is, it is opening many instance of the form every time you click the button.
View 8 Replies
Jan 19, 2011
I then have an iteration (For Each loop) which lists all of the OUs on our site (set by the filter property). The issue here is within my treeview it lists everything without mimicing the AD structure we have.When searching on this it seems i have to change the search path to be one below the current OU and add it to my child node. I believe the search path is held in my RootDSE??, but when i look for the distinguishedName and try to pass that in i receive an
View 1 Replies
Aug 2, 2010
this might be a really dumb question, but if someone could enlighten me I'm writing a Winforms application in VS2008 vb.net.The application starts with a main form. I've got a status bar at the bottom of the main form, indicating the application status. I've got a 'SetAppStatus' method on the Main form.
I'm writing a class that needs to update this status. So in the class I'm Importing the Main Form. But I don't know how to call this SetAppStatus method because I don't know what the instance of the main form is called Plus am I doing this the right way? I'm still grappling a bit with how .NET all fits together and it can get a bit baffling :)
View 10 Replies