I'm not sure if this is a bad way of building an application but let's say I have 30 WPF Windows for different screens in my application. I want to build them into a DLL so I was wondering if it is bad design to instead of creating each window as a window, if i can have 1 window that hosts whichever screen is open. So the windows will actually be a usercontrol, or at least act like one. So when you want to go to a different screen, you would just change the content of the 1 window to the content of the "usercontrol" that you want displayed.
I am trying to troubleshoot a VB.NET project that contains UserControls (actually, several of them that are displaying the same issues). I am trying to get them to build under x64, but it is impossible. In x86 or AnyCPU, the UserControl builds and shows up in the Toolbox, so I can add or modify it in the forms that require it. In x64, the controls disappear from the Toolbox, I get warnings during build (the current project builds though), I can't see any of the forms - I get errors (please see below) - and projects that require the project with the form as an import will not build.
When I was studying what these UserControls are so that I can maybe rebuild them from scratch, I downloaded code from a book - great learning tool, but I get the same errors[code]...
I'm using Visual Basic in Visual Studio 10 Beta 2.
I did make a library with UserControls In VS2010 and I did a build. After that I want to use my UserControls from the library in a new project in VS2010.
How do I get the UserControls in the ToolBox when I'm desiging? I tried some import statements, but without result.
[Code]...
I also set a reference to the dll file of the library, but still I don't the UserControl in the TooBox.
I am working on a project and there are about 30 controls that I need to call and update at runtime. I have named the controls day0 - day35 (it is a calendar). Basically, at runtime, I need to call each control's setDate function to display the day number. When I run it, the array just has null/empty.This is the array I am trying to use in the code behind. The controls are names day0-day35.
A Form is to Accept User Name and Password from user, after verification the form should display another form that will accept user's full data. When a user press the Ok button, the information entered on this form should be display in another form (Showing the user what he/she has entered)
i have Design the Firs Form and the second form, how can i pass the information entered on the second form to third, and also what will the code look like I need help on this or Code Sample?
NB: i am trying create an instance of the second form in the third form and declare a variable in the third form that will holed the value, but still not working I want to learn .NET Programming in VC#, ASP.NET And VB.NET. I am student and really get excited when it comes to programming
I created an item user_control that has a textbox, button, etc. which will intentionally collect the total quantity of items the user wants.
I dynamically create a few intances of user_control on page_load. If you click the add button for the item quantity it will add to a session variable. however when the user enters a different quantity in the textbox and clicks the add button the total is of the original value of the textbox.
How to get the value the the user has typed in to the textbox to add to total???
I've create a stripped down example below: [UserControl] [Page] [CodeBehind]
UserControl... <%@ Control Language="vb" AutoEventWireup="false" CodeBehind="BomItem.ascx.vb" Inherits="DynamicUserControl.BomItem" %> <style type="text/css">
When we create an inherited control then is the Designer still needed or not? Should usercontrols be disposable?What is the difference of using Base and Me when we are setting default properties of our usercontrols?[code]
i have no time for design a database and all these things ,i have only one table and i have to fill the answers , i have to finish it within two days.the problem is I have more than 50 questions and i divided them into 3 groups , i putted each question group in User Control, and i am trying to save the values from each user control.
i have never used a UserControl in the following manner:In need to make a UserControll that can be put in a list of them depending on how many the user chooses and then if there are more than 4 to have a Vscrollbar to scroll through them.
i've been trying to use customcontrols made in vb.net 2008 but when i try to add them to a vba form using
Dim x as new MyCustomControl.Usercontrol Me.Controls.Add(x)
it returns "activex can't create object" The control itself has nothing special, it's just random textboxes and a few buttons. why i can't use the control?
I am having difficulties initiating the 2 usercontrol. The first one works perfect but am not quite sure how to get the second one to initiate.
Code for Custom Tabpage Class
Public Class TabPageEx Inherits System.Windows.Forms.TabPage Private WithEvents uc As New UserControl1
[Code].....
Now, I am struggle on how to inititiate the second usercontrol still using the TabPageEx Class. Do I need to make another seperate Class Such as TabpageEx2 too handle usercontrol2? The usercontrol2 needs to happen on form load so that the tab is always present.
Where can I get more information on how to work with usercontrols in vs2010 (VB.NET) I have been programming using mainly form level applications. I have a project I want to convert from windows forms to usercontrols.
I'm having a bit of trouble with creating one of my custom controls. What I've got is a listbox within a usercontrol, and I need to be able to click on the lists items while still in the designer. This would make it act much like the tabcontrol.
'decleare variables Dim vmcount As Integer Dim tabcount As Integer[code].....
The trouble I'm having is working out a way to be able to call the objects in the dynamically created usercontrols. I thought a list maybe an option but I am struggling to get the syntax/get it working. Wondering if anyone has some ideas or different approaches..
I have an application which has a tabcontrol that contains two tabpages. I have a custom made usercontrol docked to fill up each of those tabs. When I resize my main form to the minimum size allowed one tab resizes accordingly while the other seems to overflow the area and a couple ui items slip out of access/view.
One usercontrol was quite literally copied from the other and renamed and fields adjusted. The usercontrol size is the same between the two. Within the usercontrols there is a datagridview and a large panel full of textboxes and they have identical sizes and identical anchoring properties and even the same location coordinates.
I'm struggling to find a difference between the two but I really would like the resize behavior to match between the two usercontrols. I was wondering if anyone would have ideas of other things to check I did not mention here?
Can we make a test if a user control, classs, or procedure is working properly without running the whole program?Im testing a user control behaivor but its parent window located deep in the program, is there any way running a control for testing purposes only? im starting to get annoyed by running my whole program to test a user control just to find out that its not
Makes the following statement about the code below:
**"The computer evaluates the loop condition in the Do...Loop statment to determine whether the loop instructions should be processed. In this case, the inputsales <> String.Empty condition compares the contenst of the input sales variable to the String.Empty value. As you know the String.Empty value represents a zero length, or empty, string if the inputsales variable is empty, the loop condition evaluates to True and the computer process the loop instructions. *If on the other hand the inputsales variable is not empty, the loop condition evaluates to false and the computer skips over the loop instructions.
Based on the code I think it is the opposite: ...that while the inputsales value is not empty it should evaluate to true and process the loop and if it is empty it should evaluate to false and skip the loop?
This is probably embarrassingly easy, but I've having problems getting this to work.
On ResidentAddress.aspx, I have 2 user controls (AppName.ascx and NavButtons.ascx). When a textbox in AppName.ascx has focus, I want to update a hidden input field on NavButtons.ascx with the value of "TRUE". In the codebehind page for NavButtons, I want to see what the value of this hidden input filed is. [code]...
I had a number of userControls added to a tableLayout, what I want to do is dispose of all userControls however if I use the following code it only seems to dispose of the first userControl and not the rest:
For Each myControl As userDisplaySet In Me.tableDisplaySet.Controls ' Closes control myControl.Dispose() Next
I have a custom VB.NET control that I created that is working correctly in one program but not in another.The control has one button and one form. The form displays some data based on the settings in the control.
[Code]...
In TestProject1 - the control is working as expected In TestProject2 - the control is not sending any of the settings I set to the form My control works fine when I debug with the UserControl TestContainer.
I am using VB.NET on VS2005. This is all done on the same machine. Why would this work in one project and not another?
At work we have a pretty large web application that works by having a few pages, with lots of user controls which are nested in these pages. This is working fine most of the time but we have a problem at the moment where one of the user controls isnt working. Originally it was referenced from another project in the solution but when this wasnt working I decided to copy the file into the project and try to register it locally. It works on our development system, its only when we move it to deployment that it stops working, and I'm thinking it's something that I'm missing in the build. When you go to the page on Live the control is just missing, and no errors are generated.
Using Visual Studio 2008.I have been coding for some weeks with a problem whereby if I try to open a certain UserControl in the Designer, I get many errors, all saying the Class of one of the Controls on the Form does not exist.If I rebuild the project, the IDE realises that the class DOES exist and will then render the form for Designing. This has never been ay problem at Runtime.Now, however, if I try to open that same UserControl in the Designer, Visual Studio crashes, sends an error report and restarts.Visual Studio gives me no error report or advice.What can I do now? I need to get to the Designer.
The project I'm working on (the same one I'm always asking about) has tabs as the main navigation. I've made some User Controls to sit above the tabs in an attempt to reduce the number of overall controls that are being used (to great success). Now, however, there's one control that overlaps some controls on a tab that are obscured by my newest UControl and I want to make the background transparent.I've seen that AtmaWeapon keeps pointing people to this page detailing how to make the background transparent. That's great and it worked for me. All I did was create the
Code:Protected Overrides ReadOnly Property CreateParams() AsSystem.Windows.Forms.CreateParamsand it worked the way I wanted. Yay. I did write the rest of it too as well as part from a post I saw on the msdn forums, but they weren't needed to get the effect I wanted.However, I've got a number of PictureBoxes on this UControl that should have a BorderStyle of "Fixed3D". However, when this UControl is repainted the borderstyle doesn't reflect this (Note to self: don't .Refresh() a control inside its own .Paint() event ). This doesn't happen the FIRST time they become visible, but only when they've shown up and are made to redraw (like toggling visibility). If the border changes programmatically they look fine
I have a TableLayoutPanel that is 1 column wide. In it, I make UserControls to represent components of a color formula.When a user chooses a formula on the left, I call "TableLayoutPanel.Controls.Clear" and then using the data from the formula, set the number of rows and create X many new user controls in a loop and TableLayoutPanel.Controls.Add them.
The problem is, if one keeps this screen open and selects through roughly 60 to 70 different formulas, eventually, without warning, the program will crash in an unhandled exception: Error creating window handle. (There is no debugger breakpoint)What's causing this? Is it a disposal problem? Should I be doing something other than TableLayoutPanel.Controls.Clear? Would you handle building the objects differently? I'm including a screenshot of the screen in question (you can see the usercontrols vertically on the right) and the error box that comes up.
I am writing a UserControls that display different database tables in textboxes. At present, I change which table the UC looks at by means of a Property that is in byte format and the Set part of the Property calls a subroutine to fix various functions.
Public Property csrCategory() As Byte Get Return category End Get
[code].....
When, say Line 2, is selected the value 2 is passed to the value in the UC.
i have vb 2005 and i dont know how to make Ctrl+S work so that it throws a messagebox on the screen.ive tried a couple of different threads, looking for my answer and i cant seem to find it. its just a simple application, but i want to spice it up a bit with a shortcut to save the info on the screen.i dont want to deal with the saving part yet, but just to get vb to recognize that the user pressed the Ctrl key and the s key in combination.