Adding "Properties" Dialogs - Pre-built Dialog Or Control For Displaying Properties At Runtime?
Nov 6, 2008
I have my own class of graphic objects, and now I'd like to allow a user to right-click on one of those within the application and see a properties window. Is there a pre-built dialog or control for displaying properties at runtime? I'd like to have something just like the IDE properties window button for my application.
How do I get at and invoke the properties dialog supplied by the manufactured? I have search this many times and found that most of the posts contain solutions that the original poster claims don't work The standard PrintProperties class does not handle a lot of printers who have specifictsks, eg a printer designed to pint on the face odf CD/DVD. I have found examples of how do this in VB6, but every examply I find for the versions of VB Basic after thet have comments that the solution provided did not persist the user chnges. Bow, come on, there has to be a way of displaying and persisting the user choises the dialog bog provided by the printer manufacturer!Terry
How can I read the properties for a given contol type at runtime without having the masive overhead of specifing the each property for each type of control in code.
For example supose you are building an application where the end-user selects a contol type form a drop-down list in a combobox then the properties (Read, Write, Runtime, Designtime) for that control are displayed in a listbox.
How can I read the properties for a given contol type at runtime without having the masive overhead of specifing the each property for each type of control in code.
For example supose you are building an application where the end-user selects a contol type form a drop-down list in a combobox then the properties (Read, Write, Runtime, Designtime) for that control are displayed in a listbox.
I have created a user control and need to know how I can let the user change some of the properties of this control at runtime and have the values persist on next startup. There are multiple instances of this control on the form.
i've written an app to enumerate forms + controls in a project at runtime:
it lists form names in a listbox + when a control is selected, it lists hierarchical controls in a treeview. by selecting a control in the treeview you can view its properties in a propertygrid.
here's the problem: how can i use the propertygrid to actually persistently change those properties?
at the moment you can change properties in the propertygrid but it doesn't change the control's properties, either persistently or otherwise.
here's the code. (you can download the full project at: [URL]
Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ListBox1.Items.AddRange((From t As Type In Me.GetType().Assembly.GetTypes() _ Where t.BaseType Is GetType(Form) _
I'm making a control and I am trying to finalize my design time properties grid. I have several List(of Class) items as public properties and when I click on the design time menu (while testing the control) there is the word "Collection" and a button with an ellipsis (...) that brings up a neat pop up with the buttons Add/remove and all of the public properties of the collection's class on the right hand side. Basically for a non-collection instance of a class (with public properties) I'd like a similar button to show up. I know I could put all of the properties in the main control class and group them, but I like the pop up box feature. Anyway to duplicate this? (think font grid item etc.)
adding the properties of a control to its parent? Without having to rewrite all the properties... For example, if I have an user control with a button inside, and I want to have the "text align" property of the button, in the list of properties of the usercontrol. If not, is there a way of making the child control of an usercontrol editable?
Is there any way to add new properties to a control? For example, I'm using an "OvalShape" from Microsoft's Powerpacks, these are designated as "Cells". I would like to add properties to the class itself (if I had a physical class to edit) for different processes such as "energy level", "family number", "mutation", etc. General variables that are either Boolean, Integers, or etc. If there isn't a way to edit the powerpack class itself, is there a way I can use the ovalshape power pack in my own class and add extra properties to it myself?
What I've done is create a User Control Library (Project) and I've added a single User Control to that project. The control contains a single FlowLayoutPanel, and I created a Property on the control itself to pass the FlowDirection from the Control to its FlowLayoutPanel child.
Build, reference, component appears in the Toolbox and everything works fine, but the property on the control does not appear in the Properties window when I go to edit it at design time.
I often use the process of displaying a dialog from a form, with the dialog user input then used to update the main form without any problem. In a new scenerio I launch the main application screen, I then show a login dialog ontop of the main app screen and can launch another dialog from the login if a new user is required. The plan is to update the login dialog (updating a combobox to reflect the addition of a new user) from the new user dialog.
See code below :-
'Update login forms user list as new user added successfully frmRoomBookingLogin.cboLogin.DataSource = Nothing frmRoomBookingLogin.txtPassword.Text = "Updating password from dialog" MessageBox.Show("The password text is " & frmRoomBookingLogin.txtPassword.Text)
[code]....
The messagebox implies the dialog has been updated yet the text does not change. Is it possible to update the dialog when using a setup such as Form -> dialog -> dialog? I'm intrigued as why the dialog does not reflect changes. I have never refreshed/repainted the dialog as never required to in my other examples when updating a form from a dialog and never encountered a problem when using a two tier form setup.
When in designer, if I add a DataGridView to a windows form, the properties do not show in the properties window. I'm using Visual Studio on XP. The problem exisits even if I create a new project, open a windows form and then drag a DataGridView onto the form.The grid view is present because I can add columns, etc. The only issue is the properties don't display. So I can't rename it from DataGridView1 unless I do it in code.
when i select a reference, it doesnt show the properties for it any longer. I would really not have to copy every reference locally for each project im working on, as well as im not too keen on reloading visual studio either.
Lets say i'm making a new dialog. I don't want to expose the properties of the form to code elsewhere, only specific ones I define. I tried making the form Protected (including the Designer generated code) and putting it in another class, but then I can't figure out how to access the form from my code. Am I going about this completely the wrong way, or what?
I am currently developing the 'solution' through the UI Dialog properties of VB 2008, so my application can be installed onto a computer .It works ok, installs successfully, creates the desktop icon, start menu icon and programs folder....... BUT, when I go into the Control Panel, the uninstall option is there, but not with my own icon it uses the Windows default icon.
I have a combo box and a property grid in a form. The combo box contains 2 items. If one item is selected, two properties are listed in the property grid. These properties should have a dropdown that contains a list of items. I have two string arrays that contain the values for these properties. Can I use one TypeConverter that inherits StringConverter for these lists to be displayed in two different properties? That is, with one TypeConverter class, can I populate both the lists? I will also have to do the same with the other items in the combobox.
In the form design I set up a TableLayoutPanel, 20x20 cells and in cell (1,1) a PictureBox (called Target) containing the image of a small target. The properties box for Target shows some very promising properties, Column and Row - and if you overwrite the values in the properties box, the PictureBox obligingly shifts to the corresponding cell position in th design. However in VB it is not possible to refer to Me.Target.Row or .Column - neither appears during coding in the menu of properties, and deliberately coding either of them produces an error like
Error 1 'row' is not a member of 'System.Windows.Forms.PictureBox'.
1. Why does the properties box show properties that cannot be altered programmatically?
2. How can my program move Target around in the TableLayoutPanel?
I'm working on a Hazardous Materials label printing program. One of the options is to do an "NFPA" label. Since there are 4 values required with 4 or 6 options, the ratings are entered via radio buttons in a group box. That's working okay. I display values in the NFPA diamond as they're entered: left quadrant blue, top quadrant red, left yellow, bottom red. I'm having trouble with the label in which the rating will be displayed on top of a jpg diamond for the white. In this quadrant the text can be up to 4 characters. I can accept the text going into an adjacent block a little, but the corners of the label overlap into another quadrant/color. I reduced the font size which solved the overlap problem but the font is then too small and looks terrible. I tried to make the background of the label transparent to let the color come through correctly but that's not a valid value for label.background. I'm figuring that the transparent background is the best solution. What can I use that will accept a transparent background so the color shows through?
I'm trying to set the transparent property via label properties properties, not via code. Here's the code if it makes any difference:
Public Class NFPA Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Close() End Sub
How to change all properties of a form to properties of other but don't change important properties like Owner,Handle, OwnedForms, Parent,HasChildren,Controls and ... .I have a child form that i want it to provide controls of Form.The background form provides Aero frame and child form is a transparent form in it.I want it because I want to draw buttons with system style in Aero in Windows Forms.This is my own code but it does not work good (ForeForm is child form):
For Each Propertry In ForeForm.GetType.GetProperties() Select Case Propertry.Name Case "AeroBackgroundEnabled", "FormBorderStyle", "TransparencyKey", "Parent", "Owner", "ShowInTaskbar", "Handle", "HasChildren", "OwnedFo[code].....
Additionaly:I wrote a great Aero Form.I don't publish current version (1.2) that supports Aero Blur,RealTime Aero Color change,extend Basic theme?
i am writing a VB front end (VS 2008 .NET 3.5) to a data loading program that involves moving the contents of CSV flat files into SQL Server 2005 staging tables. I have had some experience with DTS in SQL 2000 so I decided to use SSIS packages to load the CSV data. Creating the packages in BIDS worked fine for the development environment where I hard-coded the Connections and file paths. The problem arises when I will release this program to 30 different sites that do not have SQL Server admins to help changing the configuration.
I have a SQL table in which I will put all the necessary path information and I can pull that into the VB program on startup. I need to see an example of how I can set the properties from VB once the package is instantiated and opened.Here is an example of where I plan to set those properties and run the packages.
Private Function RunPackages() As Boolean Try Dim oApp As New Application Dim oPackage As New Package
[code]....
Even though I am using a configuration file in the example, I am finding it difficult to edit the configuration files for each site. I see that there are methods and properties exposed for the oPackage instance. However, I can't find a good reference for the Class model to use as a guideline. All the examples expect packages to be run and configured with SQL Server and BIDS. direct manipulation of package properties in VB or C#?I am now considering using the old standby SQL Bulk Insert. It almost appears as if the Data Tasks are just wrappers for the Bulk Insert operation. Furthermore we have several sites still using SQL Server 2000. With the economy the way it is, most of those sites do not want to spend ANY extra money upgrading to SQL 2005 or 2008.
However, having a good resource to learn how to manipulate SSIS packages from the CLR would be very helpful. I have heard that in SQL 2008 things have changed even more. It is maddeneing that once I learn a "new" Microsoft technology it seems to be discarded by MS in their next release in favor of a "better" alternative.
how to handle movement of buttons that are made in runtime. What my program does is writes the name of a button that is made in runtime, the left, and top cordinate into a textfile. When the user reopens the program it needs to load the button in the same spot. So far i have a streamreader reading the file in each line. There is a one sentence split by ",". Each of the three components are loaded into an array. how can i call the buttons it i am unsure of the name. Possible answer could include using sender, addhandler.
Private Sub LoadBuildingToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LoadBuildingToolStripMenuItem1.Click Dim File As OpenFileDialog = New OpenFileDialog
how to change the properties of control which are created at run time. The actual situation goes like this: I will be creating 4 picture boxes at runtime and assigning pictures to them. Now if i wanted to change those pictures, i am not getting how to call those picture boxes.
I am working on a TCG card game and I am having some trouble of thinking how to find the Properties of a Picturebox that was created at RunTime through a Click Event.
Here is the Code I have This is the Sub that I have to create the Pictureboxes...
Code: Private Sub CreatePictureBox(ByVal name As String, ByVal x As Integer, ByVal y As Integer, ByVal height As Integer, ByVal width As Integer, ByVal picture As String) Dim PB As New PictureBox