MainForm And ChildForm TopMost Activated/Deactivated?

Feb 24, 2011

I have 2 FormsOne is my mainform, one is a "child" form.The childform has no control box.he mainform has a toggle button to show and hide the childform.

Private Sub ButtonShowHideChildForm_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonShowHideChildForm.Click
If ChildForm.TopMost Then

[code]....

View 1 Replies


ADVERTISEMENT

Redraw When Form Is Deactivated?

Jan 20, 2009

We are using a ribbon control from a 3rd party that has a bug. When you click on another app, fragments of our software still shows on the screen. The company that makes the ribbon is working on a patch, but I would like to get the app working while we are waiting. how to force windows to repaint the client area behind the form when the form is deactivated?

I've searched and been reading through posts, but most everyone wants to repaint portions of their app. I want windows to redraw what should be there when my app isn't in front anymore.

View 1 Replies

Values Deactivated In A Combo Box At Runtime?

Aug 10, 2009

I am working with Vb.net and have a form with a combo Box. On load the form is loaded with one of the following details depending on what is stored in the database; Cancelled, Processed and Failed.

Code:
TxtColStage.Items.Add("Cancelled")
TxtColStage.Items.Add("Processed")
TxtColStage.Items.Add("Failed")

Then I have an update button and when the user drops down the list he/she can select between Cancelled/Processed/Failed. I want to be able to grey out or disable Processed and Failed, so that when the user updates the field he/she can ONLY update with the Cancelled option ONLY.

View 1 Replies

Making The Second Topmost Window The Topmost Window?

Oct 18, 2009

I am making an app that hides the topmost window, but when i do this, it leaves no current window selected. how can i make the highest unselected window selected?

View 2 Replies

BindingNavigator Position In Childform?

Mar 23, 2009

I have a bindingNavigator and some textboxes connected to the bindingsource, in a childform, a form inside another form.I have a third form, a search function, and I need to change the bindingNavigator Position, when I choose a number in my "search" form.I have some code in my "Search" Form, but I caannot get it to update the bindingnavigator in my child form:

Dim IndexNumber As Double = Me.TblMainVoyBindingSource.Find("ID", Me.TblMainVoyDataGridView.CurrentRow.Cells(0).Value)
frmEditVoyage.TblMainVoyBindingSource.Position = IndexNumber

[code].....

View 2 Replies

Make A Childform With Textboxes?

Dec 4, 2010

in An MDI form , i make a childform with textboxes. these textboxes are produced by the code, like this:

For i As Integer = 0 To number Step 1
Dim TextBox As New TextBox
ChildForm.Controls.Add(TextBox)

[Code]....

In another sub within the MDI class i want to read the data from the textboxes, but got an error that says txtBox1 is not a member of 'WindowsApplication1.Form1'.This is true because they do not exist yet. How can i handle this? I think it has something to do with "delegate and invoke", but this seems to be hard to understand.

View 4 Replies

Close The Opened Childform With Menustrip?

Jun 12, 2009

i create a mdiparent form and a form1, all i wanted to do is to close the mdichild form(form1) with a close in the menustrip.When i want to close the opened childform with menustrip (i create a button close in the menustrip)

View 10 Replies

Enable A Toolstrip For Childform Of Mdiform?

Aug 11, 2011

I have an mdi project that has different toolstrips for different child forms. how I can have them merged into the MDIParent toolstrip as they show within the Parent. have all the toolstrips on the MDIParent and enable/disable depending on the childform?

View 8 Replies

MDI Form & ChildForm (with Show Dialog)?

Sep 16, 2009

I has 4 form

1. Main.vb (IsMdiContainer = T)

2. Form1.vb (has textbox1 , Button1)

3. Form2.vb (Has button1)

4. Form3.vb ( has textbox1, button1)

i start with Main.vb, and show Form1.vb (

code :
dim frm1 as new Form1
frm1.MdiParent = Me
frm1.show()

at Frm1 i has 1 textbox (textbox1) and button1, if i clickk button1, form2 show with dialogform

at button1 click
form2.showdialog()

in form2, i has button1 if i click, form3 show with dialogform too

code
form3.showdialog()

in form3 i has textbox1. and button
if i clock button1. i'll put textbox1 value into form 1 textbox.
code : at button1 click.

form1.textbox1.text = me.textbox1.text

but the textbox1 in form1 not has value ?

View 2 Replies

Remove Childform / Form Controlbox?

Mar 29, 2011

I already set this code up but still no luck.

childform = PIS
childform.MdiParent = Me
childform.Show()

[Code].....

See the image. Both border of the form is set to none and their control box also and maximize,minimize box.

View 16 Replies

Save/Update Database From A ChildForm?

Apr 21, 2009

I have one table and one dataset namely Registration.db and IGregistrationDataset I created a Registrationform, from it, I load a second one namely complaintForm by parsing the current Registration_ID.

From ParentForm (registration) i did this:

Dim row As IGRegistrationDataSet.RegistrationRow
row = CType(CType(Me.RegistrationBindingSource.Current, DataRowView).Row, IGRegistrationDataSet.RegistrationRow)

Dim frm As New ComplaintProfile(Me.IGRegistrationDataSet, row.Reg_ID)

[Code]...

View 12 Replies

Hiding Mainform In Mainformload?

May 7, 2011

[code].....

View 1 Replies

Make My Mainform Invisible?

Mar 10, 2010

I made a birthdaylist. You can store birthdays in it, and it will alert you on the day a person has his birthday. To do that the program has to startup when the computer starts up, and give the alert if neccesary and then close itself again. This all works, but the mainform is visible in that period.

View 5 Replies

Using Hide Method To MainForm?

Jan 15, 2010

I'm trying to go to a different form my main form and while I'm using the selected form I want the MainForm to hide. I've put the code MainForm.Hide() at the top of the code of the JobInformationForm where I'm directing the program. I thought this would cause the MainForm window to hide. However, I'm getting an error saying Declaration is Expected. How do I use this MainForm.Hide() feature?

View 3 Replies

Access A MDI Parent's Menustrip Without Merging The Childform Into It ?

Nov 11, 2009

I'm trying to accomplish something and not sure it can be done or rather if I'm approaching it correctly. Is there a way to access a MDI Parent's menustrip without merging the childform into it? I've done the merge before and that works fine. Reason I'm trying to figure this out is that I've started toying with a windows ribbon control and am wondering how the menu functions are performed with this control. In other words you wouldn't create one on each child form and have some how merge them so there must be a way to do this from the parent control.

Things I've tried thus far are to create a public sub in the childform that will save the data to a database. Once the save button is clicked in the mdi parent's menustrip and determines the activechild it will then call that sub procedure on the childform. However it doesn't persist the data, in other words passes a whole lot of nothing to the database even though the values don't dissappear on the child form.

View 9 Replies

Buttons On Main Form Displayed Above The Childform?

Aug 11, 2009

Even i have use the "BringToFront" keyword for the childform but its not working. The buttons on the main form are still displayed above the childform. But when i open another form from the childform, it is displayed properly

View 1 Replies

Opening Report_Viewer_Form From ChildForm Do Not Load Data?

Mar 12, 2011

I am developing an application with VB.net and SQL Express. In my application I have many forms as : some of my forms are :

Mainform
selectmonth_form
Form_report[code]....

Forms load normally and also show all data in form_report. With this code these forms open as new windows, but I want to open windows as child window.

View 1 Replies

Remove Blue Bar Are Appearing From Switching Of One Childform

May 10, 2011

My application having one mdiform in that form six child forms are there.Switching of one form into anather form blur bars are appearing form at the title of every opened child form.These six child forms are opens in mdiform.how to remove the blue bars are appearing from every opened child form in mdiform.how to remove these blue bar.

View 7 Replies

VS 2008 Merging Statusstrip, Mdi Parent And Childform?

Mar 31, 2009

ive been trying to get statusstrips merging so i can click a label to bring the child form to the front when i have multiple childforms open. I have this code which does work but on closing it leaves the label on the mdiparent and also im struggling with the bring back to front code. i dont want it to open another form just bring it back to front. I have statusstrip set to visible false on my childform. heres some code for merging, this is in mdi parent:-

Private Sub Form1ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Form1ToolStripMenuItem.Click

[Code]...

View 2 Replies

Activated Event

Jun 2, 2010

Hello, everyone! I'm having problems with the Activated Event in Visual Basic. When trying to click my btnNext, IF THE DATA ON THE PAGE IS NOT SAVED YET, then a message box is to appear and alert the user that the data is not saved yet. When clicking the OK button on the MessageBox, it is supposed to return control back over to the main form. HOWEVER, I can't get past the Activated Event on the main form. It crashes the program. I've tried global flags, but it still does not want to work! Can anyone please help? Any thought in the right direction will be greatly appreciated! Thanks in advance, y'all!

View 2 Replies

Form.activated In .net?

Jun 30, 2010

I am trying to migrate a vb6.0 application to vb.net. I have a major issue while executing the code under form.activated and form.deactivate. There is a difference in behaviour between form.activate in vb6.0 and form.activated in vb.net. How can I simulate the behaviour of vb version in vb.net.

I have read that the form.activated fires even when the control goes to a different application and comes back.

View 5 Replies

Get The Timers To Get Activated?

May 31, 2006

I recently upgraded an application from VB 6.0 to VB.NET. This application contains a timer in its form (only one form is there). But after upgrading, the timer is not getting activated. Form is using DefInstance as follows: frmMain.DefInstance.Show()

[Code]...

View 8 Replies

Maintain An App Activated?

Jul 21, 2011

I need to create a program that when it is opened, Focus will be always in that program until someone with any way will close it. I've tried to add Me.GetFocus() in the LostFocus event but nothing happens, I've tried to add Me.activate() when the Deactivate() event raises and when I debugged the program worked but when I run the biulded .exe file nothing happens again! how I can manage this Function?

View 6 Replies

Base Form Handle Event - Array Of ChildForm

Jul 27, 2009

Base form baseForm generate an array of childForm (3 fo them). I have one event handler in baseForm which is called when user close each childForm. The problem is that this event handler is only called when the last childForm is closed. When other childForm is closed, the event handler doesn't do anything.

View 7 Replies

Forms :: Opening Childform Creates New Instance Of ParentForm

Dec 31, 2011

I am in the process of upgrading a VB6 Project to Vb.net. My problem is that when I open a child form in my project from within the Parent form a new instance of the Parent form is created. The code is fairly simple:

frmnewContract.MdiParent = Me
frmnewContract.Show()

View 3 Replies

Application Startup MainForm Is Loaded?

Apr 1, 2010

I have mainFom and a subForm. what I am trying to do is application startup MainForm is Loaded

(2) in the Load event of mainForm. I am creating the SubFom and made it visible and also making MainForm disable

[Code]...

View 4 Replies

Dispose Form Opened In MainForm Tab?

Apr 19, 2010

I have a MainForm which has tab Control and several independent form. I open each Individual From in the tab of the main form. A "Close Tab" button on the MainFrom closes the current tab, its implementation is below.

This closes the current tab but what I also need is to dispose the From whose tab is closed but I am not sure how to get the instance of the form.'[code]...

View 2 Replies

Position A Messagebox In The Center Of MainForm ?

Nov 12, 2009

Is it possible to position a messagebox in the center of your MainForm instead of the center of the computer screen? This is really confusing for beginner computer users, if your mainform will be in the top left corner and the message box in the middle of the screen, it won't be very clear that the messagebox belongs to your application. (well to us it is, but not to old people).

View 3 Replies

Sharing Data Between Classes And Mainform?

Apr 13, 2011

I have done programs in the past with VB6 using the winsock control to receive data to be processed. I would like to do the same thing in vb.net but I am having problems. I have done numerous searches and consulted numerous books and articles, but haven't found the best approach for accomplishing the following.

I would like from 1 to 20 clients to be able to send a string to the server to be processed. It would be nice to if the clients could connect to same port and use async processes to open/accept more connections. One of the books (Visual Basic 2008 Recipes) has a recipe for creating "Multithreaded TCP Server that supports Asynchronous Communications".

I am trying to base my program off of that example and modify it for my application. The problem I am having is how to share data with the Main form and the classes that handle the communications. The TCP class has two classes contained in it. One class for listening for connection, beginning the accept client and the other class (clienthandler) for completing the connection and getting the data. I would to be able to get the data from the clienthandler class and post on the main form. I have trying to have a public property for the data but I think my confusion comes in because the clienthandler would be created new for every new client. The mainform would not know how many of the new clienthandlers were created etc.how get the data to the main form and clear the data when done. I have even considered putting data into MSMQ and having main form pull data out.

View 7 Replies

Windows Forms: LoginForm And MainForm?

Jun 14, 2010

Currently, I have a LoginForm that authenticates a user and it works fine. I have a MainForm, which is displayed if a valid username and password is entered. I have done this by using the following code in my LoginForm:Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles

[Code]...

Now this does exactly what I want except I fear it's a work around and it's not the best approach. Also, note that I am using Me.Hide() to hide the LoginForm, is there a way to show the MainForm and then close the LoginForm instead of hiding it? Doesn't Me.Hide() call creates an overhead?

View 7 Replies







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