VS 2010 Multiple Layers Of Controls On Form?
Oct 1, 2010
How would I go about doing multiple layers on a form?Say the first layer contains a command button that when its click, it changes to the second layer hiding the command button and showing the controls on the second layer?
View 6 Replies
ADVERTISEMENT
Feb 20, 2010
Back in Visual Basic 6.0 and prior I could have a picturebox control and then have multiple images on that and using a gif file; then I'd have some images transparent. For example, I am trying to make a map where each country has it's own layer and the void is transparent so the underlying picturebox contains all the water.
However, in visual studio I've noticed the image control is now gone. I tried using a panel and a picturebox on top of that and it works but I can't use another picturebox on top of that picturebox, nor can I stack multiple panels with the same affect.
View 6 Replies
Feb 7, 2011
I want to create a game using visual basic 2010. I'm a specialist in VBA and Excel but not VB 2010.I want to display and hide a whole group of objects. In Acces I used for such cases the TabControl. For example in Tab1 the Game, in Tab2 the highscore and in Tab3 the options. Then I made it transparent, so that the Tabs (Buttons) are not visible, only the objects in Tab1 Tab2 and Tab3. With VBA I select the Tabs controlled by my own buttons (jpg). I tried the same in VB 2010. Without success.What can I do to switch between game, highscore and options without using popups. I want to display them at the same positions. So game objects and option objects should hide and highscore objects should be shown. And the other way round. Like the handling is with different layers in photoshop!
View 2 Replies
Aug 26, 2010
When I click a cell or a row in a datagridview I want to be able to open a new form with several textboxes and comboboxes in it and to be able to edit the selected row. The only thing I managed to do so far, was to fill a texbox from the form with the info from the sellected cell using the following code.
Dim
cell As
DataGridViewCell
[Code]....
View 2 Replies
Mar 9, 2011
I have eight NumericUpDown controls in my form, I call them NumericUpDown_1 thru NumericUpdown 8. I first noticed when I set a breakpoint in say NumericUpDown_1 routine and have code inside this routine to manipulate say NumericUpdown_6's value, the code would immediate jump to NumericUpdown_6 routine because the value changed. This makes sense since the handler fires due to the default handler - numericUpDown_valuechanges. But I do not want this to happen so I removed the handlers for all NumericUpdownX routines, one thru eight and instead I use "addhandler" and "removehandler" statements inside the individual routines to "mask off" this problem every time I change a numericUpDown.Value that is not in it's own routine.
My problem is this does not work. What I found is if I use removehandler numericUPDown_x.valuechange addressof numericUpdown_valuechange statement the coding would work however when I'm done in that routine I follow up with addhandler numericUpDown... statement and I'm back to the same problem. A different numericUpDown routine will fire because I changed it's value in another routine but I had the handler removed before I changed it's value so I don't understand. It's almost like it remembered that it's value changed as soon as I turned back on the handler using addhandler. I'm working with Visual Basic 2010.
View 13 Replies
May 23, 2012
I'm trying to iterate through a group of ComboBoxes and set a property using a concatenated string & variable to represent the name of the control. However, I can't get the instance of the form to recognize the (String & Integer_Variable) as one of its controls -- and so it doesn't recognize any of the appropriate properties or subroutines as members of the System.Windows.Forms.Control.Is there a cleaner way to do this?
For myTempCount = 1 To 6
If tempValue < Me.("ComboBox" & myTempCount).Items.Count Then
ComboBox.SelectedIndex = tempValue 'appears to work -- how?[code].....
This code was originally VBA / VB6, which I put through ArtinSoft's Visual Basic Upgrade Companion (VBUC). FWIW, I'm using Microsoft Visual Basic 2010 Express.
View 3 Replies
Jul 18, 2009
Im currently working on a project using VS2008. One of the features of this applications is to enable the user to change the theme either buy selecting preset ones or defining there own. The themes used in this application are not the default windows ones. I basically created my own window, titlebar etc... with the use of panels and removed teh windows form borders. So its basically coloring the controls on the form. At the moment the theme information is stored in a "txt" file and when the application loads, it applies the theme to the current form. However, there is more than 1 form within this application. I dont want to write many lines of code to apply certain design/appearance properties to every control in the form. So is there a way to apply settings to a group of controls?
EG: Make all textboxes BackColor Blue
My application also has widgets. All widgets are panels with their names prefixed as "Pnl_WIDGET". Is there also a way to set propeties to all panles with the name beginning with "Pnl_WIDGET"?
View 2 Replies
Nov 28, 2011
I'm attempting to create multiple PictureBox controls. This is as close as I've got this thing to work:
vb.net
Dim Obj(6) As PictureBox, i As Byte
Dim Pics() As Image = New Image() { _
[code]....
However, it gives me this error on run-time:
Quote:
Object reference not set to an instance of an object. on the line "Obj(i).Image = Pics(i)".It would work if I was able to create a 'new' instance: Dim Obj(6) As New PictureBox, however apperntly:
Quote:
Arrays cannot be declared with 'New'.I am pretty sure that my image resource files are 'instances' of objects'' because the code works fine when every statement is written out separately (no arrays).
View 2 Replies
Oct 8, 2011
I'm very new to VB and am struggling with a problem! I have a form with mutiple (100) textboxes and buttons. I have set the properties of some of the buttons so that the text is draggable, but I want to be able to drag it to every textbox. I have posted a snippet of code below that allows me to drag ot to box 1 and 2, but is there any way that I can set it to drag to all boxes without having to individually specifying them? The same goes for dragging text between boxes...i'm sure there must be some way of specifying multiple drag and drop locations without the laborious task of specifying each as an individual sub? Code below
[Code]...
View 5 Replies
Jun 2, 2011
Still using VS 2005. My concept is to use the same form space to display different "pages", like a "wizard" where you click the [Next] button, and the current UI disappears and a new UI appears. I want to "turn off" multiple controls and "turn on" multiple other controls. Example code: -
Private Sub
Button4_Click(ByVal
sender
[Code].....
View 8 Replies
Aug 25, 2010
At design time in the IDE, you can ctrl-click or drag a box around multiple controls on a form and move them all at once. How do you do that at runtime. I need to be able to create image maps based on textual copies of medical claim forms that are generated from different systems and the ability to create dynamic label controls and move a single or multiple controls and resize is required. How does MS do this in the IDE?
View 7 Replies
Nov 10, 2010
I have a form that I will be using to keep track of data for computers I build and will eventually link into a database for configuration management, but for right now I'm just trying to get the basic form layout done and functional. I need this for to be customized for each job I do, that means I can have multiple computers, PC card, peripheral equipment, etc. So with that said basically what I have done is created a user control for each separate item that I want to add (i.e. computer, PC card, etc) that has all the fields and functions I require. When I want to add another computer I just add a tab and place my "computer" user control on it, no big deal...
My issue is when I want to add my "PC card" user control to that "computer" user control. What I am trying to do is to add the first user control(PC Card Info) I created under a button called "Add New PC Card" (which is part of the "computer" user control.)and that part works! What I want to do is keep added as many "pc card"user controls as I need and basically keep appending them under the last control on the bottom of the page (which is the "pc card" user control, that is a groupbox with a few drop down boxes and text boxes in it.)with a little spacing between them. The biggest problem I am having is when I add the first "PC Card" user control, it works.. but when I try to add another one and search the current page for all user controls under a certain point or with a specific name, I don't get any results.
I think I'm on the right track with the following code but I am running into 2 things I can't do that are critical to my needs. 1: I need to define the text of the user control I just added so I can uniquely identify it, so If I need to remove it I can and will also play a role later( I thought if there was some way in code to make my control # a variable that may work) 2: I need to know what to look for since I have a count that represents how many of that particular control exist on my form, that way I can name them properly, this will also allow me a method to delete the user control if desired.
Dim pccard As New PC_Card
Dim x As Integer
Dim name As String
[Code].....
View 3 Replies
Jan 25, 2012
I have many textbox controls and they are named as txt1.text, txt2.text, txt4.txt etc.I want to raise the event "Leave" when txt1.text leaves or txt2.text leaves.but with a single handler.
View 2 Replies
Jun 23, 2011
How do capture which button caused the postback on a web form with multiple controls using asp.net
View 3 Replies
Apr 3, 2012
I have multiple user controls (the same one dynamically added to a form 4 times), and one class. I would like all of the user controls raise events in that one class. For example, if any of the user controls are clicked, I want it to send a string to the class to be processed and show a MsgBox "Control name was clicked"I am doing this as an exercise to reduce repeating the same code over and over directly in the control, and to avoid creating the class over and over to accompany each user control.
View 1 Replies
Sep 27, 2010
Inside a form, I would like to display a pdf file which is already available in my resources (template file "untitled"). In this pdf file, I have some fields which get their values from some texboxes in another form. My aim is, when the user triggers the button to call this form, it should insert the values inside the pdf file and display the output pdf inside the form.I have written the code to an extend but could not finish it myself after my many trials... Now here are the two things I cannot manage:I can use a directory to read the template pdf "untitled1.pdf". But my aim is to use the file inside my resources. can save the output file in a directory but this is not I want to do. I want to display the output pdf.
View 1 Replies
May 22, 2009
I wanted to know if anyone could tell me how to access the Click_event.I have a boarderles form with a panel control which has the Dock property set to fill and on the panel I have placed a Label also with the Dock property set to fill. I also have a timer running.How can I get code to execute in the Label1 click event.I've tried doing it by using the generic Click_event and also with two variations of the Click_event Handles parameters
'Alternativ 1:
Private Sub Form1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
[code].....
View 16 Replies
Jul 25, 2011
Is there a better way to make a form with multiple buttons opening different things than having a form that has lots group boxes for each tab. So in the begining each box will be invisible and when you click the button the corresponding group box will become visible. Is there any other way?It will be like a background image and it'll have buttons that will mask it with invisible buttons. when the button is clicked it will open the corresponding group box.
View 5 Replies
May 29, 2012
Is it possible to resize my controls on my form when I run it? The problem I have is that I have created a windows application which has a maximize state on all forms but on some machines my controls go missing (mostly on widescreen laptops). Ideally some way of resizing my controls would probably be best? So is that possible?
View 10 Replies
May 10, 2012
I've run in to a very annoying situation. At the moment I have a program with 4 forms. 3 of these forms work fine, but the fourth seems to be a dud. After clicking any one of the buttons or controls on this form it works. But if I try to click anything again, it doesn't work. I can't use my back buttons, I can't even use the minimize, maximize and exit buttons in the top right corner which are automatically built in to the program. I fear I have accidentally changed a setting, or accidentally deleted some very crucial code for this
View 8 Replies
Aug 17, 2010
What I am trying to do is have a Form which can dynamically change the controls which are on it and their properties; this allows my main GUI to be more fluid and not have tons of groups and controls on it which I must hide and show when needed. To make this as extensible and reusable as possible, however, I want all the control additions/subtractions/edits to occur through a separate DLL which I write. The problem is, I can't seem to instantiate any controls in the Class Library because I cannot import 'System.Windows' or any of its children ('Forms').
View 9 Replies
Feb 7, 2010
I did a quick net search and found this which works great for looping through all the buttons to disable them. These buttons are located right on the form.
For Each ctlControl In Form_BLAH.Controls
Select Case TypeName(ctlControl)
Case "Button"
ctlControl.Enabled = False
End Select
Next ctlControl
However...when I tried it on a form where the buttons are contained within a Table Layout Panel it does not work.
View 2 Replies
Mar 20, 2011
Where is the best place to resize a control on a form when a form is resized?....I'm currently using the Form1_SizeChanged event and seems to work ok. Also is there any need to check in the forms resize event if the form is in a minimized state before resizing controls?.,.. in VB6 if you try to resize a control when the form is minimized you get an error, but I don't see that happening in BV10 Form1_SizeChanged event, does VB10 automatically ignore resizing controls when a form is minimized or something?
View 2 Replies
May 6, 2012
I have developed a windows application on a size of 1366,768. When i have opened the application on another pc, the location of the controls are not the same anymore. Part of the application can't be displayed as well. How can I handle that in vb?
View 1 Replies
Jan 19, 2012
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 Replies
Dec 4, 2010
I'm trying to make an autoupdater, so I've made it search for updates in the beginning and that works fine. But now when the update form is supposed to open, it goes a while and then it says "File Download Complete". So that means the form must have been executed, but it does just not appear. But when I click ok on the dialog, the updater form appears, but with all controls white. Here's my updater.vb: [URL]
I'm using Kleinma's WebFileDownloader class.
I suspect that the problem might be that the updater's form doesn't get it's events handled or doesn't get redrawn.
View 8 Replies
Sep 3, 2010
there is any event or way to detect activity in an form or project?in the form and all the child controls.
mainly mouse clicks (not mousemove) and key press.
for example, if the form have not activity in the lasts 10 minutes, do something.
View 7 Replies
Nov 18, 2011
How would I Pre-Draw/Pre-Rendering Controls on a form before it appears? Is this possible??
View 10 Replies
Sep 17, 2010
I've removed a few controls from my form, but they're still in the properties. I've looked in the Document Outline, but nothing. How can I remove them (save)?
View 6 Replies
Dec 17, 2009
I am making an application that uses multiple WebBrowser controls, and multiple proxies.The code for changing the proxy settings are as such:
#Region "Proxy"
Public Structure Struct_INTERNET_PROXY_INFO
Public dwAccessType As Integer
Public proxy As IntPtr
[code]....
Note: getRandomProxy gets a random proxy from a list.Problem is that whenever RefreshIESettings(getRandomProxy()) is applied, the proxy will be applied to all of the WebBrowsers, while i would need to have a unique proxy for each WebBrowser. Not having this would just error out the page in the other browsers and so on.
View 1 Replies