Changing Visibility Of Objects Without Using MDI Forms?

Nov 26, 2009

Currently my program randomly removes words from a set of text and inserts textboxes below the text. The user can then enter his/her answers in the new textboxes. What I would like to do is set the program so the user can have two choices one being Easy and other being Advanced. Then when the user hits either button it brings up everything that is currently on the form. I'd prefer to do this without having to use MDI forms. I've had a hard time using the MDI forms and therefore would like to avoid using them. They way I was thinking this could work is all objects would remain invisible except for the 2 buttons and then when you hit one of them they disappear and everything else appears.

View 1 Replies


ADVERTISEMENT

Objects Set To Nothing After Changing Forms?

Dec 19, 2010

In form frmAddPlayers I declare and create an array of pictureboxes in the Load event using the code:

Dim
pbxPlayerJoined(7) As
PictureBox

[code]....

In the watch window the value of the pictureboxes is System.Windows.Forms.PictureBox. Later in the load event I start a background worker in form sfrmUSBDevice using the code:

sfrmUSBDevice.sReadWriteThread.RunWorkerAsync()

The background worker waits for user input and then calls a subroutine from form frmAddPlayers. The subroutine changes the image in the picturebox to indicate that the user input has taken place. However when the debugger returns from sfrmUSBDevice to frmAddPlayers the watch window shows that all of the pictureboxes have a value of nothing. Then when I try to change the image of the picturebox I get an "Object reference not set to an instance of an object" exception. It seems like when the debugger goes to the sfrmUSBDevice form and comes back to frmAddPlayers the objects on frmAddPlayers have lost their information.

View 5 Replies

Changing Visibility Of Picturebox With Timer Tick?

Jun 10, 2012

I have a timer that on tick checks to see the value of a an element in an array using a counter on another form as well. The picture boxes are initially set to false for visible and they should become true when the timer ticks and the element is equal to 1. I know that the pictureboxes have a valid picture in them because if I initialize them as TRUE first, it shows up properly. I also know that I am entering the IF statement because I can put a simple MsgBox with any string in the IF statement and it will display when the requirements are set. But yet the pictureboxes still do not change.

Public Sub test_timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles test_timer1.Tick
If tron.left_arm_full(tron.left_all_on_counter) = 1 Then

[code]....

View 3 Replies

Changing Panel Visibility Property On Radiobuttonlist Selection In Asp.net Page?

Feb 4, 2010

On my .aspx page i want to be able to show and hide certain panels depending on user selections (radiobuttonlists).

For example in my aspx page i have;

<form id="form1" runat="server">
<asp:RadioButtonList ID="RadioButtonList1" runat="server" AutoPostBack="True">
<asp:ListItem>1</asp:ListItem>

[Code].....

View 2 Replies

Make Objects From The ToolBox Using Code Instead Of Changing Existing Objects Invisible Then Visible Later?

Dec 5, 2011

make objects from the ToolBox using code instead of changing existing objects invisible then visible later?

View 7 Replies

Forms :: Databinding Visibility Property Of A Textbox?

Dec 5, 2009

I seem to be having a problem binding the visibility property of a textbox to a database value using the advanced binding property.

I found this article (BUG: Inconsistent behavior when you bind the Visible property of a Windows Form control to a Boolean field) stating there is a bug in some older versions of the .net framework.

Does anyone know if this has been fixed in 4.0?

View 2 Replies

Forms :: Programmatically Setting Controls Visibility?

Nov 9, 2009

I have a panel with 5 labels and 5 listviews in it. By default they are hidden. At runtime I want only the ones shown that are needed. For example, if there are enough players for three tables then three tables should show up. I know how to make the controls visible, but not sure how to control how many are actually displayed. I also think I may have to do seperate loops and seperate the control types?

Private Sub Set_Tables()
Dim tables As Long
tables = Math.Ceiling(NumPlayers / NumPerTable)

[Code].....

View 1 Replies

Forms :: RichTextBox - Changing Font Size Without Changing Families And Styles

Sep 21, 2010

I'm searching for a way to change the font size of selected text in a RichTextBox (rtf) having different font families (e.g. Arial and MS SansSerif) and font styles (underline, bold...) using the FontDialog, but without changing the families and styles. The following code resets all the font attributes, which is not what I want:

[Code]...

View 5 Replies

Changing An Objects Location Programmatically

Oct 26, 2010

I am trying to change an objects location programmatically. I have the line: Trackbar1.Location.Y=100 but recieve the error: Expression is a value and therfore cannot be the target of an assignment. Does anyone know how to get around this?

View 2 Replies

Changing Datatypes Of Properties Of Serialized Objects?

Jun 18, 2009

Changing datatypes of properties of serialized objects?

View 1 Replies

VS 2008 Adding A Method To All Forms Existing Forms Without Changing Their Code?

Jul 28, 2009

just wondering if it is possible to add a method to all forms in my project without having to do it on one form and Inherit all my other forms from that one

View 3 Replies

Forms :: Retrieve Values From Objects Between Forms?

Feb 9, 2009

In VB.net how do you retrieve an value from a object in a different form.
eg:

' on frmMain

MsgBox ("Say ""Hello World"" Mr. " & frmOther.txtName.text)

View 7 Replies

.net - Given A Large Number Of Objects, Create Multiple Forms In Designer For Them Or Use Code To Create The Forms?

Dec 29, 2010

If I have a large number of classes, each similar to the other in certain aspects (they all share a common base class, but each does things differently), and I need to create Windows forms for each to allow easy changing of their values through a GUI? Create one matching form for each object in VS' forms designer, Or Use code to create the forms dynamically at runtime.

#2 makes the most sense to me, because a lot of these objects will share very common features of the form, notably "Ok" and "Cancel" buttons. But one object might need to draw a textbox on the form while another might need to draw a combobox. Not to mention, if I want to put icons on the "Ok" and "Cancel" buttons, I'd have to do this for each copy of the form in designer, and that sounds like it could get out of hand quickly.But is drawing forms through code sane? VS' forms designer is pretty sophisticated and designed to make life easier. Am I wise to consider ignoring its functionality and diving into the trench warfare of forms design through code? Or are there examples of automating form creation based on an existing object's properties?

View 1 Replies

Forms :: Use Index Of Objects In Vb6?

Nov 16, 2009

I would like to use index of objects in vb6 to upgrade into vb.net, I have seen some topic but I could not do it

For exmaple(in Vb6)
Public Sub Update_PriorMenus()
'This sub read amoun projects and display in menu.

[Code].....

View 5 Replies

Passing Objects Between Forms?

Aug 11, 2010

I'm translating a document management application from vb6. I want to program with good habits and technique, so I'm asking for your opinion really rather than just a solution.I have a decent understanding of OOP, but I'm not very experienced in VB at all. What I'm doing now is trying to figure out the best way to pass objects between forms.For example, in my initialization form, I have an object that stores a group of database connections. I need to pass this object around because reconnecting takes a significant amount of time. There are other objects such as user info and permissions.

Public Class Form 1
Dim DB = New DBobject
Public Sub Form1_Load

[code]......

View 5 Replies

Forms :: Accessing Objects At Runtime?

May 24, 2010

I need to dynamically access a bindingnavigator, is this possible? I basically want to have code in my Base form which enables or disables it's descendant's menu buttons depending on access rights.

View 2 Replies

Forms :: Converting Strings To Objects?

May 6, 2010

Can you look at this code? It's a class module that I made so I can make our application more modular.

In the code there are 3 lines of code which have this as part of it: FormBrowseAttendance.ComboBoxLookupStudent.how I can change the coding to refer to this portion of code using these parameters:

pComboBoxName
pNameOfForm

I'm assuming these need to converted is some way but I don't know how to do it.

[Code]...

View 3 Replies

Forms :: Datagrid Bind Using Objects?

Jan 7, 2010

i created a class i invoke the class as object in vb.forms i want bind object(parameters) to datagrid when return as arraylist from methods in form_load. i want to bind arraylist to datagird in form_load.it will bind, the grid show all the parameter from arraylist.but i want few columns to bind from arrylist.here arraylist is convert from list from method.

View 1 Replies

Forms :: Displaying Objects On PropertyGrid

Mar 31, 2009

I am having a problem with objects that have other objects as properties on a property grid. Now when I display the object clsPropsFrame on the property grid, everything shows up as expected, except when I try to edit the x, y, or z of location which is of type clsPropsVec3, it ignores the change. What's strange is that when I type the vector in as a string (like "0, 16, 0"), it changes.

I have the following
'//////////////////Object Component///////////////////////////
<TypeConverter(GetType(ExpandableObjectConverter))> _
Public Class clsPropsVec3
Inherits ExpandableObjectConverter
Private refvec As TV_3DVECTOR
Public Sub New()
[Code] .....

I noticed that when I changed a component of clsPropsVec3, the property change in clsPropsFrame does not get executed. I tried making it fire of an event when a component is changed in clsPropsVec3, with the following additional
Public Property X() As Single
Get
Return refvec.x
End Get
Set(ByVal value As Single)
[Code] .....
But for some reason it ever fires off the ValueChanged event. So how can I make the sub properties of clsPropsVec3 work?

View 10 Replies

Forms :: Objects Not Displayed With Wav Sound?

Sep 6, 2009

With VB6 and VB9, I continue to have problems displaying images on a form while playing wav files (either by API call or by My.Computer.Audio.Play method).I set up a loop to display pictureboxes on a form (card images), with a wav sound file that is supposed to be played each time a picturebox is displayed. However the pictureboxes won't display until after the loop finishes and the sounds have been played several times in series:Example

For I = 0 To 3
picBox(I).Visible = True ' picBox is an object collection of pictureboxes
My.Computer.Audio.

[code].....

View 2 Replies

Forms :: Use The Database Objects From One Form To Another?

Jul 8, 2009

How can we use the database objects from one form to another? Eg. In my Login form a person enters his user-name and password & if it is correct, the code directs him to another form(Form2). Now in Form2 How will I get which person has entered in?

View 1 Replies

Relative Positioning Of Objects On Forms?

Aug 21, 2009

how to make buttons and other objects move to the center of the form and possibly grow in size when form is maximized and also move back to its position when minimized.

View 2 Replies

VS 2005 Ambiguous Forms / Objects

Jun 9, 2009

I was working on one of my forms, not doing anything crazy or out of the ordinary, just adding a control to the form. When all of a sudden vb became real sluggish and barely responsive, so I closed VS and restarted the computer. Got back into my project and now I can't open any form. Opening a form gives me <b>failed to parse method 'InitializeComponent'. The parser reported the following error 'Error HRESULT E_FAIL has been returned from a call to a COM component.'. Please look in the task lisk for potential errors.</b>.Error list sometimes contains 102 errors, and sometime just one that says I have exceeded the maximum number of errors. When it contains 102, every single one of the errors is <b> [Object/Form] is ambiguous in the namespace [Project] </b>.

I can't open any designers right now, every single one of them gives the failed to parse method error. If I rename, lets say frmAbout to frmAbout1, then I can see that form.There is only one of everything in Solution Explorer, no duplicates. There are no duplicates in the folder either. I can open the code for each form/object and see it just fine, and looks fine too. Code is not duplicated or anything.

View 2 Replies

Changing The Border Of Forms?

Dec 7, 2010

how I could go about Changing the border of my Forms and the title bar of the forms. I would like to change it globally so that it would take effect on all my forms.

View 3 Replies

Forms :: Changing Data In An Xml Tag?

Jun 8, 2012

I have the below code that can change the data in one XML tag. This is what I want,however, I want it to change all the XML's in a complete directory:

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim MyXML As New XmlDocument()

[code].....

View 1 Replies

Forms :: Changing Look Of Tab Control

Sep 17, 2009

I'm quite new at this but I'm trying to change the look of a tab control other than the options provided in the control's properties. In short I want to create a large tab that will fit a picture but I don't know how to change the size of the tab. I also want to make the control look somewhat different than what the control provided with VS.NET looks like.

What I need to know is how to create a custom control that operates the same as tabcontrol but looks different than the traditional control provided with VS. I tried looking up how to create a custom control but all I could find was how to create one programatically and I don't know how it would apply to a tab control. Maybe the only way to do it is programmatically but I would rather play with the control in the designer than having it appear only at runtime.

View 1 Replies

Forms :: Event Handling For Dynamic Objects?

Feb 3, 2010

I am trying to create a form where depending on what the user selects, they are shown a collection of images from the web. Depending on what they select there will be a different amount of images so each picture will need to be added dynamically.

I am able to create PictureBoxes dynamically however I'm stumped how to create event handling in order for each control to give a unique response.This is what I originally tried but I got an error..

Private Sub Form1_Load
For i=0 To 10
Dim picBox As PictureBox

[code]....

The error I got was

'AddressOf' operand must be the name of a method (without parentheses)

How ridiculous that you can't include arguments in your AddressOf! Can anyone shed some light on my situation (or knows a better way of carrying out my goal)?

View 2 Replies

Forms :: Making Objects Move Diagonaly?

Nov 11, 2009

Im trying to make a radiobutton move diagonaly, (Dont ask why a radiobutton, i did it in college last week) For some strange reason though I need another radiobutton just going across the screen in order for my diagonal radiobutton to move.I would like to develop this into a game like pong, when I have gone further into VB.

View 3 Replies

Changing Forms Title At Runtime?

Oct 9, 2011

I'm trying to change a forms title at runtime where it = my textbox's text. But I can't even get it to change to "test". When I try to google it, it comes up with vb6's
.caption = "test".
When I try to search it on the forum, it gives me a error message saying:
"Error 502 Bad gateway"

View 10 Replies

Does Changing Forms Start A New Thread

Feb 17, 2012

I have a basic form which call functions on a numbers of different forms up to (30), Do these functions run in parrallel, or are they run sequentually.Each function as present calls for disk access, if the threads are running in series, this will present a considrable relay, this is not acceptable.

View 10 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved