VS 2008 Sharing With Mdichildren Use Events?
Apr 19, 2010
I've been working on an application recently and it has exceeded the scope of a single form.I decided that it would be a good time to use an MDI container and split the interface up over a number of different child forms.As the application was written, there were a few different classes that were being instanciated on the original form.I've migrated these over to the MDI parent form so that I can allow all of the children to interact with them.The route that I'm going down right now is raising events on the child forms and watching for them on the MDI parent.The parent form is then doing whatever the child did to the instanciated classes in the past.
View 3 Replies
ADVERTISEMENT
Dec 1, 2011
I am building a code library to be used by a 3rd party developer. Neither my code or the 3rd party have any UI controls involved. It's purpose is a combination of providing the ability to look up information from a database while at the same time polling it and throwing events when a set of conditions are met. Naturally the only way it's going to be responsive to the 3rd party library's commands is via multithreading since everything in a single thread stops once you start polling the database.
The sub I am using is part of an object that I create in the main thread and attempt to have it run via a thread, when a condition is met I have it update a property in that object, throw the event (or execute a callback in my latest attempt) and then attempt to have a simulator for the 3rd party control read the property.It's easy to setup the multithreading part, the hard part appears to be throwing the event so it is seen in the original thread and the data is available there. Any attempt to do this generates a cross thread error when the data is read.
I attempted to use delegates and calling methods asynchronously and using the callback function but still get cross threading errors.Is my only possiblity to use a background worker, using either the progress changed or runworker completed events? Even then am I going to be able to set the property in the function from one thread and read it in another?
View 1 Replies
Mar 27, 2009
Is it possible to expose an event in an Microsoft Office product to a Windows service? That is, are the Office product events shared with other processes like Windows services? I know I can handle these events in VBA code in Word/Excel. However if the code is disabled the handling does not occur. I want to be able to have a service run in the background to log these events as they occr.
View 4 Replies
Feb 22, 2009
I have two MDIParent with one form(MDIChildren). in my mdichildren i have a statustrip with splitbutton, and one of my split button is assign to do an event..how can i do an event with my splitButton in different MDIParent? For example:
I have to open a MDIParent called MDIparent1 (of course it loads of my mdichild automatically)
trying to click a splitbutton will success..but i try to open a another MDIparent called MDIparent2 with my same mdichild and try to click a splitButton will not be success.
[Code]...
View 6 Replies
Dec 12, 2009
I am trying to enable a timer on multiple MdiChildren and I'm getting an error. What am I doing wrong.
[Code]...
View 7 Replies
Jan 3, 2010
I want to maximize my mdi child automatically by setting WindowState to Maximize. But it looks like this.. why is this happening? but if I restore it and maximize it again its body now occupies the mdiparent space. To aim is not enough. You must hit.
View 2 Replies
May 24, 2012
I have a datagridview (windows forms) that is inside an mdiChild form. The custom format is given by a "for" instance, something like this:
For row As Integer = 0 To .Rows.Count - 1
If .Rows(row).Cells("someNumber").Value = 0 Then
.Rows(row).DefaultCellStyle.BackColor = Color.DarkSeaGreen
End If
Next
So, for every row in the grid that you find, if ther value in the "somenumber" =0 paint the whole row green. Problem is, if I put the form OUTSIDE of the MDIParent - just put frmMyform.show() in my btn that calls the form-, the grid WILL apply the format; If I call it like frmMyform.mdiparent = frmMdi, then frmMyform.show, the grid WILL NOT apply the format.
View 4 Replies
Sep 19, 2011
I have some MdiChildren that have their form titles updated. However, in the MdiParent, the "Windows" Menu does not update their titles when something changes until I change MdiChildren focus.
how to forcibly make the MdiChildren Menu list update?
View 1 Replies
Mar 5, 2010
I have been assigned to a project where an existing developer has been working on a web app on VS 2008 storing all files on his local workstation.I need to assist and eventually take over deveolpment of the web app development. My workstation only has VS 2005 but I will be installing VS 2008 in the coming days.
My question is: what is the best way to access all of his work, and make it so that it is acessible to other developers as neccesary.
View 4 Replies
Jul 12, 2011
I want to use a form in two project.
I have developed it in one project, I now want to make it available to another project.
I have removed it from the project and moved the .vb & *.resx files to a directory for common modules.
I then go into my project select Add Existing item, select the .vb project and say Add as Link.
But now my form is missing - I just have the code.
I have two classes MyPanel & MyForm. MyForm was first, MyPanel second. It says they should be the other way round. When I swap them I get the message "to add componets to your class, drag them from the toolbox...."
View 1 Replies
Oct 9, 2009
It must be to close to the weekend, but I thought I read at some time an article of an easy way to have a common settings file for both application and user settings across a solution.
I currently have a Solution that contains 4 projects. Each of these projects need to access the same set of settings and be able to update the user settings. Is there a way to do this utilizing the My.Settings functionality?
View 2 Replies
Jul 3, 2010
We are rewriting our VB6 application in VB.NET 2008. The application contains several VB.NET dlls and one COM OCX control.We want to keep our executable file in shared folder of Server and want to create a shortcut in all other PCs. (This is the way we deployed our VB6 application)We know that using .NET Code security option we can give permission for sharing exe of a VB.NET 2008 program and .NET Framework is necessary to install in Client and Server PCs.
1.In which place we need to change .NET Code security: Server or Client?
2.Our application has a COM OCX control. Will it affect our sharing?
3.Which resource will be used for running application: Server or Client?
4. We want to use local resource of client such as reading registry setting, INI file etc. Is it possible?
5.Where to put DLLs of the application: Server or Client?
View 2 Replies
Jul 23, 2010
if for example i have two private sub I declared a local variable on private sub a... is there a way that private sub b could use the variable created on private sub a? Im asking because im in a problem in my app were using global variable is not an option to make the long story short
View 5 Replies
Oct 13, 2011
I have been trying to implement the jQuery weekcalendar using .net. What I can't seem to figure out is why weekcalendar states events.events is undefined after I make an ajax call to a webmethod I created which returns JSON. Below is the relevant code:
[Code]...
View 1 Replies
Aug 2, 2009
I want to make Keybord events and mouse events for learning and educational Purpose.
1. In Form any object like A "picture box" move by Arrow keys .
2. Picture Box Contain many Picture i want change Picture With next and Previos By Arrow keys.
3. I contain Voice of alphabet in Mp3.When i Press any button in textbox then its work.
4. Mouse Pointer Change My Own.
5. I click any Object or any thing By mouse its noice clicking sound like Tik Tik Tik.... Question No 3 is very hard to do . but not im possible
View 12 Replies
Apr 27, 2012
how can I capture an event like a button click or timer event, if I created the controls at run-time?
Ex: Dim a As Button
Dim b As Timer
I want to capture the click event of the button "a" and the timer event of the timer "b".
View 2 Replies
Mar 24, 2011
Is it possible to get events of httpwebrequest? For example when I make a post request, then in the events procedure I should be getting something like this in the following order say
connecting to website
connected to website
posting request
request posted
waiting for response
receiving response
response received
disconnecting
disconnected
Or how to I implement something like this with the webrequest?
View 1 Replies
Mar 15, 2010
I'm using a DGV to show some data & I'm using the CellClick event to run some code when the user clicks on each row. But I also want to run some other code if the user double clicks a row, but the CellDoubleClick event never fires, the CellClick event just fires twice. Does anyone have any ideas on how to make both events work?
View 1 Replies
Aug 17, 2010
I don't really know how to call this...Anyhow... I have two objects (for example, "A" and "B") of the same type/class. I have an event (for example, "Refreshed") in both objects. Is it possible, that when "Refreshed" fires in "A", it also fires in "B"?
Edit: forgot to mention - "A" and "B" don't "know" each other.
View 9 Replies
Jul 8, 2009
I have a base object, with a event that can be triggered by multiple methods.Then I created a child object that inherits that base object. I want to be able to trigger that event in the new object; but I can't use RaiseEvent to raise a base-object's event.To get around this, I created a small method in the base object that takes the argument for the event and I just use it to trigger the event. Is this the proper way to handle this situation? Similarly, I could Shadow the event with a duplicate one in the child object.Is there a standard way to handle events across inheritance?
View 2 Replies
May 3, 2009
Is it ok for me to have this event - firing on TextChanged for my BillingSame textbox
[Code]...
View 2 Replies
May 2, 2009
I've got a series of textboxes that are bound to a dataset. I've got them disabled and will be hiding them. Then I have a series of check boxes related to each textbox. The user clicks the check box and I change the value of the databound textbox. Nice and easy way to bind check boxes to DB fields. Any way to create these relationships at runtime - basically creating the events that I'm hardcoding right here.
Private Sub IntprtLead_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles IntprtLead.TextChanged _
, IntprtCheck.TextChanged _
, IntprtCons.TextChanged _
, IntprtSimul.TextChanged
Dim strValue As String = TryCast(sender, TextBox).Text
[Code] .....
I know I can loop through the controls on the form and find these "named" objects easily enough. Is it possible to have more "generic" event code and then create the handles relationships at runtime?
View 8 Replies
Sep 19, 2009
In a reply to one of my posts, a user said I should create an event for Textbox1.TripleClick.So, I would need to create an event.My problem is, how do I create an event for a textbox so that the event shows up in the textbox events?
View 10 Replies
Jul 26, 2011
When my form loads i create an array of richtextboxes. Since they're created dynamically i don't know how to do events like, textchanged or click, for each richtextbox. I'm pretty new to vb and to the forum. I'm not sure if i've posted this in the correct place on the forum if not apologies.
View 5 Replies
Mar 20, 2009
Say I create a new button on a form through
Dim Button2 As New Button()
Button2.Text = "My new button"
Button2.Size = New Size(100, 100)
[code].....
View 8 Replies
May 10, 2009
How would i go about detecting While the user is moving the mouse and also holding down the left mouse button. like they were drawing something with a pencil in paint.
View 16 Replies
Jul 13, 2009
I want to be able to pull items from an outlook Calendar and display them in a grid viewthe issue I am currently having is it will not display any recurring events, this is what I have so far.
Dim app As Microsoft.Office.Interop.Outlook.Application
Dim calendarcontents As Microsoft.Office.Interop.Outlook.MAPIFolder
Dim x As Integer
[code].....
View 1 Replies
Sep 13, 2010
i need help to delete a record in a database table in crystal report, after the report had been view from the new page and when the page is close. the report is done in vs2008 c#.
View 2 Replies
Jan 15, 2010
I've got a StatusStrip...and I'm trying to initialize some code when it gets focus...so clicking on it should give focus to it right? I've tried the following
[Code]...
View 2 Replies
Oct 20, 2010
Is there anything I have to do to trap wheel mouse events?I have a panel and can trap the MyPanel_MouseMove events but not the MyPanel_MouseWheel events.In VB6 you needed to add wheel hook & unhook commands - do I have to do anything for VB2008?
View 5 Replies