VS 2010 Hiding A Form?
Feb 18, 2012Dim Result As Integer
Result = MessageBox.Show("Question...", "Key", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question)
[code]....
Dim Result As Integer
Result = MessageBox.Show("Question...", "Key", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question)
[code]....
I'd like to design a Winform with expanding controls if that 's overly complicated. The idea is that I would have rows of information, each with an "Expand" button. On pressing the button, the rows underneath the selected row would move down and the controls that are associated with the selected row (some textboxes/ dropdowns etc) would appear. Vice versa when you click the "Hide" button.
View 2 RepliesI have three forms: A, B and C. Upon a button being clicked, A displays B. Similarly, B displays C. Both using the ShowDialog() method.
However when I use the Hide() method (inside a Button Click event) on form C to close it, form B also closes. Why would this be? As far as I can see, it shouldn't be doing this. I certainly didn't write any code to tell it to do that.
[Code]...
UPDATE: I am an idiot. DialogResult was set to Cancel on the button as I'd copy+pasted it from the existing Close button and not realised that property was set
I am working on a project in VB.net 2008. I have a problem arising while opening a form as modal from a modeless form. I have attached a project to demonstrate the problem. This demonstration contains three forms with following characteristics. [code]...
View 3 RepliesIs it possible to hide a folder completely? By this I mean, not just set its property to hidden, but make it completely invisible so that the folder cannot be seen via Microsoft Windows Explorer?
View 2 RepliesIt seems like such a simple thing to me, but it seems like the usual, me.hide() isn't working in this case. I have 2 forms that tie together, the login form, and then the main for being form1. The login form has an autologin feature, which works out fine, but with it enabled, the login form doesn't automatically hide like it should.
[Code]...
I have a log in form, and once you log in, it's supposed to show a new form.
The problem here is...if I use Me.Close(), then both of the forms close, and the application terminates.
If I use Me.Hide(), than the first form doesn't actually stop running in the memory, and proceeds to run in the background even after you're done with the program.
I am learning VB.NET and as a first task I am creating a login form. I've been trying to link it to another form once a correct username and password are entered. However, despite that I still cant be able to hide it or unload it once the next form is loaded.
Here is the Code
Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click
If UsernameTextBox.Text = "chris" And PasswordTextBox.Text = "chrispass" Then
Me.Hide()
Form2.Show()
End If
Me.Close()
End Sub
The Form2 appears as coded above but the 'Me.Hide()' manages to hide the login form but then it appears again.
I am working on a project where I need to hide the mouse however the Cursor.hide and the ShowCursor API (Which doesn't even work) will only hide the cursor on a specific form. How would I go about hiding the mouse everywhere? (Desktop/Internet Browsers/etc...)
View 2 RepliesI have a small app with one form (form1) which is supposed to be hidden until a hot key combo is pressed. I have read and taken sample code from: [URL]. I do have a keyboard class that hooks keyboard input, (I have my reasons) but it's odd that it will recognise the first hotkey and fire the event, but none after that? The problem is, I can make the form show, but not hide again. It will only recognise one shortcut, one time. How do I make it respond to another hotkey combo? Is the handle changing? Even with focus, the enabled form is not hiding again.
View 4 Repliesi am hiding a form and showing another form by this bit of
form1.show()
form2.hide()
form 2 contains of a dgv and by the form1 i am editing the contents of the dgv present in the form 2.......
after making the changes when again i show the form2 and hide the form1,then the changes made did not appears in the form2............
i have this bit of code at the form load of the form2:
con = New OleDbConnection("Provider=Microsoft.Jet.Oledb.4.0;Data Source=LibraryManagement.mdb")
con.Open()
[Code]....
now when i close my application and again reload it then then changes that i made appears in the dgv of the form2........
if i am showing the hidden form then at the time of showing it,does the form load event of the hidden form is raised?
or,
the hidden form is already loaded and there is NO form load event and only the form is shown and hidden...
I have a form that searches a db. Some searches will always result in one row of data, others might return multiple rows. I want to have the data from a single row shown in text boxes and the multiple rows show in a datagridview is it possible to hide/show those depending on the amount of rows.
View 6 RepliesI am using a MDI parent to house each of the forms in my application. I have a main form and 2 sub forms. The sub forms are opened using the code below. Also, when I am finished entering info into these forms, i am hiding them so that I can reopen them with the same info still entered.
The problem is that when i show the form again, it is blank. Why would this be the case? I am never closing or disposing the form, so shouldn't it just unhide easily?Showing the sub-form(savingsfrm1) and and hiding the main form(riskfrm1)Public savingsfrm1 As Savings
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
[Code]...
basically i have a form with loads of controls. So many infact it stretches the whole hieght of my screen.I only need half these showing since the rest are just a sort of 'log'I have seen ti done loads, that only the controls i want to show at start up are displayed then when some one hits a little button in the bottem it expands the rest leaving them showing to.
View 9 RepliesI have a visual basic 2010 project that has a menu item hidden (visibility). there is a second form (child window) that you can popup and hit a button to show the menu item. I am having trouble finding the right commands to do this. I am use to C and the API where you can get the handle to the parent windows menu, and do it that way. But I have been unsuccessful in VB.
View 4 RepliesHow do I stop the bottom of the form from hiding behind the taskbar?
View 11 RepliesI have a form that is the main form.I don't want it to show when it loads, but when I do Me.Hide() in the Form_Load event, it flickers visible before it hides. Because before I made this form the main form, the one I was using previously didn't flicker.
View 15 RepliesI've created a program with a login form. Once you log in, the login form should close and the next form should display... my problem is...
If I use Me.Close()... than both forms close and the application terminates.
If I use Me.Hide()... than the application never unloads from memory and run indefinitely.
So what do I do? Neither of these work how I need them to.
So i want to start an application with my vb.net app and it should start as a hidden process, meaning no window and nothing in the task bar, only in the task manager ofcourse.
This is what i do
Dim fov As New Process
If CheckBox2.Checked = True Then
RichTextBox1.Text = RichTextBox1.Text & vbCrLf & "* - Launching"
fov.StartInfo.FileName = ("test.exe")
[Code]...
This does not work.. I have also tried the "fov.StartInfo.CreateNoWindow = True" command which does not work either. I can live with a solution that would start the window minimized instead of totally hidden.
How do I remove the maximize button from a form? I've already disabled it but it still shows up, it just doesn't work. I want a form with only the close and minimize buttons. It's a Windows Form Application and I'm using Visual Studio 2010.
View 3 RepliesI have a vb.net program that opens up an excel workbook and runs a macro ("Report") in that workbook when a button is clicked. [code]...
View 1 RepliesI'm planning on a private software, that I wish that have multiple pages, like a installer. It will not be a installer or anything, and I don't want to use tabs on it (it doesn't fit to what I'm thinking.) How can I do it? I've tought on multiple forms, but I don't see how can I load another form while I hide the current 'on-the-fly'.
View 4 RepliesI have a form which has a picturebox and after clicking on a button another form will appear with a picture box containing the exact same picture. I use this line of code:Image1.Image = vImage.Image..The thing is after I do this i need to hide the form and show it again to be able to see the changes.[code]
View 1 RepliesIt is times like these that I miss the old VB6 language I wish I could hide the current forn and show another form which - this is the important thing - to be on the same level that the previous form was . You see , I used to use this code :
Me.Hide Form2.Show However , sometimes in VB .NET this does not work the way I want it to . You see , the current form does get hidden and Form2 is shown indeed ; however , Form2 is shown somewhere in the background . If there are other programs opened at that time , then Form2 is shown behind all those programs , that's what I mean by saying I want it to be shown in the same level as the previous form was the only way out , I found , was to reverse the code :
Form2.Show Me.Hide In this way Form2 is successfully shown right where the previous form was shown (above the other programs) but in some cases this also is not pleasant because it might take some time for Form2 to load while at the same time the previous form is still visible on the screen and therefore for a slight time both forms are shown one over the other , which is surely not nice . That's why I still want to first hide the first form and later show Form2 .
I'm having an issue with my app where IE will get brought to the front of the screen when I am switching between forms. Basically I have a form with the man menu which consist of a few command buttons that will start up another form once a user clicks on the button. I do not want the users loading up multiple forms in my application, so once they load one form I end up hiding the main form. So my code looks as shown below when a button is clicked.
[Code]...
As part of a new program, I need 2 forms and an openfiledialog. On Form1, a button event opens Form2. Form2 has an openfiledialog triggered by a button shown below.
'Form1's button to open Form2
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
[Code].....
Is there any way of hiding the tab page headers without having to create a new user control?
View 2 RepliesI am trying to write a program that takes the input of a CSV file, makes modifications, and prompts the user on how to handle certain modifications.
I have the parsing of the CSV file complete, the handling of most of the string manipulation down, and the user interface complete, except when it comes time to move onto the next record.
I had it display the form as a modal dialog, and used me.hide() once it was over to continue with the program. However, when it gets to the next ShowDialog(), it says that the object has been disposed! I've tried a modeless dialog, with a while loop that waits for a boolean to be flipped by a button on the dialog being clicked, but that, as predicted, did not turn out so well and just shot the processor load to 100%.
One thing I notice in looking around is that I have everything based on the "home" form, the initial one that comes up when the program is run. Is this incorrect coding? Does this require the prompt being on a child form?
I have a windows forms application with several 'child' forms. (It's not MDI, and I don't want it to be).Normally everything runs fine, but on occasion windows gets into a state where all of the 'child' forms on the application are invisible when they should be on top of the main application. The oddest part is if I move another application's window over my application (i.e. explorer or notepad) the child form becomes visible within the boundaries of the other application. It's like windows is drawing my main form over top of the rest of the forms in my application without regard the z order, or topmost flag, or anything. If I cover the main form with a notepad window, etc. It draws my 'child' forms properly. Rebooting the computer and restarting the application temporarily solves the problem.
View 3 Repliesi have an assignemnt in my visual basic express 2008 class, were i have to type in an image name, like paris.jpeg,and automatically manipulate the file to be called paris-steg.png. Once this happens i click the manipulate image button and the image should be altered so that paris-steg.png has a message hidden in it. Then i have to decode that message. At this point im having troubel getting the file name to automatically appear as paris-steg.jpeg, and you will proabbly see why with my code. I need to know how to do this. The way i have it, i basiaclly add -steg.png onto the text typed into the text box, this doesnt work when the user types in paris.jpeg as it comes out as paris.jpeg-steg.png. heres the instructiosn and my code
(6) When the text file does not exist, alert the user with a message box and do not do any further processing.
(6) When the image file does not exist, alert the user with a message box and do not do any further processing.
[code]...
In this program you should read text from a file one character at a time instead of one line at a time. If <tt>sr</tt> is an IO.StreamReader, then <tt>sr.Read()</tt> will return an integer that is the value of the next character in the file. Use <tt>Read</tt> instead of <tt>ReadLine</tt> in this program.You can check whether a file exists by using the code <tt>IO.File.Exists(filename )</tt> . The function will return a Boolean value (True if the file exists but False if not).
You can check whether a string ends with a specified pattern by using the <tt>EndsWidth(pattern )</tt> function. For example, if <tt>s</tt> is a String, then <tt>s.EndsWidth(".txt")</tt> will return a Boolean value (True if <tt>s</tt> ends with the pattern but False otherwise).In a string, <tt>IndexOf(pattern )</tt> gives the first position where the pattern exists, but <tt>LastIndexOf</tt> gives the very last position where the pattern exists.The code <tt>s = Chr(i)</tt> converts the Integer <tt>i</tt> into a character and assigns the character to the string <tt>s</tt> .