VS 2010 Multiple Forms In Tab Control And Just Shown
Mar 2, 2012
I have been going a couple of directions as I learn and try to figure out more. Basically, I have a form that has a tab control that contains 6 tabs and tons of controls on each tab. They are like Orders, Invoice, Customer Info, Quotes... What I would ultimately like to do is have individual forms that fit into the tab with a parent/child relationship as well as be able to not use them in a parent/child type of relationship so that they can be used as stand alone forms.
I have done something like this, but the form moves around. I would like to lock it into the top left so that everything lines up.
Dim frm As New Form2
frm.Show()
SetParent(frm.Handle, tab1.Handle)
I also have to pass values from sibling to sibling, but I think that I can handle that if I can come up with a good format.
So overall, I would to have forms that could be in a tab or just displayed as a child not in the tab.
View 1 Replies
ADVERTISEMENT
Feb 6, 2012
I need a nudge in the right direction. I have a user control that has the main form and it calls a secondary form to gather some additional information in some cases. I need to pass the information back from the secondary form to the primary user control form so I can validate the data and save. In the secondary form, I have the following code:
Dim myFrm as new frmOperationComments
myFrm.OperationComments = [comments from form]
myFrm.OperationDate=[Date from form]
I have tried creating two public properties on the user control and setting them, I have created two properties in the user control form called OperationComments and OperationDate. I can set both of them, but when I close or hide the form and go back to the main user control form, the values for these properties or variables are not set. How do you set the values on the main form from a calling form within a user control?
View 2 Replies
Apr 2, 2009
I'm developing a windows application. I have a form in which there is a list box and a treeview control. My purpose is to fill treeview according to list item clicks. This is done using a pair of subroutines called ReloadPermissions and FillMenuItem:
Private Sub ReloadPermissions()
Dim p As New Permissions
Dim i As Integer
Dim it As TreeNode
Dim el As New List(Of String)
[Code]...
There are only two subroutines in which nodes are added to treeview control, and they are subroutines above. The problem is that whenever list item is clicked, node count displayed in treeview is increased!!! I checked number of nodes before and after call to tvPermissions.Nodes.Clear() using MsgBox. Results show that number of nodes isn't increased (1 before call, 0 after call, again 1 after ReloadPermissions() is called), but what is displayed doesn't show such a behavior! Refreshing window by putting it under other windows or call to tvPermissions.Refresh() has no effect.
View 1 Replies
Jan 30, 2009
I have an application with a few forms. The main form, and 2 others. When I click a button on the main form, one of the others display "attached". When I move the main form or one of the other forms around the 'attached" forms follow. The problem is that sometimes if you have another application on top of one of the forms, and click the other form, both forms dont come to the front. How can I make that happen? I've already tried things like on bringtofront for all the forms but I also don't want to take focus away and if I do that it ends up in a loop of grabbing focus via activation.
View 5 Replies
Jun 21, 2010
I have developed a win form application using vb.net 2.0, mistakenly my vbproj file deleted. Now the issue is that when i open the solution in the design view all my forms ( 170 + ) shown blank. but when i run the application all the controls are properly displayed and application is running fine. Issue is why all forms are shown BLANK in design view , as i cant make any changes to the design now.
View 8 Replies
Apr 4, 2011
In a label box, I want to list a couple of websites, email address along with some text. How do I go about it?
Potential uses- As a Help > About dialog box where websites, email of the author can be listed.
To make things as easy as possible for the user, and encourage visiting of the mentioned websites.
Simple text will be ignored, while standard blue color, underlined text with hand mouse-cursor will need no thinking on user's part.
View 1 Replies
Dec 1, 2011
I made a calculation in one form using 3 textboxes. (I entered one number and multiplied it by another and got the answer in the third textbox.)
I need to bring my answer I got in textbox 3 into another different form later in the project.
how to do this? Something to do with a Module ?
View 5 Replies
Jun 18, 2009
how to create a list shown in following image using vb 2005 ?i want the following list (contents doesn't matters) to be appeared when i click the button.
View 2 Replies
Aug 6, 2011
I need to open a form 6 times, I have the following
[Code]...
But when I click the button 6 times all the 6 forms open, but when I close one and click in the button to open again (since I only have 5 opened) the compiler says that I need to sure that the object isn't in use before using it again.
View 3 Replies
May 17, 2009
I've been having a problem setting certain items in a listbox as checked when the form is loaded. I have tried putting the code in the form_activate, form_load, and form_shown events and each still crashes when it encounters:
[Code]....
View 12 Replies
Nov 23, 2009
as the title says, I'm looking for an event to catch after a user control has been shown.
At the moment, I have to set a do-once variable and catch the Invalidated event.
View 2 Replies
Jul 23, 2011
I have written a code and tried linking up groupboxes from my input form called input.vb and the output form called results.vb.
[Code]...
I have used the above codes to access groupboxes from both forms. However, at run time I get errors saying "InvalidCastException was unhandled" and below that it says "Conversion from string to DOuble is not valid". This error points to a value in a group box that is actually hidden or disabled.
View 9 Replies
Aug 21, 2011
how to have all forms have the same on closing event with the exception of one form (Form1). I want the forms to show Form1 when one of the other forms is closed. I know there is a way to do it, I just can't work out how.
My code at the moment assumes that each form will have a boolean declared on it as false that will only turn true if you use a legitimate way off of the page (i.e. a regular button on the form). If you instead click the exit button on the title panel it will find the boolean is false and show Form1.
So the only problem I really have is getting the code to apply to all forms without writing it for all of them.
View 3 Replies
Jul 19, 2011
I have a project with several forms. I need some of them to be in a modal window. How do you set this to be true? Also, when some of the forms are shown I need one of the buttons on the previous screen to be active.
I have tried:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Form.ShowDialog()
Button.Select()
End Sub
View 4 Replies
Dec 31, 2010
I am currently working on creating a web browser. I have chosen to use multiple layout engines. I found this MDI Tab Control, and thought that it would make this task easier to accomplish and be useful in other aspects of my project. I am at a pause. I have a menu strip with an engine item, and within that I have Layoutengine1 and Layoutengine2. I want it so that when someone is browsing the web using Layoutengine1, and they want to switch to Layoutengine2, that all they have to do is click the Layoutengine2 button and all the tabs that they currently have open would be using Layoutengine2 instead of the previous Layoutengine1.
View 4 Replies
Oct 28, 2010
I am having difficulty getting some form control property bindings to work correctly. Below is the code I am using-
[Code]...
The ZedGraphControl is just a GraphPane, and the TolSelectBtn is just a button. Problem is, the ZedGraph control binding works properly, but the binding to the button does not (both controls' Visible properties are set to False in the design window). Can a ToolStripMenuItem only handle one data binding? Or is there something else I should be looking for?
View 2 Replies
May 15, 2012
Is it possible to control the height/number of items shown in a select dropdown box? Or do I need to code a custom widget? Is this possible?
Forgot to mention I'm using the following code:
<asp:DropDownList runat="server" Width="288px" CssClass="Select"></asp:DropDownList>
View 2 Replies
Jan 4, 2012
I am writing a windows forms application in visual studio 2010 (using VB). I want to change the control shown in a particular cell of a Table Layout Panel at runtime. Like this...
If radiobutton1.checked then tablelayoutpanel1's cell 1,1 shows panelOne
else tablelayoutpanel1's cell 1,1 shows panelTwo
View 2 Replies
Nov 15, 2011
remove the tabs from the TabControl and just buttons to control which screen is shown.Ive coded a form that uses buttons to hide and show panels but because you cant click buttons in design view, its extremely hard to edit the content in the panels.
View 1 Replies
Aug 11, 2011
I am writing a customized data acquisition application in VB2010. The maker of the data acquisition hardware has provided an ActiveX control that has methods, properties, and events that can be used to interface with the hardware device.My problem is that I'd like to reference the same control (ideally the same instance of the control) on multiple forms.
To begin, it is necessary to initialize the device, sending the control information like sample rate, number of channels, etc. Then you can use methods to start or stop getting data and read properties, like the number of samples taken, or an array of the
actual data. The device also provides events, like a DataReady event that fires when a certain number of samples have been taken, and a DeviceError event that fires if the device is not present.
My program will have several forms:
1) a main menu that opens on startup and that should initialize the unit and determine whether it is present.
2) a daily check form that will get values from the device to determine whether the electronics are good.
3) a test setup form that will get values from the device to zero (tare) the input channels.
4) a run test form that will acquire and process the actual test data.
If I include separate instances of the control on each form, I need to initialize and stop the control when the forms open and close. I started to build an interface class that the forms could share and that would deal with all of the methods, but I get tripped up trying to pass the control's events back to the form.
View 2 Replies
Jan 27, 2011
Normally, when populating controls with data from a database I create a connection and then pass a SQL statement to create a DataReader. I then loop through the DataReader and populate the controls. Because I am creating the SQL statement on the fly I can query the database joining on multiple tables to get just the columns and rows I need.
Now I'm trying to use the Data Repeater control in VS 2010. The Data Repeater is part of the Visual Basic Power Pack add on. If you don't have it, it is similar to the Data Grid. I've never used the data grid because I found it lacking. I need more control on how to display the data. The data repeater seems as though it will work in this particular instance.
So, following the numerous on-line tutorials I created a new data source and a new dataset using the wizards. I pointed the dataset to a table in my data source and then bound the dataset to the data repeater. It works but the dataset is bound to a table. I can think of very few instances where I would need to dump the data from a table on to form. I need to be able to query the table.
I need to be able to pass a SQL statement to the dataset at run-time. It needs to be able to retain the bindings to the controls or I need to be able to bind the controls at run-time. No property jumps out at me for changing the dataset SQL statement at run-time. I can't see how to bind controls on the data repeater at time time. I can bind a data set to a data repeater at run-time, but I can figure out how to bind the controls to the dataset fields at run-time.
View 2 Replies
May 3, 2011
I have made report in crystal and call it from vb.net2010 but crystal report is not display, it is droped after some time when i am pressing the print button
i have put the code below to show report
--- the code
Private Sub btnPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrint.Click
Me.Cursor = Cursors.WaitCursor
[Code].....
View 1 Replies
May 26, 2010
I recently came across the AsyncFileUpload control in the latest (3.0.40412) release of the ASP.Net Ajax Control Toolkit. There appears to be an issue when using it in a hidden control that is later revealed, such as a <div> tag with visible=false.
Example:
Page code -
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="act" %>
[Code].....
I have a breakpoint on the UploadedComplete event but it never fires. However, if you take the AsyncFileUpload control out of the <div>, making it visible at initial page render, the control works as expected.
So, is this a bug within the AsynchUploadControl, or am I not grasping a fundamental concept (which happens regularly)?
View 1 Replies
Oct 24, 2011
I'm using a folderbrowser dialog to choose a folder. however, the default folder is deep in the directory. when show the dialog, I set the selectedpath to the folder I want, but, the dialog does not show the selected folder in current view. users have to scroll down to see it.
is there a way to make the selected path shown in the current view when the dialog is launched?
View 2 Replies
Aug 21, 2010
I brought up a new project in Visual Studio 2010 and found that there are no gridlines on the form. I went to Tools, Options, Windows Form Designer, General and found the Show Gridlines option set to True. I tried turning it to false and back to true with no change.
View 2 Replies
Jan 2, 2012
I am loading forms into a TabControl creating a new tab page each time the form is loaded. ** I would like to point out that I am using UC instead of a from**
Now, I can easily have many tabs with the same form loaded. On the form I have a 'Search Button' So my question is, after clicking the search button how can I tell which instance of the form the 'Search Button' was clicked? Hope this makes sense
[code]...
View 2 Replies
Mar 23, 2012
I have a User Control that is a ProgressBar with Dock set to Fill. The code is as below. Unfortunately it simply doesn't show the text in the progress bar and why is beyond me skill.
[Code]....
The If Not... conditional code in the set method is there to prevent the SetProgressText procedure running every time the property is set. The Value property of a ProgresBar is an Integer and if the code that is setting it runs through thousands of loops (>600,000 in my case) then there's no point updating the text every time since it can only actually change 100 times for a 0-100 ProgressBar. The 600k looping takes about 2 seconds usually, without that conditional code it takes at least 2 minutes!
View 4 Replies
Apr 9, 2010
I have the requirement to create an application that has multiple front ends developed using Windows Forms, WPF, ASP and Compact Framework Mobile Forms.I would like to be able to create a series of obejct representing the business logic and have this logic accessible from the various front ends available. My first thought was to use remoting as I'd like to be able to pass the business objects back and forth between client and server but the compact framework doesn't support remoting and also transferring a full framework business object to a compact framework business object doesn't seem possible.My next thought was to use web services but again the passing of business objects seems to be very hard to accomplish. Without doing this I would have to create individual web methods for each business operation.
Finally my next option is to use sockets and write the whole client/server logic within some classes and expose them to the UI/Business layer. My only problem with this is it is not scaleable should the number of clients increase dramatically whereas using remoting or web services I can host the solution via ASP.Net.Does anybody have an ideas on the best way forward for this or even have any input on how they would write an application that required a windows form, wpf, asp website and mobile device GUI all of which want to use the same business logic?
View 3 Replies
May 25, 2010
I have googled high and low to find an answer to this but I must be searching wrong.I have an application which has a listview displaying some items that are stored in a SQL Compact database. I am using a second form to add new items to this list directly into the database.When the second form closes I want to call the sub in my first form to refresh the list from the database.
How can I get it to fire the form1 sub routine on the close event of form2
View 3 Replies
Nov 3, 2009
i was doing a fair amount of programming many years ago, like 10 it feels like, so I'm sorely not up to date on how my newly downloaded Visual Basic Express expects me to communicate with it.I am writing a program that pulls a cell from a database after the user has gone through several forms to determine which cells they want. When I write it like that, it doesn't sound very efficient, but I've designed it this way for usability.Here's where I have a problem: Should I store the path the user takes in a string, an array, what?
Here's an example:Someone wants baseball stats and trivia. They run my program, main form pops up, they select National League button, the NL Form pops up. Now the way my program is set up right now, is there are two ListBoxes on the form, one is populated, and as the user selects a Team from ListBox1, it jumps to ListBox2. Once they've selected all the teams they want info for, they click a button Next.
What I now need the program to do is show the next form "Team: name" once for each team, and insert the name of the team on the form in the appropriate label which I'll have blank. This form will also do the Listbox thing except the first listbox will populated with Topics like HR Stats, Pitching Stats, Coach History, etc.
View 1 Replies