|
patel mayur wrote: Send complete Project folder.
No, no, no, no, no, no, no, .... That's not how this works around here.
YOU write the code! We help with any questions you have when you run into a problem. If you want someone to write it for you, go to RentACoder.com.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I have a webparts control containing an Asp.net listbox and a label. There is this public property called 'ListItems' which will appear in the properties window when the control is selected on the design page in VS 2005.
When the "ListItems" property is selected, the ListItemsCollection Editor window pops up and the user can add new list items. However, when the ok button is clicked, the listbox doesnt display the list items.
Below is a code snippet of the ListItems public property:
<editorattribute(gettype
system.web.ui.design.webcontrols.listitemscollectioneditor), _
gettype(uitypeeditor))=""> _
Public ReadOnly Property Items() As ListItemCollection
Get
listbox1.DataSource = listitems
listbox1.DataBind()
Return listitems
End Get
End Property
How to link the list collection to the listbox for display?
|
|
|
|
|
after adding the items . they get displayed in the list
i dint find any issues regarding this
Bulbul Bhuwania
|
|
|
|
|
I am not working on a ready made ASP.Net VB listbox. I have to create a custom control and create a property which will display the List Items Edit window.
The issue is after adding the list items to the list items edit window, the list items are not added to the listbox, which is very unexpected.
|
|
|
|
|
He 2 all
I hope that u'll be enjoying good health.
I want to ask that how can I add the some code behind the buttons which I added at run-time?
Thanx in advance for answering me...
Regards,
Arfan Qadir
-- modified at 3:43 Tuesday 7th March, 2006
|
|
|
|
|
|
You have to create the controls, like I preseume you already did, and add them to the Form's Controls collection. After that, you have to write your event handlers using Sub's with the same signature as the event you want to handle (see the documentation for each event), then manually wire up the events using AddHandler[^]. Don't forget to disconnect the events handlers using RemoveHandler if you need to destroy the controls later.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have Exchange setup on a server and I am trying to write an ASP.NET application that saves some form data to a database, and then sends a notification email to a 3rd party.
I used the code, pretty much verbatim from here Support @ Microsoft[^]
I added the Office11 COM object as a reference; however, on the line oApp = New Outlook.Application() I get a weird error saying that the
ASP.NET is not authorized to access the requested resource
Any ideas on how to resolve this?
Jason
|
|
|
|
|
Hi.
I am new to this site. I found an example of an image combobox by Alon Ronen. The code is as follows:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles MyBase.Load
Dim items(Me.ImageList1.Images.Count - 1) As String
For i As Int32 = 0 To Me.ImageList1.Images.Count - 1
items(i) = "Item " & i.ToString
Next
Me.ComboBox1.Items.AddRange(items)
Me.ComboBox1.DropDownStyle = ComboBoxStyle.DropDownList
Me.ComboBox1.DrawMode = DrawMode.OwnerDrawVariable
Me.ComboBox1.ItemHeight = Me.ImageList1.ImageSize.Height
Me.ComboBox1.Width = Me.ImageList1.ImageSize.Width + 200
Me.ComboBox1.MaxDropDownItems = Me.ImageList1.Images.Count
End Sub
Private Sub ComboBox1_DrawItem(ByVal sender As Object, ByVal e As _
System.Windows.Forms.DrawItemEventArgs) _
Handles ComboBox1.DrawItem
If e.Index <> -1 Then
e.Graphics.DrawImage(Me.ImageList1.Images(e.Index), _
e.Bounds.Left, e.Bounds.Top)
End If
End Sub
Private Sub ComboBox1_MeasureItem(ByVal sender As Object, ByVal e As _
System.Windows.Forms.MeasureItemEventArgs) _
Handles ComboBox1.MeasureItem
e.ItemHeight = Me.ImageList1.ImageSize.Height
e.ItemWidth = Me.ImageList1.ImageSize.Width
End Sub
I would ask the author about this code but I cannot figure out how to contact the author. My question is how I would add text to this combobox. I want a box with images and a line of text as a kind of descriptor. Any ideas?
|
|
|
|
|
You can contact the author by going to the bottom of his article and posting a New Message. Each article gets it's own forum for discussing the article.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi, I am new to .Net and working with threads for the first time. Please review the code below.
Dim t As Thread
t = New Thread(AddressOf Me.GetValue) ' GetValue is a procedure
t.Start()
In GetValue, I want to get some data from the DB and fill in a combobox. However, when the following code in GetValue executes -
str = "select ID from ABC"
DA = New OleDbDataAdapter(str, ipcon)
DS = New DataSet
DA.Fill(DS, "rec")
- the control is lost. i.e: the next set of statements (to fill the combobox with the dataset values) do not execute. I am not sure why such a thing is happening. Is there some way to handle this threading issue that I am missing? Please help.
With Best Regards,
Mayur
|
|
|
|
|
Try Instantiating the Datatable on the main thread before you start the second thread:
<br />
Dim dt As New DataTable("dt")<br />
<br />
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click<br />
Dim thrFillTable As New Threading.Thread(AddressOf FillTable)<br />
thrFillTable.Start()<br />
End Sub<br />
<br />
Private Sub FillTable()<br />
Dim c1 As New DataColumn("Number")<br />
dt.Columns.Add(c1)<br />
Dim dr As DataRow<br />
For i As Integer = 0 To 10<br />
dr = dt.NewRow<br />
dr.Item(0) = i.ToString<br />
dt.Rows.Add(dr)<br />
'Next line is just to waste time <br />
'so you will see combo has no data <br />
'till thread Is finished<br />
Threading.Thread.Sleep(2000)<br />
Next<br />
Me.ComboBox1.DataSource = dt<br />
Me.ComboBox1.DisplayMember = "Number"<br />
End Sub<br />
<br />
<br />
|
|
|
|
|
i was using this code to play my background music but when i play the sound effect, the previous music was stop anyone know how to overlap the audio? by continue playing the background music
:
=BGmusic
Me.AxWindowsMediaPlayer1.URL = Path.GetDirectoryName(Application.ExecutablePath) & "\sound\start.mp3"
=Soundeffect
Me.AxWindowsMediaPlayer1.URL = Path.GetDirectoryName(Application.ExecutablePath) & "\sound\step.mp3"
Or is there any other method to play 2 audio together?
-- modified at 6:45 Tuesday 7th March, 2006
|
|
|
|
|
|
ya thats y wanna know anyone have other device cause i only know use the mediaplayer... u have any clue?
|
|
|
|
|
Media Player will only play one thing at a time, so you'll have to use a library that can do mroe than that, like DirectX and it's DirectSound library.
Sorry, I don't have any examples because that's no my area of expertise or development work. Google should be able to get you hundreds of examples though.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
yes i was trying to do that , now i try using the directx and mediaplayer but seem like the problem still there...
actually have u seen anyone done it b4? or is it VB.NET cant handle that kind of function?
|
|
|
|
|
rompnet wrote: actually have u seen anyone done it b4
In every DirectX game I've every played... And without using MediaPlayer.
It's not a problem with VB.NET. It's a problem with the audio library your using. Perhaps searching for DirectSound examples might help?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i see , thanks will try searching for it
|
|
|
|
|
oh there is one thing i want to ask also the directx able to play mp3?? i using the mediaPlayer to play the mp3...casue i think using the API method cannot play mp3 only wav and midi.... is it true?
|
|
|
|
|
I have no idea. DirectX isn't my area of expertise.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I also need a help with that.
I need the create a background sound and a sound for the game I am developing.
So far I can only import the DirectX libraries and that is it.
I know I have do create a directX device and full stop. And How?
Help is very much appreciated.
|
|
|
|
|
First, you're replying to posts that are VERY old.
Second, read my post again - I'm not an expert in DirectX at all. I have not idea how to do this.
|
|
|
|
|
When i type the "<" the combobox with items is visible buth it always on same position.
Is there anny way to set it on position where i typet the "<" in text box? :->
<blink>FeRtoll Software.net
------------
E-Mail me
WebPage
|
|
|
|
|
Code:
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 60 Then '60 is Ascii value of <
Combo1.Visible = True
Combo1.Left = 500
End If
End Sub
|
|
|
|