|
I don't know how to use command.
example this HTML tag we use (mailto:socheat@khmerfriend.com) what about in VB.NET
................
|
|
|
|
|
What are you talking about? What are you trying to do? Are you trying to launch the default email editor?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Yes it can be, but I want user to send an email to with my address what command should i use. example if i just want to open oulook just use commnad(outlook).What about if i specific email address
................
|
|
|
|
|
Easy, just use:
Process.Start("mailto:socheat@khmerfriend.com")
|
|
|
|
|
Thanks, i hope can help me well.
................
|
|
|
|
|
Can anybody make a program in VB.NET (not in C#) to retrieve device information and detect when a device gets connected to a PC.I have already tried my hands in it but not get any related atricles on DEV_BROADCAST_DEVICEINTERFACE or GUID cass.Can it be done through System.InterOpServices.DLLImportAttribute?Mention the classes and properties of that classes.
Please Send me the solution ASAP
|
|
|
|
|
I might be wrong but I think that the only way to do this is by writing a driver. Devices being connected/disconnected cause an interrupt at KERNEL level, and those addresses are out of bounds in user mode.
|
|
|
|
|
i have ten(10) checkboxes on my application, users can only select or check 6 of these checkboxes. i would like to be able to display those 6 checked items on 6 labels after the click of a button.
could you help me with the code for this.
chiku
|
|
|
|
|
Do it with array of check boxes and run over it. if Chk(i).checked=true then msgbox (chk(i).text)
|
|
|
|
|
Hi all,
I'm trying to print out text and graphics on the same page using VB's Printer.Print
For i = 0 To List2.ListCount - 1 Step 1
Printer.Print List2.List(i)
Next i
If Clipboard.GetFormat(vbCFBitmap) Then
Printer.PaintPicture Clipboard.GetData(), 0, 0
Printer.EndDoc
End If
The graphics gets printed out, but the text from the list box doesn't. Any ideas on how I can resolve this? Thanks
MyFathersSon
|
|
|
|
|
Looks like the graphic might be overlaying the print buffer.
I would try the simplest approach first, and put an EndDoc after the listbox loop and see if that will flush the buffer without advancing the page.
Failing that, you might have to set the text and graphics onto a Form or Picture box first, and then call PrintForm.
|
|
|
|
|
Thanks for your suggestion. I placed a Printing.EndDoc statement as follows:
For i = 0 To List2.ListCount - 1 Step 1
Printer.Print List2.List(i)
Next i
Printer.EndDoc ' added
and this printed both text and graphic, but on separate pages. I'm not sure how to carry out your second suggestion.
MyFathersSon
|
|
|
|
|
That's what I was afraid of...
Been a long time since I messed with that. I wish I had a good example for you, but there should be a bunch of em out there (good ol' Google).
|
|
|
|
|
Thanks for your advice OldWarhorse. Not much on google.
|
|
|
|
|
Did you try printing the graphics first?
Chandra
|
|
|
|
|
I did but the results are the same. Thanks for your advice.
|
|
|
|
|
What would I type to get a computers Harddrive total space and used space?
I have been looking around allot and all I have found is useless VB 6 code and some jibberish in C#, can someone please help me with this.
Many Thanks
|
|
|
|
|
System.IO.DriveInfo
Boy, you're being a P.I.A. today.
You're gonna owe me a cut of that app.
|
|
|
|
|
that easy!!! omg.. sorry for the dumb question
|
|
|
|
|
- You crack me up, Dude.
Hey, the only dumb question is the one you should have asked and didn't, right?
|
|
|
|
|
Ah hell now i came to another bottleneck... um (feels very stupid) how can i use this to display the actual total size of a drive because so far i can get it to say 16Bytes when it should be saying 250GB (well in that region)
|
|
|
|
|
Try something like this:
Dim dr As New System.IO.DriveInfo("C")
Dim sizeInBytes As Long
Dim sizeInGB As Single
sizeInBytes = dr.TotalSize
sizeInGB = sizeInBytes / 1000000000
TextBox1.Text = String.Format("Total Drive Size in Bytes: {0}", sizeInBytes.ToString("#,###,###,###,###"))
TextBox2.Text = String.Format("Total Drive Size in GB: {0}", sizeInGB.ToString("###,###,###,###.00"))
You can play around with the verbage, divisor value, and formatting as you prefer.
|
|
|
|
|
Yes!! thanks so much for this golden nugget i been searching for something like this for ages whew
THANK YOU!!
|
|
|
|
|
You're welcome!
(I gotta go do some nasty work for a while now. Fighting an 8-headed datagrid monster.
Catch ya later. Happy coding.)
|
|
|
|
|
Hey guys, I'm writing this program for a visual basic class I'm taking in college, but I can't seem to figure this out.
I have a function wrote by it passes some day ByRef, it gives me the right anwser, but I showed it to my teacher and she said I need to change it to ByVal, but when I do that it gives me an anwser of 0.
So does anyone know how I'd be able change the function to ByVal and still give me the right anwser?
Thanks
What I'm trying to change is "Function CalcOwed(ByVal Number As Double, ByRef Data As Double) As Double" to "Function CalcOwed(ByVal Number As Double, ByVal Data As Double) As Double".
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim TaxIncome, Amount, Count As Double
lstDisplay.Items.Clear()
Input(TaxIncome, Amount)
Display(Amount)
End Sub
Sub Input(ByRef TaxIncome As Double, ByRef Amount As Double)
TaxIncome = CDbl(InputBox("Enter your taxable income", , ""))
If TaxIncome > 0 Then
CalcOwed(TaxIncome, Amount)
Else
Do While TaxIncome <= 0
TaxIncome = CDbl(InputBox("Enter your taxable income, above zero this time", , ""))
Loop
CalcOwed(TaxIncome, Amount)
End If
End Sub
Sub Display(ByVal Amount As Double)
lstDisplay.Items.Add("You owe " & (FormatCurrency(Amount)))
End Sub
Function CalcOwed(ByVal Number As Double, ByRef Data As Double) As Double
Select Case Number
Case 1 To 7150
Data = Number * 0.1
Case 7150 To 29050
Data = (Number * 0.15) + 715
Case 26050 To 70350
Data = (Number * 0.25) + 4000
Case 70350 To 146750
Data = (Number * 0.28) + 14325
Case 146750 To 319100
Data = (Number * 0.33) + 35717
Case Else
Data = (Number * 0.35) + 92595.5
Return Number
End Select
Return Number
End Function
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.Close()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
lstDisplay.Items.Clear()
End Sub
End Class
|
|
|
|