|
am using MS word template, and no databases are used.
pls help me in this.
Thanks,
Nanda
|
|
|
|
|
try this
Dim s As String
s = CurDir
s = CurDir$
s = Application.Path
s = ThisDocument.Path
s = ActiveDocument.Path
I hardly ever use word so I'm not that good at it but these seme to return serveral path's maybe one of them is what you want
|
|
|
|
|
how can i send serial data over the ethernet using the vb.net code?
|
|
|
|
|
What do you mean by "serial data".
You send the data according to the specifications of the server that is listening for it. Without knowing that, or knowing how your going to write the server, sending it is a moot point.
|
|
|
|
|
hello frnds,
how can i send a mil using MSoutlookExpress which is should be view in the reciever Draft folder,
means i want to send a mail over my LAN and my inputs are reciever mail id,message,subject and when i send mail then it should be view in the reciever Draft folder
I am using vb.Net 2.0
hope u all understand...Pls help..
any one have code OR any helpgul Link ????
regards,
koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
koolprasad2003 wrote: how can i send a mil using MSoutlookExpress which is should be view in the reciever Draft folder,
You cannot target a folder on the receivers end. It will only show up in their Inbox folder, and if the receiver has any sorting rules in place, the receiver moves it to an appropriate folder.
|
|
|
|
|
thankx for reply..
have you any code sample to send the mail using outlookexp ????
please help....
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
You don't use Outlook Express to send emails from your code. Outlook Express is/was a wrapper for MAPI. All you have to do is Google for "VB.NET MAPI".
Or, if you're using .NET 2.0 (VB.NET 2005), look at the classes in the System.Net.Mail[^] namespace.
|
|
|
|
|
koolprasad2003 wrote: it should be view in the reciever Draft folder
You can not stipulate that type of conditions. It is upto the user's email client and filtering rules to decide the routing.
Also note that, Drafts are normally used to store message in composition before being submitted for delivery to Outbox and then to the SMTP server.
|
|
|
|
|
thankx for reply..
have you any code sample to send the mail using outlookexp ????
please help....
regards,
koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
heres the code
Dim handle As IPictureDisp
handle= getbinerydata();
me.imageCtrl.Picture=handle;
this code works fine in vb6. but doesn't work in VBA(msaccess).
the message is (file not found).
how to show bitmap variable in image control.
Asif Rehman
|
|
|
|
|
MS Access expects your to pass the path and filename to the image control, not a binary object.
Hope this helps.
-------------------------------------------
Damian - Insert snappy one-liner here.
|
|
|
|
|
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."
|
|
|
|