I'd like to keep all my SQL data related code in a separate class and only have UI related code in my main form. However, the TableAdapters are automatically placed on the main form and, of course, the auto-generated code placed in the Form_Load event.
Obviously, it's easier to keep it like that but is it possible to move them to a different class?
Problem: My datagridview is moving from a tabcontrol onto the main form when I execute the below code. I desire it to stay in the original position. Details:
1) I created a MAIN datagridview1 for my master on tab 2 (OK) - this is for editing, deleting etc.
2) I created datagridview3 on tab 1 for implementing 2 textbox filters (OK)
3) The actual filter code fires on changing of values in two text boxes
The above works perfect except when the code below is executed, datagridview3 moves from tab1 of my tabcontrol to my main form. How do I keep it from moving (desired) or at the least move it back to control tab 1?
i have my main child form open. then i show the new form:
[Code]...
but when the form opens it flickers a lot. so i want move the new form behind the main form while it loads so the user does not see the flicker. once it is done loading i will set the form to topmost. how do i move the new form behind the main form?
I have a tool window that I want to stay above the main application form, but not stay on top of all windows forms. Similar to the floating properties window for visual studio - it always stays on top of the main VS window, but if I select another program, like internet explorer, the floating properties window will be behind internet explorer.
What I have is an application that has several forms that may be displayed at the same time. I have a Messages form that displays messages generated by the code in the form, that gives the status of the application. Obviously, the user would not normally be working on this form, but they may want it to be visible to see the status messages from the program (File saved confirmations, etc). So, my two options right now are I can set the form to be on top of all other windows forms or, when the user clicks on the main application form, the messages form would be hidden by the main form.
How do i load the Main form of a WPF so that a seperate thread goes and gets data from the database while the form is in an apartmentstate? (drag-able / movable) I Know this is possible with opening a new window from your main form like this :
Private Sub openOrderWindow() Dim OrderWindow As Orders = New Orders OrderWindow.ShowDialog() End Sub
[code]....
I've tried putting MyBase.ShowDialog() and .Show() and .9000+ other things The only benefit I've got out of using a seperate thread to load from the databse is i can see the screen right away (as oppose to it being a transparent box until it loads) but i cannot move it around or minimize it?is there any way to make it Movable while it loads?
[Code] I want like to check if a file exist on main form, if not: force open settings form. And then when the user is closing the form with exit button = check if the file exist again. If it doesn't exist, close application. It's a huge application and I need optimized on most parts. Also, the settings form is asking the closing question two times.
simple problem Basically in form1 i have a line of SQL code in a rich text box called rtb_select
what i would like..This code to run under a connection string called strSQLSelectQuery in form2
I have been told someting like strSQLselectQuery = rtb_select.text would work however because rtb_select is in a different form in the same project it does not recognise rtb_Select
I'm having an interesting issue that I can't reproduce on a different project, but can consistently on this one. I have no clue what might be causing it, but am hoping that someone may have seen it before.
I have a main form, from which I run a series of checks. On this form, I have a listview control. Because of some issues with the refreshing of this listview control, I had to create my own messagebox. It's just a form that displays some text ( it also happens to look nicer than MsgBox; in my opinion, anyways ). It's been working great for months, until recently.
My problem is that on my main form's load event, I run this check, which returns an error within a try/catch block. I then call my custom messagebox with a message. It in turns calls it's ShowDialog() function.
In any other situation ( after the main form has been loaded ), I have no problems. The messagebox goes on the screen and behaves appropriately ( ie: waits for my input and acts as a modal dialog ( stops execution of my main form's thread ) ). However, on this onload event, my messagebox comes up and goes away almost immediately afterwards.
I've traced it all the way to the showdialog() call. For no explicable reason, it appears to skip right over this call, without me doing anything on the form.
Here's what the inner trace looks like ( when I put a breakpoint on the onclosing event for this messagebox form ):
I have a program I've been working on for some time now and I'd like to try to streamline it somewhat. I have a main menu form that has a split panel, in the left panel is a treeview that displays forms you can open and when one is selected, it opens in a child window in the right panel. Each time I open form I called DWNForm, it does a series of dataset loads which are the populating items for a series of listviews.
What I would like to do is have these datasets load once during the mainMenu load and then have the DWNForm be able to access the datasets once it is called from the treeview selection.
I want to create an IMAGELIST in a main form and add to it then have it accessible within a child form. I found several MS examples on database shared access but this is NOT the concept I am after. Straight forward:
In the main form the user can choose to download information from a device.Since this request takes time, when "download information" is pressed I open new form in a separate thread: Private Sub RunDownload()
im trying to do where the main form is a login form if the USer and password matches that in the code it goes to the main screen if it doesent it launches a form saying this user and or password is incorrect and when you click ok it closes that message window as well as the login form stop the program from launching is has to match the user and password from the text on text box one and masked textbox 1.
I have a MDI Parent form created with a MenuList, I also have the MDI child form created.ow do I go about using the MenuList to open the MDI child form within the parent form?
I am trying to use a progressbar to show on main form and then finish when next form is loaded, I have got this code.
1. When I click on button, it must open next form, but the next form must only open when the data in my list box has been loaded from Access Databse. When I run my program, it only shows the progressbar and don't open the next form.
Main form code:
Public Class Main
Dim PB As ProgressBar
Private Sub main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub
I have to write an application that consists of mainly one main form, but several different things I wanna display. Pretty standard I guess. So there is a menu, some controls, and the main stuff below (ranging form graphs, tables, dropdown boxes, print preview, etc). I would like to use it like one would use frames in html, design an object that is limited to a box or panel that I define. The literature I have does not give me a clear idea of how to do this (yet). The most obvious seem to be the use of MDI, open a predefined form with no borders, maximize it before showing and remove all minimize/maximize options. But that does not work so well. The form inside the MDI parent does not fit the size that is given for it when it is loaded. e.g.
[CODE]:......................
So my main question is: Is MDI the way to go here at all or are there better/easyer ways to achieve this? If MDI is the way to go, how do I sucessfully restrict a child form inside another object, without giving the user any opportunity to resize (i noticed that I have minnimize/maximize/close buttons, even if I disable them on the child forms themselves)
VS2010 VB.NET windows form app I have a login form that is my startup form.when uer hits OK I display the main form and close the login form, like this:
PrivateSub OKButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OKButton.Click frmMain.Show()Me.Close()EndSub Problem is the application closes with me.close. Why? How can I close only the login form and leave the main form urnning???
My project has a single dataset with about 6 datatables. Each of those datatables has a TableAdapater and a Bindingsource on the main form (due to various databound controls).
Now, I want to have a second form for adding a new record. If I bind the controls to the datasource it creates new TableAdapaters and new Bindingsources on that form. I was wondering if it's possible to simply use the ones from the main form instead like this
When a person makes changes on my datagridview and closes it, I want it to automatically go into the database and update in a new column (which is already been created) the text "changed".
Everything in my tableadapters already works. Its just the VB part which I dont know how to call the update command. Here is what I have in my updatedataset().
Private Sub UpdateDataSet() Dim datasetChanges As datasetTs = New datasetTs Me.bindingsourcet1.EndEdit()
I have a form called ExsistingClient on this form is a datagridview when I double click the datatgridviewrowheader I want it to get the clientid from the datagridview and use that to open and populate a form called ClientMainForm.The datagrid is populated from table called ClientData, the form ClientMainForm will be populated from table called PaymentData. The tables have a relationship on clientid fields.On the ExsistingClient form I have this code:
Private Sub Client_DataDataGridView_RowHeaderMouseDoubleClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles Client_DataDataGridView.RowHeaderMouseDoubleClick