Jumping Between Forms - Making A Form Visible And Not Visible
Jul 17, 2009
I'm having an odd problem when making a form visible and not visible and it not continuing to function. Here is what I have happening. I have a main form (frmMain) that is an MDIParent. On this form I have a menu to open a second form (frmCalculate) and populate a listview from Items in the database.
As I click or select items in the listview on frmCalculate the tag is read and data is pulled based on the id stored in that tag and fills in various fields on the form. This works great. However, I also have a context menu attached to the listview that allows me to perform a "what if" scenerio on the items I am calculating. When I select this menu, I hide the frmCalculate and open the frmWhatIf form where I can mess around with values on the item I had hilighted in the listview on frmCalculate. Nothing is pulled from or written back to the database here, all the information is filled in from fields on frmCalculate. It just allows me to look at rising costs and how they will affect my margins.... anyway.
If I then close frmWhatIf, it brings my frmCalculate back by setting its visible propery to true (never closed frmCalculate, just hid it). At this point if I click an item in the listview I get an exception for a null reference. IF however I never hide frmCalculate, I can open and close frmWhatIF without ever having an issue. Why do I lose the functionality to select items just by hiding and unhiding the form? As a test I added two menus to the toolbar on frmMain one called hide and one called show. I then opened frmCalculate with original menu item to populate the listview and selected a few items to test that it was working and then using the hide menu I made the form invisible and the show button to bring it back. This yielded the same exception so without even opening frmWhatIf the problem still occurs.
View 3 Replies
ADVERTISEMENT
Jan 25, 2011
I have five menu items that i have created as a user control and placed on the master page. Now i want one of the menu items to be visible only for particular user role and not visible for others. Here is what I did. Its not working though.
[Code]...
View 6 Replies
Feb 8, 2012
The basis of the program is that the user enters info into to text boxes then hits a button, when the button is clicked and all the parameters are met, the visible property of a rather large picture box becomes true. What I want to do is have the form start off small, just big enough to hold the labels, text boxes and buttons and then resize when the picture box is made visible.
View 2 Replies
Aug 18, 2009
Below is the exception code info. when I try to make form visible for the first time from another form then I get an exception code. something like 'a required variable not set'
Quote:
CODE:
View 7 Replies
Feb 12, 2010
i use a picture control in mdi form .. but when i load child froms then mdi form picture are also show in front of child form...
View 7 Replies
Jan 28, 2009
I've got a panel - that's in a group box. All of this - with lots of other textboxes on labels - is in another panel (the big panel).I make the big panel visible and not visible based on selections made by the user.This small panel - that's in the group box. I cannot seem to make it appear.Even if I leave it VISIBLE at design time - the objects in it will not appear.Is there some kind of nesting problem that I'm not aware of!
View 9 Replies
Dec 13, 2009
I have a CheckedListBox with 6 different indices that all correspond to a textBox. For example: Index 0 corresponds with TextBox1, Index 1 corresponds with TextBox2, and so forth. When the user selects the item in the CheckedListBox, the TextBox with that particular index becomes visible. I am at a loss. I have been working on this for 4 days now, with no end in sight!
CODE:
View 7 Replies
Feb 6, 2012
I am disabling combobox in VB.net. But in disable mode it not visible properly. I tried changing both BackColor and ForeColor but it is not working.
Code :
cmbbox.BackColor = Color.FromName("Window")
or
cmbbox.ForeColor = Color.FromName("Window")
I am making my component enable false.But I want to make it viewable.You can reffer the link.This is what exacly I want but in VB.Net : A combobox that looks decent when it is disabled
View 2 Replies
Dec 21, 2011
I am trying to make a customer class that will simply make a bunch of controls (hotspots) Visible value = False.
For instance: WinStartSpot.visible = False
Thing is I have roughly 60 "spots" that need to be turned on and off as the user clicks through the program (its a very simple OS simulator) I tried to make a class using boolean return but that failed miserably. how to code a class like that?
View 7 Replies
Jun 1, 2012
I have the following in my code:
lblIsInvalid.Visible = True
I have noticed that even after going to this line, it does not make the label visible. I am thinking this may be a refresh issue as the last line hit is lblIsInvalid.Visible = True. Is there any refresh property that I may not be aware of for a label control.
View 1 Replies
Jul 19, 2011
I have set up a GridView as set out below. You can see there are four LinkButton's per row. What I want to do is make certain LinkButtons available depending on which row they appear in.
<asp:GridView ID="FormsGrid" runat="server" Width="657px" Height="250px" DataKeyNames="FORM_NAME,FORM_ACCESS,STATUS,ID"
AutoGenerateColumns="False" DataSourceID="SqlDataSource1" >
<Columns>
<asp:BoundField DataField="DEADLINE_DATE" HeaderText="Date" DataFormatString="{0:d}"
SortExpression="DEADLINE_DATE" />
[Code] .....
When I try to make them not visible use the code below in FormsGrid_RowDataBound, it doesn't work and a get a null value error.
if e.Row.Cells(4).Text = "1" then
Dim FLbtn As LinkButton = FormsGrid.FindControl("FormLinkBtn")
FLbtn.Visible = True
Dim NRbtn As LinkButton = FormsGrid.FindControl("NotReqBtn")
NRbtn.Visible = False
[Code] .....
Also when I click say the FormLinkBtn, how do I determine the value of the fields in that particular row?
View 1 Replies
Jan 26, 2010
I'm making a project that has a bunch of different types of calculators in the same tab within a tab control. To organize these calculators, I put each one in a groupbox, there are about 5 or 6 in all. When I was finished designing all of them, I placed all the groupboxes in the spot they needed to be, but once I started creating the events for them to be visible or not visible there are a bunch that don't show up. I think it has to do with the fact that VB thinks that the groupbox is part of another groupbox that isn't visible so it doesn't show.
How can I go about only showing a single calculator at once in my tab?
View 2 Replies
Jun 28, 2010
I have placed several PictureBox Images of different colored dots(which represent lights) on an image of a Christmas Tree. I can make the lights randomly flash using a randomGenerator and a Select case statement. However, the code is very long. There are 67 lights on this tree and the code is 71 pages long. There has to be an easier way to do this. So far I have tried the following with two images of lights just to see if it would work and it does not work:
Dim picLight(2) As
Boolean
For intX
[code]....
View 8 Replies
Jul 3, 2009
I want to be able to click on one toolstrip button and hide it while making another visible.I tried the .show and .hide expressions but they come up with an error.
View 4 Replies
May 9, 2012
I am using the Tabcontrol with autoscroll = True feature, when i make hidden controls visible on the tab there position is out of place, one work around for this is to set the scroll position to 0,0 by doing this...
[Code]....
View 2 Replies
Sep 5, 2010
Using Visual Basic 2008 Express. I need to pass a variable to another form. Or else make the variable visible to both forms.
View 4 Replies
Sep 6, 2011
i need to make a textbox in my windowsform after 3 seconds.
View 3 Replies
Jul 3, 2010
i am using a method in form1 same method i want to use in form2 . I tried the public and private keyword but nothing happens.
View 8 Replies
Aug 27, 2009
can anyone tell me how to set groupboxes to visible one by one on one forms if that form contains 10 groupboxes....
View 13 Replies
Dec 18, 2009
I have a form (Form1 class) which has got a "next" button (like we have setup wizards) which shud take me to other form. Now that other form has two buttons , next and back , and it shud take me to the previous and the next form. And I want to preserve the states of each form. What I did was that I instantiated the Form2 class in the click event of the next button : [code]That does the job of showing the second form . In the click event (of the back button) handler of the second form , I have the following [code]Now , when I press the back button , the program hangs. And nothing happens. how to hide/show forms with .NET. In VB6 it's quite easy using Show/Hide methods.
View 6 Replies
May 30, 2010
I am starting to debudg my application in depth, and have realised that at certian points, if you close what appears to be the only open form, the application stays open. I was just wondering if there exists somewhere, a list of all open forms that you can view during debugging?Alternatively, is there a quick piece of code to close all non visible forms?
For Each frm In Application.OpenForms
frm.Close()
Next
Doesn't seem to work
View 1 Replies
Apr 3, 2011
I have a different kind of issue inside my code. I can not use my code as era. I have a simple code to make form drop from visible status but it is not working. I could not manage this problem.
//This is my code
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
[code].....
View 3 Replies
Mar 30, 2011
Okay, so I'm doing a card game and I'm trying to set that when picturebox (PictureBox1) is clicked, a random card from 13 cards will come visible. Problem is, that when i start the program and click the picturebox, the same card will always come visible. As you can see i've put a button (Button1) which will hide every card. If I press Button2, then Button1 and then the PictureBox1 it will show differend card, but the cards which come visible are always the same.
e.g i press PictureBox1 (which will make card visible), then Button1 (which will make PictureBox1 non-enabled) and then Button2 (which will hide every card and make PictureBox1 pressable). Lets say i pressed the PictureBox1 four times and i got cards: 9, 6, 7, 3, then I close the program, start it again and press PictureBox1 again 4 times and it will show the same cards (9, 6, 7, 3). How can this be done that it will not show the same cards always?
Here's my code...
Public Class Form1
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
End
[CODE]....
View 3 Replies
Dec 21, 2009
if I set the property Opacity = 0, a form becomes transparent... but become transparent all it controls, too!how to make transparent ONLY the form and let the controls, labels, buttons etc. visible??
View 3 Replies
May 18, 2012
I understand the properties to change a button from visible to invisible, but I need to be able to have two buttons alternate visibility when the first button is clicked.It's for a game. The first button is to "Begin Game" and on open, the invisible button that sits over it is called "Begin Again" which I would like to only appear once the Begin Game button has already been clicked. This would then trigger the "Begin Game" to become invisible.
View 3 Replies
Aug 20, 2010
When I make my form Opacity 0% everything disappears including controls that I know will happen im not dumb ok so I tried another method using Transparency Key I had success BUT my problem there is that when I have a picture box and an image IN the picture box around the image is the Form Background color so lets say I picked Maroon for Form1.BackColor, The edges of my image is Maroon
View 6 Replies
Feb 16, 2012
I am having trouble finding a way to make the form transparent but the controls still visible. The only transparency I have been able to get to work on the form is
Me.Opacity = <value between 0 and 1>
but that affects all the controls on the form Is there a way to make the controls not inherit this property from the form? Is there another way to make the form transparent? I have buttons and a checkbox that I don't want to be affected by the transparency at all, and a picturebox that I do want to be able to control the level of transparency. Currently, I'm using a slider bar, and controlling the opacity of the form, but that makes everything on the form transparent. I'd actually like for the form itself to be completely invisible, and for my slider bar to control the opacity of the picturebox only.
View 3 Replies
May 1, 2012
if I set the property Opacity = 0, a form becomes transparent... but become transparent all it controls, too!how to make transparent ONLY the form and let the controls, labels, buttons etc. visible??
View 2 Replies
Jan 24, 2009
I have a number of listboxes such as lstDivision1, lstDivision2 and so on. A user can choose the division they are interested in using code similar to:
For Each item As Object in lstDivision1.Items
lstDivision.Items.Add (item)
Next
These listboxes have their Visible Property set to False. The contents are copied to lstDivision which is visible on the form.What I want to know is how I can ensure that the correct listbox is being copied to lstDivision?
View 2 Replies
Sep 11, 2010
I have a access table column ("d") and rows with value Datetime. How can I ..... when form load make the datetime now ..visible. What is the code for making the rows with datetime value now start with index 0.
View 4 Replies