|
thanks for reply
what I need to do if had to pass binary varible to image or picture box control.
One option is to save variable to file. then reference it but it looks unprofessional.
Asif Rehman
|
|
|
|
|
Asif Rehman wrote: what I need to do if had to pass binary varible to image or picture box control
Access doesn't support this.
Asif Rehman wrote: One option is to save variable to file. then reference it but it looks unprofessional.
Your options are quite limited because of Access.
|
|
|
|
|
hi, i have an ir receiver connected at serial port. i want to programe it using vb.net. is there any sample code or help to receive ir signal at serial port.
Thanks.
-Waqas
|
|
|
|
|
It's a serial device just like any other. Just because it's an IR receiver, doesn't make it special in any way. It's just like you were talking to a modem.
The web is overflowing with examples of Serial communication. All you have to do is Google for, if you're using VB.NET 2002 or 2003, "vb.net serial comm", if 2005, "vb.net 2005 serial comm".
|
|
|
|
|
Hi,
I am trying to insert selected items from a listbox into a label, the listbox is fillby a database query, the problem is all I get is this System.Data.DataRowView it works fine when I dont use a database query and just text in the listbox, but need to use a database query.
Can anyone help on a solution for this??
Dim i As Integer<br />
For i = 0 To ListBoxUpgrade.Items.Count - 1<br />
If ListBoxUpgrade.Items(i) Then<br />
LabelSum.Text = LabelSum.Text & Space(6) & ListBoxUpgrade.SelectedItem(i) & vbCrLf<br />
End If<br />
Next i
Thanks in advance!
Stefan.
"All answers have a question? All code has an end."
|
|
|
|
|
smguc wrote: ListBoxUpgrade.SelectedItem(i)
try ListBoxUpgrade.SelectedItem(i).Text instead
without .Text the ToString() method gets called, which by default returns a string
naming the type.
|
|
|
|
|
Hi Luc,
Thanks for that, but doesn't accept the .text after the ListBoxUpgrade.SelectedItem(i) so frustrading it works in 'VB6' which is where I have upgraded from to 'VB2005' all because of 'Vista', many different rules and changes.
What I am trying to achieve, is there is a list of items in a listbox which you can multi select and from there show only those selected items in a label as a summary 'like a report'.
Any more suggestions would be much appreciated!
Thanks,
Stefan.
"All answers have a question? All code has an end."
|
|
|
|
|
I missed that you missed an 's'
try ListBoxUpgrade.SelectedItems(i).Text instead
|
|
|
|
|
Hmmm...
No still no luck! Doesn't like the .text after it.
Sometimes makes me think I should go back to VB6, haha. Was like my second lanugage!
This is the code for VB6, which works fine the only difference is that the 'i' was declare as a variant, but VB2005 wants it as a object, which didn't work so changed it to a Integer.
<br />
Dim i As Variant<br />
For i = 0 To ListBoxUpgrade.ListCount - 1<br />
If ListBoxUpgrade.Selected(i) Then<br />
LabelSum = LabelSum & Space(6) & ListBoxUpgrade.List(i, 3) & vbCrLf<br />
End If<br />
Next i
Do you have any more ideas or a better way to write the code??
Or go back to VB6... lol
Thanks,
Stefan.
"All answers have a question? All code has an end."
|
|
|
|
|
Dont go back to VB6, if anything show your current VB.NET code here.
And tell exactly what the current result is and what it should be.
|
|
|
|
|
The listbox contains objects which could be anything. ListBoxUpgrade.SelectedItem(i) will return whatever text the ToString method returns. For most objects this is the type of object it is. Because you've bound your listview you actually have a listview full of DataRowView objects. This is why the ToString method is returning System.Data.DataRowView. If you want to get the corresponding text of the item (the text being displayed in the listbox) you can use the GetItemText method.
For Each obj As Object In ListBox1.SelectedItems
Console.WriteLine(ListBox1.GetItemText(obj))
Next
|
|
|
|
|
Hi, that looks great. Never knew VB code could look so clean.
|
|
|
|
|
Excellent!
Thank you very much!
You would not believe the amount of books I have, and read that doesn't even state the 'GetItemText' method, Have only just made the transistion in VB2005 a few weeks now.
Great help!
Thanks again.
Stefan.
"All answers have a question? All code has an end."
|
|
|
|
|
That's what IntelliSense is for Also the MSDN library is a big help.
|
|
|
|
|
Hi all!
I'm sure there’s a commonly well known way to do this, but after days of googling and googling I can't seem to find a procedure.
I have an application the works with a SQL database, I want it to work with the data in a specific field, and then return that value to the database.
Where I'm stuck is that I can't figure out how to set a variable = to the data in a specific field.
Can someone please outline what I need to do, or point me to a specific tutorial?
Thanks for any help!
--Derek
|
|
|
|
|
instead of googling for days, spend a couple of hours reading some of the
excellent articles here on CodeProject (I am not saying they are all
excellent, but there are some bloody good ones !). There is a search facility
at the top of most pages on CodeProject.
|
|
|
|
|
I think you forgot something ...
finally { appropriateForum.Post(message); }
I'm largely language agnostic
After a while they all bug me
|
|
|
|
|
no no, finally block gets executed no matter what, and that is not required once
you found a solution somewhere.
Furthermore it would exceed the allowed 500 char maximum for a sig.
|
|
|
|
|
I realised the second I posted it. Shame, in english it sounds good. C# not so much.
I'm largely language agnostic
After a while they all bug me
|
|
|
|
|
Well, strickly speaking it shouldn't be finally but I had a geek attack. End of the day.
I'm largely language agnostic
After a while they all bug me
|
|
|
|
|
I appericate your reply, but I don't ask questions on formums unless I've done my research
|
|
|
|
|
Hi,
I did not intend to offend you, but so many questions seem to be asked because
asking looks simpler than searching...
I am not a database programmer (nor fluent in VB), this is a pattern (in C#) that
I encountered in many articles and discussions (I do read a lot of them):
for a DataSet ds the j-th field in row i can be accessed (read/written) by
ds.Tables["tableName"].Rows[i].ItemArray[j]
I am confident you know how to translate it to VB syntax.
I have never used it, but I do hope this helps. If not, maybe you should
post a new question, this time in the SQL/ADO.NET forum ...
|
|
|
|
|
Sorry, I didn't mean to be a jerk either, thanks for your help!
|
|
|
|
|
Hi,
I am new to this. I need some help with password recovery control. How do we use this?
I tried for some example but did not fine anything. Can some one give a small example how to send password through email?
Shirhit
|
|
|
|
|
Which bit are you stuck on ? The .NET framework has classes that make it easy to send email, and you would typically reset the password and send that, but you could get the existing one, if you needed to.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|