|
All you need is the documentation on your SMTP server.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Hi,
Iam creating the VB Applicaition. In that i have buttom called play. If user click the button. then it launces the mediaplayer and play the appropriate .mpeg file. It works fine in Win2k. But I get audio only , no video in WinXP. Even i Installed the appropriate CODEC files as well.
The CODE is here :
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Sub PlayVideo_Click()
ShellExecute Me.hwnd, "open", App.Path & "\Videos\pirates.mpeg", "", "", 0
End Sub
Please tell me whats the problem....
Thanks & Regards
Kumaran
|
|
|
|
|
You're calling shellexecute. The only way there can be a problem, is if the default app on the XP machine cannot play the video.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
I want to play the video as well. can u tell how to play video as well as audio in the mediaplayer using VB
Thanks & Regards
Kumaran
|
|
|
|
|
I can only reiterate - if the video won't play, it's a problem on the machine. VB isn't actually doing *anything* in your code, it's passing the video off to the program that's registered to play it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
If the video doesn't play, you simply don't have the correct CODECs installed. Your VB code has absolutely nothing to do with the playing of the video.
All you have to do to test this is to double-click your Pirates.mpg file and watch Media Player try to play it. You're going to need to install the correct codecs to make this work.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Is there are a way to put an input mask or some type of validation on a text box?
I either want to stop anything apart from upper and lowercase letters as they are typing in the box
or
Load an event on a button press if anything except uppercase and lowercase is in the box.
Any ideas?
Cheers in advance
|
|
|
|
|
can write code to validate the text input in 'key press' event or 'change event' or 'lost focus' event of text box
Ex. for key press event (using VB6)
if (keyascii >= 65 and keyascii <= 90) and (keyascii >= 97 and keyascii <= 122) then
.....
else
.....
end if
Regards
KP
|
|
|
|
|
In VB 2005 you can use a masked edit control. In earlier versions, you have to handle the KeyPress event and set e.Handled to true if the key is one you want to reject.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
Hi, sorry, forgot to mention, its for VB.NET 2005.
How does the mark edit control work? I have looked on MSDN but it doestn really help.
I guess its nothing like excel's input mask!?
|
|
|
|
|
MSN has full documentation on how to write input masks for the masked input control. I don't really know, I always write my own code.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
A total newbie to Visual Basic and Macros ( as in never touched upon both ), so forgive me if I get anything wrong.
Right now I'm in a project, trying to map an entire enterprise network with Visio. The network has over >10,000 network devices, ie. switches, routers, firewalls, etc. There are some frequent changes to the network topology, therefore by the time I do finish a network diagram, there's a good possiblity of something changing. Also I wish for the diagram to be more "dynamic".
My question is this: Is it possible to use either VB or a macro to test connectivity between each network device? If the connection is live, then the line on the network diagram between the devices would be black, otherwise it will be red. One condition is that I would strongly prefer not to log on to any devices. I don't want the actual code as I would like to learn this myself. I'm just curious as to if something like this is possible.
Thanks for any info.
|
|
|
|
|
You can probably shell out to TRACERT, if you don't have a COM component to test for you, and parse the repsonses you get back from it. You could probably do some work testing certain routes if you use the -J switch to give TRACERT a list of routers to pass the test packet through.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Hi everyone:
Is there a way that I can make the icons on the listview bigger? I tried setting them to large icon, but, they still seemed quite small. I really just want a list of pictures with no text, that would be perfect.
Regards,
James
Did I post well? Rate it! Did I post badly? Rate that too!
|
|
|
|
|
I'm assuming by "setting them to large icon" you changed the View property of the listview? Is that right?
How big are the icons you are using? 16x16? If that's the case, you may have to use bigger icons than 16x16.
|
|
|
|
|
Hello,
I want to buy vb6.0 and .net also can any body help me in finding best deal . also if there is some way I can install it for free.
Thank you
ciacia
|
|
|
|
|
there r many links on the internet
vb.net express edition is absolutely free.
use bittorrent client to download it.. it is the safest bet
|
|
|
|
|
can you please geive me exact link for downloading vb.net and asp.net for free
|
|
|
|
|
The only place you're going to find VB6 is if you buy it off EBay. It hasn't been available for retail for about 5 years now.
ASP.NET can be had, along side the VB.NET Express Edition, as Visual Web Developer Express Edition. Both of which you can find here[^].
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
the problem is that,that whenever i use navigation buttons(which i built using currency manager)..the radio button that i checked earlier during the save stage
dont show up,, rather the default button always appeared checked(which i selected during design))))please help....
how to bind radio buttons wid currency manager
here is the full code of the page that i m designing n coding
Imports System.Windows.Forms.Form
Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.SqlClient.SqlCommand
Public Class vendor
Inherits System.Windows.Forms.Form
Dim objsqlconn As SqlConnection
Dim objsqlcmd As SqlCommand
Dim ds As DataSet
Dim adp As SqlDataAdapter
Dim dv As DataView
Dim objcurrencymanager As CurrencyManager
Private Sub fill()
ds = New DataSet
objsqlconn = New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Administrator.WINXP_PRO_CORP.002\Desktop\WindowsApplication1\WindowsApplication1\Database1.mdf;Integrated Security=True;User Instance=True")
adp = New SqlDataAdapter("select * from vendordetails", objsqlconn)
adp.Fill(ds, "vendordetail")
dv = New DataView(ds.Tables("vendordetail"))
objcurrencymanager = CType(Me.BindingContext(dv), CurrencyManager)
End Sub
Private Sub bind()
TextBox1.DataBindings.Clear()
TextBox2.DataBindings.Clear()
TextBox3.DataBindings.Clear()
TextBox6.DataBindings.Clear()
TextBox7.DataBindings.Clear()
TextBox5.DataBindings.Clear()
TextBox4.DataBindings.Clear()
'Add new binding
TextBox1.DataBindings.Add("text", dv, "venname")
TextBox2.DataBindings.Add("text", dv, "id_vendor")
TextBox3.DataBindings.Add("text", dv, "phone")
TextBox6.DataBindings.Add("text", dv, "address")
TextBox7.DataBindings.Add("text", dv, "productname")
TextBox5.DataBindings.Add("text", dv, "product_id")
TextBox4.DataBindings.Add("text", dv, "totnoofpurch")
'display a status bar
StatusStrip1.Text = "Ready"
End Sub
Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Call fill()
Call bind()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'objsqlconn = New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Administrator.WINXP_PRO_CORP.002\Desktop\WindowsApplication1\WindowsApplication1\Database1.mdf;Integrated Security=True;User Instance=True")
objsqlcmd = New SqlCommand
objsqlcmd.Connection = objsqlconn
objsqlcmd.CommandText = "insert into vendordetails(venname,id_vendor,phone,address,purchasetype,productname,product_id,totnoofpurch) values(@venname,@id_vendor,@phone,@address,@purchasetype,@productname,@product_id,@totnoofpurch)"
objsqlcmd.CommandType = Data.CommandType.Text
If TextBox1.TextLength = 0 Or TextBox2.TextLength = 0 Or TextBox3.TextLength = 0 Or TextBox4.TextLength = 0 Or TextBox5.TextLength = 0 Or TextBox6.TextLength = 0 Or TextBox7.TextLength = 0 Then
MsgBox("you have not completed the form")
Else
objsqlcmd.Parameters.AddWithValue("@venname", TextBox1.Text)
objsqlcmd.Parameters.AddWithValue("@id_vendor", TextBox2.Text)
objsqlcmd.Parameters.AddWithValue("@phone", TextBox3.Text)
objsqlcmd.Parameters.AddWithValue("@address", TextBox6.Text)
{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
Dim b As String
Select Case True
Case Is = RadioButton1.Checked
b = RadioButton1.Text
Case Is = RadioButton2.Checked
b = RadioButton2.Text
End Select
objsqlcmd.Parameters.AddWithValue("@purchasetype", b)
}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
objsqlcmd.Parameters.AddWithValue("@productname", TextBox7.Text)
objsqlcmd.Parameters.AddWithValue("@product_id", TextBox5.Text)
objsqlcmd.Parameters.AddWithValue("@totnoofpurch", TextBox4.Text)
objsqlconn.Open()
Dim m As Integer = objsqlcmd.ExecuteNonQuery()
MsgBox(m & "no. of row inserted")
objsqlconn.Close()
End If
If TextBox1.Text = "" Then
TextBox1.Focus()
ElseIf TextBox2.Text = "" Then
TextBox2.Focus()
ElseIf TextBox3.Text = "" Then
TextBox3.Focus()
ElseIf TextBox4.Text = "" Then
TextBox4.Focus()
ElseIf TextBox5.Text = "" Then
TextBox5.Focus()
ElseIf TextBox6.Text = "" Then
TextBox6.Focus()
ElseIf TextBox7.Text = "" Then
TextBox7.Focus()
End If
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
objcurrencymanager.Position = 0
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
objcurrencymanager.Position = objcurrencymanager.Count - 1
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
objcurrencymanager.Position -= 1
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
objcurrencymanager.Position += 1
End Sub
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox1.Focus()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End Sub
Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
End Sub
End Class
|
|
|
|
|
|
I have a combo box with the system fonts in it, how do I get it to show a font when I start typing, ie typing ar will bring up Arial, tim will bring up Times New Roman etc
|
|
|
|
|
heres a snippet from a prog a wrote in vb6
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Public Const CB_ERR = (-1)
Public Const CB_FINDSTRING = &H14C
Private Sub Combo1_Keypress(Keyascii As Integer)
Dim CB As Long
Dim Findstring As String
If Keyascii <32 Or Keyascii > 127 Then Exit Sub
If Combo1.Sellength = 0 Then
Findstring = Combo1.Text & Chr$(Keyascii)
Else
Findstring = Left$(Combo1.Text, Combo1.Selstart) & Chr$(Keyascii)
End If
CB = Sendmessage(Combo1.hwnd, CB_FINDSTRING, -1, Byval Findstring)
If CB <> CB_ERR Then
Combo1.Listindex = CB
Combo1.Selstart = Len(Findstring)
Combo1.Sellength = Len(Combo1.Text) - Combo1.Selstart
End If
Keyascii = 0
End Sub
|
|
|
|
|
Cheers Stig will give it a go.
|
|
|
|
|
hello everyone
i have two images of a single finger , stored in byte arrays.
is there anyway i can compare them relatively..i mean is there something that can giv me the relative similarity or difference between the two byte arrays?
|
|
|
|
|