|
|
Never store a password - instead store the one-way encrypted version of the password and test any input against that. (RSA or SGK[^] is a good example)
|
|
|
|
|
I want to know how to execute code typed in a text box on a windows form. In other words. How do you make a program that executes vb.net/vb code typed in a textbox on a form when a button is pressed?
Richard Faulkner
Founder of GallantTechnologies
|
|
|
|
|
This can actually be done, and given the nature of the .NET framework, it's not surprising. I am sorry to say, I don't recall how tho ( I've not done it ). What is your intended use ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
You're lucky today, there's someone here on the codeproject that wrote an article on NScript. This is a scripting engine that can run some .NET languages like VB.NET in your application. Take a look: http://www.codeproject.com/dotnet/nscript.asp[^]
WM.
What about weapons of mass-construction?
"You can always try to smash it with a wrench to fix that. It might actually work" - WillemM
|
|
|
|
|
I am trying to make a program that "copies" the contents of everything behind the form (like CopyFromScreen). My only problem is that I want it to update itself every 1-75 milliseconds without any flicker. I am trying to do this because, for example, if I add a PNG of, let's say, an apple, it will appear that it will appear to be floating on the desktop. I am trying to mock layered windows, but I am also trying to avoid using them because I want to use controls on the form, too.
Richard Faulkner
Founder of GallantTechnologies
|
|
|
|
|
|
Does anyone know how to make an instant messenger with VB.Net that is similar to AIM?
Richard Faulkner
Founder of GallantTechnologies
|
|
|
|
|
http://www.developersdex.com/gurus/code/555.asp
http://samples.gotdotnet.com/QuickStart/howto/default.aspx
|
|
|
|
|
|
ok so i am making a program with a database connected to it and when i run the program in the IDE it works fine but when i install it and run it, it talks about not being able to find the database. Now my question is... when you make a program with a database, isn't the program supposed to copy to database to where ever it is supposed to read from and if it isnt then where\how to i get the program to copy and read the database upon installation. Also, i am keeping on the back burner the fact that when i install the program i want to be able to go into the database and change information and/or be able to print reports on the data.
|
|
|
|
|
Karma31251 wrote: when you make a program with a database, isn't the program supposed to copy to database to where ever it is supposed to read from
A program won't do anything unless you tell it to.
Karma31251 wrote: how to i get the program to copy and read the database upon installation
What database technology are you using?
|
|
|
|
|
Are you using ADO?
try capturing the error in a try/catch, that will give you a clue as to the actual error.
|
|
|
|
|
You might want to respond to the original poster, rather than me.
Also, you'll get much more information if you let the debugger catch the error.
|
|
|
|
|
Conversions
What is this and is it better to use than things like CStr, CDate, .ToString etc...?
Cleako
|
|
|
|
|
you should never use CStr/CDate. This is VB6 holdover stuff. Convert.ToXXX is your best bet, unless you don't know if the input is clean, then stuff like int.TryParse should be your first port of call.
In C# you can do this:
object o;
...
MyClass x = o as MyClass;
in this instance, x will be null if o is not an instance of myClass. You can also do this
if (o is MyClass)
{
// o is an instance of MyClass
}
I am sure VB can do the same, but I don't know the syntax.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I want to know how to design a 3-tier Architecture. Could you give me some information for example document or books to teach it. Thank you
|
|
|
|
|
What sort of app are you writing ( web/client ) ?
Basically - the presentation layer only deals with the UI and passing data to the business logic objects. These, in turn, use the data layer for any persistence of data.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
1. I am using VB.NET 2003 and when i am using multiply forms and i want show text in status bar but it's didn't show tell me how to send text in status bar when we are working with Mdi Forms?
2. how we get a blank data grid cell for input and how we put combobox or button in data grid.
please help me in it's
Thanz
Rehan
|
|
|
|
|
I believe you need to add a status panel to the status bar and set the text property of the status panel to allow you to view text in the status bar.
Sorry, but I can't help you with the data grid part of the question.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
I am trying to insert items into MySQL db using parameters but I keep getting this error message:
Failed to convert parameter value from a String to a DateTime.
Here is some sample code:
Dim myConnString AsString = "DRIVER={MySQL ODBC 3.51 Driver};" & _
"SERVER=192.168.1.27;" & _
"DATABASE=testship;" & _
"USER=;" & _
"PASSWORD=;" & _
"OPTION=3;"
Dim MyConnection AsNew Odbc.OdbcConnection(myConnString)
MyConnection.Open()
Dim MyCommand AsNew Odbc.OdbcCommand
MyCommand.Connection = MyConnection
MyCommand.CommandText = "INSERT INTO ls_orderitems (OrderDate, OrderCustomer, OrderAcctNum, OrderType, OrderSoNum, OrderItemPartNum, OrderItemPartDesc, OrderItemQty, OrderItemQtyRec, OrderItemQtyDtRec, OrderItemBO, OrderItemBODt,OrderItemCanceled, OrderItemCanceledDt, OrderItemNotes, OrderItemPONum, OrderItemRetailPrice, OrderItemSalePrice, Status, InsertDate) VALUES (@OrderDate, @OrderCustomer, @OrderAcctNum, @OrderType, @OrderSoNum, @OrderItemPartNum, @OrderItemPartDesc, @OrderItemQty, @OrderItemQtyRec, @OrderItemQtyDtRec, @OrderItemBO, @OrderItemBODt, @OrderItemCanceled, @OrderItemCanceledDt, @OrderItemNotes, @OrderItemPONum, @OrderItemRetailPrice, @OrderItemSalePrice, @Status, @InsertDate)"
MyCommand.Parameters.Add(New Odbc.OdbcParameter("@OrderDate", OdbcType.Date)).Value = OrderDate
MyCommand.Parameters.Add(New Odbc.OdbcParameter("@OrderCustomer", OdbcType.VarChar)).Value = OrderCustomer
MyCommand.Parameters.Add(New Odbc.OdbcParameter("@OrderAcctNum", OdbcType.VarChar)).Value = OrderAcctNum
MyCommand.Parameters.Add(New Odbc.OdbcParameter("@OrderType", OdbcType.VarChar)).Value = OrderType
MyCommand.Parameters.Add(New Odbc.OdbcParameter("@OrderSoNum", OdbcType.Int)).Value = OrderSoNum
|
|
|
|
|
Is OrderDate a string or a DateTime object? If it is a string then you need to convert it to a DateTime first.
|
|
|
|
|
I'm trying to send commands to a remote host using sockets. I'm able to send the first message or command, but after that any message or command I send to the remote host won't run. Here's what I wrote, may be someone can help me. The commented lines are just some different approaches I've tried. The lines Call wskServer.Get and AddText are apparently running just once.
#Region "Data Arrival"
Private Sub wskServer_DataArrival(ByVal sender As Object, ByVal e As Winsock2005DLL.WinsockDataArrivalEventArgs) Handles wskServer.DataArrival
serialPort.Encoding = Encoding.ASCII
Dim message As String
Dim temp As String
Dim state As String
message = ""
message = e.TotalBytes
temp = message
'Do While wskServer.State <> WinsockStates.Closed
Call wskServer.Get(message)
AddText("----" & message & "----" & vbCrLf, txtoutput)
If serialPort.IsOpen Then
serialPort.Close()
End If
serialPort.Open()
If temp = "4" Then
state = "On"
serialPort.Write("o")
line = serialPort.ReadByte
End If
If line = 65 Then
wskServer.Send("Luz verde en IOLine 5 esta prendida")
End If
If temp = "5" Then
state = "Off"
serialPort.Write("f")
line = serialPort.ReadByte
End If
If line = 66 Then
wskServer.Send("Luz verde en IOLine 5 esta apagada")
End If
' If message.Contains("%") Then
' serialPort.Write("f")
' End If
' line = serialPort.ReadByte
'Loop
'line = ""
serialPort.Close()
End Sub
Thanks for any help!!!!!
|
|
|
|
|
how can i see list of installed applications in a listview?
thanks.
(I cann't speake english well.)
|
|
|
|
|
I was working on the same project here recently.
There is a registry key that Windows stores all of the installed programs in, it's the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall key. All you have to do is read each SubKey there.
Hope this helps.
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|