|
Hi,
iam newly using Vb6 i want to use password control on form.
what code use in the form.
|
|
|
|
|
I'm not sure what you meant by password control.
If you want VB6 to display **** in a textbox, just set the PasswordChar property to '*'.
Edbert P.
Sydney, Australia.
|
|
|
|
|
I'd like to write a small app that will show which users have a certain file locked similiar to Win2k/XP's Computer Management. I thought WMI might work for this but I'm not sure what class to use.
Can anyone give me some suggestions on how to accomplish this using VB.NET/C#?
Thanks.
-Mike
|
|
|
|
|
Hi,
I want to be able to respond to file changes using filewatcher and during certain changes I would like to spawn a new thread to handle the function. The code below is what I have done during testing. If I rename a single file both fsw_Renamed() and MyTest() Eventlog entries reports the same file name from e.FullPath.
However, If I rename say 8 files at the same time the eventlogging in fsw_Renamed() reports each file names but MyTest() eventlogging reports only one file name 8 times.
The pvThreads counter works fine in that it will increment increment 8 time.
=====================================
Public pvArgs as string
Public pvThreads as Integer
Public Sub fsw_Renamed(ByVal sender As Object, ByVal e As System.IO.RenamedEventArgs) Handles fsw.Renamed
pvArgss = e.FullPath
EventLog.WriteEntry(String.Format("Hello --- " & pvArgs), EventLogEntryType. _
Information, 8888)
Dim thd As New Thread(AddressOf MyTest)
thd.Start()
End Sub
Sub MyTest()
pvThreads = pvThreads + 1
EventLog.WriteEntry(String.Format("MIG ---" & pvThreads & " : " & pvArgs), _
EventLogEntryType.Information, 9999)
End Sub
=====================================
Could some please assist?
Thanks,
|
|
|
|
|
hi,
I did VB6 a very long time ago...nearly forgot about it, but now I have to do a project in vb.
My problem is I get the following error when using the Left$-Function: Type-declaration character doesn't match declared data type.
Here is my code:
Public Sub Main()
Dim s As String
s = Left$("test", 2)
End Sub
What can it be ? As far as I remember it should work like this. It is also explained in the MSDN like this.
Thanks for help
Azrah
|
|
|
|
|
Try Left("Test",2) instead.
I think Left$ is used in older version of VB, or maybe for something else..I forgot
Edbert P.
Sydney, Australia.
|
|
|
|
|
I'm having problems with setting up the Double Metaphone implementation in Visual Basic. When I try to run the sample projects, i recieve an error stating that ActiveX couldn't create the Double Metaphone object. I have tried to register the .dll file too, but this gives me an error saying that regsvr32 cannot find module. Also, how can you use this object to create the keys in the database, mentioned in the article, i.e. turn "Smith" in to 2672 or 3451? Any help would be great, Thanks.
|
|
|
|
|
Hi there,
I would like to create a program that will display the data that we add in before to display in datagrid when we search by text box by enter data to textbox.
|
|
|
|
|
Hello all,
I need to know the print status of a word document given for printing. That is, whether the word document is being printed,or has finished printing etc. I need to do this in VB.Net. Could anyone please help me.
Thanks in advance,
Jikky.
|
|
|
|
|
I don't think you can do it through Word.
You may have to learn the printer's language (e.g. PJL) to talk to the printer and query the status of a document printed.
Or ask your printer's manufacturer for SDKs to make your job easier.
Edbert P.
Sydney, Australia.
|
|
|
|
|
Hi guys,
I'm using a form in vb.net that has few textboxes and a combobox and a datagrid... my problem is based on a selected combobox value (which is actually an order number) I need to populate the datagrid with selected rows and columns that satisfy the query criteria... (say only those rows that has the same order number as selected in the combobox... and also say 4 column out of 10)
I'm not sure how u can do this ...
Any clue any suggestion is welcomed...
thanks
|
|
|
|
|
You can set the RowFilter of the Datagrid in the ComboBox SelectedIndexChanged event.
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
'ur selected order no
m_orderNo = Integer.Parse(CType(ComboBox1.SelectedValue, String)
CType(DataGrid1.DataSource, DataTable).DefaultView.RowFilter = "orderno = " + m_orderNo.ToString()
End Sub
|
|
|
|
|
How cant I conect with oracle data base with VB.NET?
|
|
|
|
|
You can use the Microsoft OLEDB provider for Oracle with the System.Data.OleDb objects; you can use the Microsoft native provider for Oracle with the OracleClient objects; or you can use Oracle's own .NET provider (I haven't used it so I'm not sure its object library).
For OLEDB, you would use something like this code:
Imports System.Data.OleDb
Sub DoSomethingInOracle()
Const kConnectionString = _
"Provider=MSDAORA.1;User ID=myUser; Password=myPass;Data Source=myServer;"
Dim conn As OleDbConnection
Try
conn = New OleDbConnection(kConnectionString)
conn.Open()
...
Catch ex As Exception
...
Finally
conn.Dispose()
End Try
End Sub
|
|
|
|
|
Hi
I'm looking for a datagrid that allow add, delete and resize columns by a context menu like the datagrid in Details View of Windows Explorer.
If someone know where I could get it, It'll be very helpful.
Thanks
----
hxxbin
|
|
|
|
|
sir
i want project's sample or topic for it
|
|
|
|
|
Sorry, actually I don't have a project's sample, cuz first I wanna know if there is a component like I need.
----
hxxbin
|
|
|
|
|
you may build your own rioght click menu then add the code to tge options in your right click menu. Its not very difficult. there is tons of free source code for a right click menu...take a look on the google search engine
Greg S
|
|
|
|
|
Basically ive a homemade webbrowser with lots of security and tools. On my main form..frmWebbrowser I plaaced an SStab1. I created code(works upon user request) to add a new tab with url as its name.eg...
BrowserForm.Frame1.Visible = False
BrowserForm.SSTab1.TabCaption(0) = BrowserForm.AddressField.Text
BrowserForm.SSTab1.Tabs = 2
BrowserForm.SSTab1.TabCaption(1) = BrowserForm.AddressField.Text
no problem here....but I want to create a new browser on the new tab. This must be done at runtime. ANd help would be highly appreciated..Thanks in Advance you guys have helped a lot already!
oh..some FYI...
Also I guess there are some issues with making the browser visible...
thanks Greg S
|
|
|
|
|
I need to design a dataaccess class that will allow me to call the same stored procedures on different databases. I want the class to be static but also to take advantage of connection pooling. I guess each method will need to be passed the database connection string. I will also need a collection of connection objects that I will need to manage (one for each database). Are there any good reference articles on this that anyone could point me in the direction of. Do you need more info on what I'm trying to achieve to answer this query, if so please post back.
Jim
|
|
|
|
|
Hi Jim. Are the databases all from the same provider? (e.g. are they all accessed using either the SqlClient classes, or the OleDbClient, or some other provider?)
If they're all accessed using SqlClient classes, I would think a simple Array or ArrayList would work for holding your SqlConnection objects. Then your method for calling your stored procedure could loop through the connections array, performing the following tasks: open the connection, set up a SqlCommand object for the stored procedure, call the SqlCommand.ExecuteNonQuery() method, and finally close the connection.
|
|
|
|
|
Mike
Yes they're all SqlClient. I think I will try your method and see how well it works.
Thanks
Jim
|
|
|
|
|
If you're using an OleDbConnection for Oracle, I think you could probably use the OleDbCommand's ExecuteNonQuery() method, issuing a "Create Table ..." statement. Here's an example of a VB.NET console application doing it this way:
Imports System.Data.OleDb
Module Module1
Sub Main()
Const kConnectionString = _
"Provider=MSDAORA.1;User ID=myUser; Password=myPass;Data Source=myServer;"
Dim conn As OleDbConnection
Dim cmd As OleDbCommand
Dim strSql As String
Try
conn = New OleDbConnection(kConnectionString)
conn.Open()
strSql = "Create Table test1(field1 varchar(10))"
cmd = New OleDbCommand(strSql, conn)
cmd.ExecuteNonQuery()
Console.WriteLine("Statement executed.")
Catch ex As Exception
Console.WriteLine(ex.Message)
Finally
cmd.Dispose()
conn.Dispose()
End Try
Console.WriteLine("Press Enter...")
Dim strWait As String = Console.ReadLine()
End Sub
End Module
If you're using a different provider (like the OracleClient for example) you'll want to review that provider's documentation for the proper methods to create a table.
|
|
|
|
|
I'm using System.Web.Mail to send e-mails out via smtp using the code below:
Dim Message As System.Web.mail.MailMessage = New System.Web.Mail.MailMessage
Message.To = "someone@outside.com"
Message.From = "me@mycompany.com"
Message.Subject = "test"
Message.Body = "test"
Message.BodyFormat = MailFormat.Text
SmtpMail.SmtpServer = "MY_EX" 'MY_EX = internal exchange server
SmtpMail.Send(Message)
When I send to someone within my company it works like a charm. When I send to an address outside it gives me an error:
Could not access 'CDO.Message' object.
If I change the SmtpMail.SmtpServer to "localhost" it works fine for the reverse, external but not internal addresses. This setup however doesn't create an error but the internal addresses never receive the message, only the external.
Can someone shed some light on what I'm doing wrong. Any suggestions are appreciated.
Thanks,
Kevin
Lost in the vast sea of .NET
|
|
|
|
|
Hi Kevin. Does your internal exchange server have any rules set up to prevent its use as an smtp mail relay?
One thing I've found is helpful when diagnosing the "Could not access 'CDO.Message' object" error is to look at the InnerException property of the Exception object you catch; if one is there, output its message and see if that sheds more light on the problem. If the InnerException exists, also check to see if it has its own InnerException. Keep going until you hit an InnerException = nothing. It may be there are nested exceptions, leading to the outer exception you trap as a 'CDO.Message' error.
|
|
|
|