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 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
the project i am currently working on has a form in it that has quite a few objects that take a couple of seconds to load. Because of that, if i simply use the .show command, the form shows up, but there are a bunch of blank white boxes where the content is still loading, how can i have the form not become visible until ALL of the contents and images inside are fully loaded?
How to hide the main form upon load (startup)??? I have tried Me.Hide() And some others ones, but none of them actually HIDE the form upon startup. It also has a NotifyIcon but once again it will not hide the main form..
I have a main form that has a button with which a smaller form is shown. Think of the smaller form as the Find/Replace dialog in many applications, such as Notepad. It's important that the form is (what I believe is called) modal. What I mean is that it always stays on top of the main form. I ensure that by calling the Show method with "Me" as the owner argument. Whenever the small form loses focus it will not disappear into the background but stay visible (albeit out of focus). If you don't understand open up Notepad and have a look at the behavior of the Find/Replace dialog.
Here's my problem: instead of actually closing the form when the X is pressed, I want it to simply Hide itself, so its position and the state of any controls (checkboxes etc) is preserved automatically.To achieve this I simply cancel the FormClosing event and Hide it:
vb.net Private Sub Form2_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
[code]....
To show the form, I use the following (note the (Me) to make the main form the owner of the form; this ensures that it remains visible even when it is out of focus):
vb.net Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Form2.Show(Me) End Sub
Now. When I run my project, and open the Form2 (small form), then hide it again (by 'closing' it), I can no longer close the main form (Form1)! It seems the main form cannot close when the small form still exists (albeit invisible)...?? When I don't use the Me argument in the Show method, I don't get the behavior I want. I know I can set the TopMost property to True but that will also cause it to become visible on top of all the other forms, even windows not part of my application.
I'm curious if it is possible to hide a group of text boxes from view in a form until a particular condition is met, and to have a custom set of text boxes for that condition. To give an example; I want radio buttons offering choices for a manner of searching records, the user selects one and then a specific set of text boxes are displayed for the user to utilize, if a different option is chosen a different set of text boxes will be shown. Is this something that can be done?
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.
I want to draw a histogram when Form2 is loaded, I load Form2 using button of Form1 It didnt work, Form2 is loaded, but no image...i dont know why here's the code
Private Sub Form2_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint Dim img As Graphics = PictureBox1.CreateGraphics
Is there a way to check if a form has been loaded yet? I saw in C# they have a isLoaded property, but it doesn't seem to exist in the VB.Net Form class?
I am trying to create an inherited form- when I go to add it, I get the following message- "CustomerInformation --- The base class 'Object' could not be loaded. Ensure the assembly has been referenced and that all projects have been built"
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.
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 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?