I am creating a webparts control which consists of a listbox and a label. How do we add the 'items' property to the listbox such that when the webparts control is used during design time,the user can add listitems to the listbox at design time using the properties window? (similar to adding items to vb's listbox during design time)
Below is the code snippet:
Public Property Items() As ListItemCollection
Set(ByVal value As ListItemCollection)
ViewState("AddToList") = value
listbox1.DataSource = value
When the control is dragged onto the form, the List Item Collection Editor window pops ups when I click on the items property. However, after adding list items and clicking the 'ok' button, nothing appears in the listbox. The listitems are not stored.
Hi all, I am developing an appln in vb.net. I want to divide the main page into 2 parts. I want to provide a menu at the top of the this main page. When the user selects an option from the menu, the subsequent page should be displayed in the other half of the main page (Similar to what happens in a web page). How can this be done in VB.Net? Is there a concept as frames?
I am using a treeview/listview combination. I want to use the treeview selection to populate what appears in the listview. As an additional note, the treeview can either have a list of companies or trades based on a radio button control.
Does anyone have a suggestion as to which event I should use to accomplish this?
I have tried the following;
AfterSelect event - the event appears to kickoff twice - once for the item that it is deselecting and one for the item it is selecting. When switching radio buttons, the event seems to run for each previous item in the list.
BeforeSelect event - does not know which node is selected
Click event - shows me the the last node selected
Any assistance is appreciated - Thank you in advance.
I'm relatively new to VB.Net and im working on an application that will be using a Virtual Listview control. I've used them before in C/C++. But never in VB.Net, i've searched around for Articles on using them with VB.Net, but i didn't find anything. Can someone get me started? (please note that my listview control uses columns). Thank you.
Hi everybody , I searched for a while before posting here but I can't seem to find a way to make a certain key combination "eg: Alt + A" show or hide the notification icon of my program . For example the "~" key in Bitcomet is used to completely hide Bitcomets Main window & Tray Icon and you can restore it using the same key. Can somebody tell me how to accomplish such a thing or atleast point me to the right direction? Thanks for your time.
Edit: http://www.codeproject.com/csharp/globalhook.asp this article was great! but I can't convert it to Vb .NET, I used the C# offline Converter by Kamal and it didn't work. Could someone please help? Thanks again for your time & effort.
Batter is that you build the project in relese mode not debug... and then make setup program with Ino Setup! My suggestion is that.
<marquee>I work like that, Easy, Quick, Clasic, Not complicated... :->
I email@example.com I
go to new project and select 'setup and deployment projects' from the left pane. and then u can either select 'setup wizard' or any other template as per your convenience. Before that test ur software for any bugs.
Thanks for the response. I have a problem however. I have some "money" type values in a database that I would like to format as currency on a form. I'm using bound controls and a dataset and when the form loads for some reason it doesn't apply the textbox.Text = FormatCurrency(Textbox.Text). Is there a better way of doing this?
FormatCurrency won't work with Strings. You have to pass it a number to format, which will be returned as a String.
You'll have to use a Binding[^] class to intervene when the data is bound. You'll handle the Format event of the Binding class where you'll get a value and you have to format it and return the equivilent String. There's a couple of examples in the link.
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
Can you be more specific, I am using TextBox.Text = FormatCurrency(textbox.text) on form load, however, the textbox is not formatting. If I apply this to another event (cbobox.selectedItemChange or LostFocus) it will then work. But not on form_load.
I just realized the reason, however, I don't know how to fix it. This form is being called by an MDIParent. If I set the child form to the startup object it displays the currency, and applies the cbo.selectedindex = -1 properly. However, if called by the parent it ignores these (and I'm sure other commands). Would you know why?