VS 2010 Creating The Effect Of Control Selection At Runtime
May 16, 2010
At design-time, when one clicks a control it is selected and this state is depicted with a frame drawn around the control. I would like to know how can I mimic the same effect at runtime; that is, how can I draw a similar frame around a control when the user clicks over it?
View 2 Replies
ADVERTISEMENT
Aug 29, 2009
I am creating a Webbrowser Control at RunTime:
[Code]...
For some reason the Webbrowser document complete sub will not work. I even tried Public wb as New webbrowser. I will be disposing on the WB many times while the app is running. I need to be able to recreate it so that it continues to work with the WB document complete sub to trigger events...
[Code]...
View 4 Replies
Jan 5, 2012
creating a user control object in runtime using createobject function or whatever better function in vb.net.
here is my code:
Dim b As New Security.Sec_Role
b.Name = "Sec_Role"
b.visible = true
[Code]....
View 3 Replies
Oct 16, 2009
I have created a usercontrol that contains two rectangle shapes to create a unique button effect and a rounded-corner rectangle shape serving as a border to provide a look similar to a group box. It also contains two labels, one for use with a Text property of the control and the other to indicate the status of expansion of the control. The control is designed to collapse itself when the "button" is clicked leaving only the "button" visible. Clicking it again toggles this affect. I've dubbed it an ExpansionBar. It is also designed to be a container control so that I can add controls to it and allow these to disappear when the bottom portion collapses. The problem is that the controls contained in this usercontrol cannot be accessed during runtime. In other words, I can add a checkbox to it and it will disappear correctly when the control collapses, but I can't select the checkbox to check it... same thing with any other controls, you can see, but can't touch. I'm a novice developer, so I'm sure I'm missing something obvious.
View 12 Replies
May 31, 2011
I am working on getting ready to make a chat client. I want to be able to click a button and a new form come up as a tutorial to myself. Here is the code I am currently using.
CODE:
View 3 Replies
Jun 19, 2011
Is it possible to create a menu at design time and populate it at run time and then display it at the mouse pointer when I click on a cell in a datagrid?
View 11 Replies
Mar 10, 2010
i am creating a table in vb.net code (htmltable) with htmltablerows and htmltablecell. I gave on image control but thatr control cant have the .imageurl property, which i need cause i have a handler image.ashx which brings image from the database.
heres' the code -
TD = New HtmlTableCell
Dim img As New HtmlImage()
img.ID = "image_" & rd("ID")
[code]....
on the last line, "img.ImageUrl" i get this error -'ImageUrl' is not a member of 'System.Web.UI.HtmlControls.HtmlImage'how do i fix this?
View 1 Replies
Apr 25, 2012
I am coding an invoicing application. The user should be able to add a new line to the billing section of the invoice by selecting a product from a ComboBox, which subsequently fills out various other fields (price, description, etc) based on the selected product.
My problem is this: When the user adds a product, I would like the program to automatically generate a new line for the next product. It seems like the only way to accomplish this would be to create a new set of controls with an incremented name, i.e. Product1, Price1, Desc1 for the first product, Product2, Price2, Desc2 for the second product, etc. Is this possible, or am I going about it all wrong?
View 1 Replies
Nov 1, 2009
I use Microsoft Visual Basic Express edition 2008 on my Windows XP SP2 and in it, in a Windows Form project, I add a button to my default form and set it's flatstyle to flat and borderwidth to 0. At runtime, when I click that button, I get a black color hollow box on that button at it's center...
View 6 Replies
May 5, 2012
I want to program a water supply pipeline network in a treeview control. It has five node (junctions). The parent-child relation is based on a parameter (say pressure). Initially, the node 1 is parent and its child nodes are 2 and 3. The node 3 has child nodes 4 and 5. At run time the pressure changes. Now, node 3 is parent and its child nodes are 1, 4 and 5. The node 1 has child node 2.
View 7 Replies
Oct 22, 2011
Private Sub ListOfCrops_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles ListOfCrops.SelectedIndexChanged
View 9 Replies
Jan 23, 2012
I have a list with several fields that is created from dataset from a linqtosql query. At run-time, the user gets to specify what field he/she wants to display from the list. In other languages, I can dynamically do this like:
valueIwant=mylist(i).[fieldnameImInterestedIn]
Where 'fieldnameImInterstedIn is itself a variable. How do I do this in VB.Net?
non-working actual code follows:
Dim patientdata = (From patientvar In pdfdatacontext.tbPatients Where patientvar.PatientID = patientid)
Dim patientlist = patientdata.ToList()
fieldvalue=patientlist(0).(reportrow.userselectedfieldname)
View 1 Replies
Sep 10, 2009
for an application, I generate RichTextBoxes during runtime with the following code. The code generate a new node in Treeview under parent node "Notes".
Dim RichTextBoxCounter As Integer = TreeView_MainForm.Nodes_("NodeNotes").Nodes.Count
Dim NewNote As New RichTextBox
NewNote.Size = New System.Drawing.Size(845, 550)[code].....
Now, I want to show the RichTextBox if the associated child node is selected. I tried the code below, but it does not work.
If TreeView_MainForm.SelectedNode.Text = "Notes" Then
Dim NewNote As New RichTextBoxPrintCtrl
If TreeView_MainForm.SelectedNode.Parent IsNot Nothing Then[code]......
provide the code to display the RichTextBoxes after selecting the node.
View 1 Replies
Dec 26, 2011
I have a bit of a problem creating a user control at the moment. I'm creating it within my current project via the 'Project> Add User Control' menu item. The problem is that when I create the control, run a build and add it to my form the controls within the custom user control are about one and a half times the size they should be.
[Code]...
View 1 Replies
Oct 31, 2011
I need to dynamically create some sort of 'table' on my form. It should look like:
PIC1 INTEGER1 TIME1
PIC2 INTEGER2 TIME2
PIC3 INTEGER3 TIME3
On top of that it should look like a table and have gridlines between the 'cells' containing the picture/data, which makes it even more difficult for me. Before, control arrays were quite simple in VB6, but I've been searching for 1,5 hours now and I can't figure out how to do this in VB.NET 2010. Any idea how to tackle this the most efficiently?
View 2 Replies
Jul 31, 2009
I am trying to convert a value from a radio list box that is populated by an access database. The database loads fine, I have no trouble with that. My issue is that I am trying to take the value of the radio button chosen and turn it into a font color. Therein lies my problem. I see that it cannot be a string, but when I turn it into an object, I get an error. I will note that I am using VS 2008 (Windows Vista x64), and the database is compatible with a 2002 - 2003 Access database. I am using ASP.NET for my programming, however, I am trying to program it in VB. This is my code:
[Code]...
View 4 Replies
Sep 25, 2010
How can I make a control array? Or the equivalent.
I am used to Visual Basic 6 which presents the option of whether to create a control array when I copy and paste and control.
View 6 Replies
Oct 26, 2011
I figured it out. Check out the finished control [URL]..I'm trying to make myself a simple 'star rating' control.
It would have the properties:
StarCount (number of stars)
StarValue (number of stars highlighted)
I want to draw the stars using GDI+, have them highlight on mouse over, and change the StarValue when clicked.I have an idea on how to do this from experience with working with forms, but I'm having some difficulties with the Control development part. I couldn't find any tutorials which didn't inherit a control (such as a checkbox or button), and I have no idea how to make my control editable in the designer.
I think what I need to do is create StarCount as a property like this:
[Code]...
I also want to execute my drawing code at design time, so I can see the stars while laying out a form. as a side note to that, I don't know how to change the size of the control at run or design time, nor how to disable the user from changing it at design time.as a side note - I know that there are a few star rate controls already floating around the internet, but I do not like the quality of them (or at least the one's I've seen), they felt very windows 98. I'm trying to make something that will fit well into windows 7 (plus I want to implement custom images, but that can wait until I get it working)
View 6 Replies
Dec 20, 2010
I have created multiple dropdown list at runtime and populated with data. I also have added an eventhandler to determine the selected value of the drop down list.
The code is as follows :
Dim tbl As New Table()
tbl.EnableViewState = "true"
[code].....
View 2 Replies
Feb 2, 2011
The implementation is pretty simple. I read the available images within the directory and call the following sub procedure.[code]...
View 1 Replies
Mar 23, 2009
I am writing a custom control which is a textbox currency control. What is the best way if I make changes to my control to have my main project use the changed control?
View 9 Replies
Apr 14, 2011
i recently received a new work pc and have installed visual studio 2010 premium on it. this was installed on my old machine as well, the only differece between the two PCs being my old one was 32bit and the new one is 64bit.With that said, when i create a windows form project and drop a control on a form, double click that control, the default event code is created for me.It is missing the "ByVal" portion of the code. Using a textbox as an example, below is the code it generates. Is there a setting that I'm just missing and need to turn on? I've been using visual studio since version 2005 and i've never seen this before.
Private Sub TextBox1_TextChanged(sender As System.Object, e As System.EventArgs) Handles TextBox1.TextChanged
End Sub
View 3 Replies
Apr 3, 2010
How can I create a contructor for this.I have a constructor already in my class as follows :
Public Sub New()
Text = "Hello World"
TextFont = New Font(System.Drawing.FontFamily.GenericSansSerif, 10, FontStyle.Italic)
[code].....
View 5 Replies
Jan 2, 2012
I am loading forms into a TabControl creating a new tab page each time the form is loaded. ** I would like to point out that I am using UC instead of a from**
Now, I can easily have many tabs with the same form loaded. On the form I have a 'Search Button' So my question is, after clicking the search button how can I tell which instance of the form the 'Search Button' was clicked? Hope this makes sense
[code]...
View 2 Replies
Oct 6, 2011
I am trying to create a dynamic dropdown after a dropdown has been selested (in asp.net vb)
For example: I have a dropdown question that asks: What brand of car do you drive (Toyota, Ford, Honda, Nissan, Chevrolet)
When the brand is selected I want another dropdown to appear under it with new chocies
For example: If Nissan is chosen, the second dropdown will be populated (from the database) with (Altima, Maxima, etc...)
And in some cases I would like a text box to appear, but If I can figure out the dropdown portion, I am sure I can figure out the textbox.
View 3 Replies
Apr 13, 2011
visual basic 2010 code or tutorial video on how to add the aero effect to my form for Windows Xp environment? What is the code of adding an aero effect to VB form in Visual basic 2010 for Windows XP environment?
View 6 Replies
Feb 13, 2011
What I want to do, for one, is record audio through a microphone input, then play it back with only a few milliseconds delay. Maybe a way to do this would be to record, say, 200 milliseconds, save it to a temp folder, play it, then delete and repeat? I don't know. Would my idea work? Second, I want to use a VST dll file as an effect on this audio. I have absolutely no clue as to how I could do this. (Third one is optional, not really needed, but would be nice. you don't have to answer this third one) Third, I want to minimize the feedback. An idea of mine is maybe a frequency cut off, anything above avg human voice frequencies?
View 2 Replies
Aug 30, 2010
I have a picturebox that has a semi-complex image on it and also has a series of other pictureboxes, most of which are set to not visible. The way the program works, the user can click and drag a couple different items on the parent picturebox. The things they can drag are not actual controls, but parts of the image itself. That is all working fine. While testing, I had all of the subordinate pictureboxes (there are a variable number of them) visible showing a black background. I have now improved their implementation, so I changed the display so that only the subordinate pictureboxes that actually have something in them are visible. For all the others, they have .Visible = False.
The problem is that when I click and drag on one of the items in the parent picturebox, all the invisible pictureboxes become visible. They have no image in them, so they take on the color of the backgroud behind the parent picturebox. This is undesirable. I want the invisible pictureboxes to remain invisible during the drag and drop action. The one solution that seems promising is to set the image of all those pictureboxes to some transparent image such that, though they are visible, they will not appear as anything. A bit of testing shows that this technique would work.
View 4 Replies
Nov 22, 2009
Needing pointed in the right direction. I am fooling around with data sources and connections per homework and what I'm looking for is creating an SQL DB connection during runtime. I know that you can add a data source in design by going through the Wizard but what if one would want to create the connection, adapter, and dataset during runtime? Where would you start?
I have cruzed the net looking for some form of a tutorial to just get me started, I don't need it all completely outlined but I need to know where and how to start and what I need to declare the connection, string, and dataset as. I have seen a lot of information using VB6 but nothing that I come across seems to work.
My basic questions are:Do I have to create a seperate class for the database connection?How do I delcare the nuts and bolts of the connection,adapter, and dataset?If a seperate class isn't required then where is the most realistic place these items would be created?
View 1 Replies
Aug 9, 2010
How can you add a system DSN with its security credentials programmatically at runtime from VB.NET? Keeping key in ODBC.INI is done, but when creating ODBC, it asks for Authentication Type (SQL or Network Login).How can we set that option at runtime?
View 2 Replies