|
Why are u yelling, it can harm people?
|
|
|
|
|
Your probably didn't make one. It's one of those little quirks that doesn't have an explanation. Though, that may change with the release of SP1 for Visual Studio .NET 2005.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thangs Dave, i will no more yell,but those things
are too much for 2 in the morning
|
|
|
|
|
I would like to be able to know when a key is pressed within my application. I've been looking at different options and came across keyboard and mouse hooks. The examples I've seen (unfortunately for me written in c#) seem to only be for global hooks. I'm not interested in what happens outside of the program I'm writing, just when the program is active should it listen for a keypress. It would be nice if it didn't matter which control had the focus either. The idea is to create a commandline that becomes activated instantly when a certain key is pressed.
I'm not sure if hooks are the right direction to go for this or perhaps there is something simpler that I can use.
Any help would be greatly appreciated.
Thanks,
David
|
|
|
|
|
You don't need a global hook for this. All you have to do is set the Form's KeyPreview property to True, then handle the Form's KeyDown event. It'll give you all the keystrokes going to that form, even it's child controls, before the controls see the keystroke.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
Are there any good, methods of creating a routine in an application, making the application trialware, until a key code has been entered. Must stop application running after x uses or x days after original install date.
Thanks, Andrew Robinson.
|
|
|
|
|
If your familiar with the settings in properties you could have a boolean for first use, when the program is first run set to false and set another setting to the current date, then each time the program is run check that date and compare.
Both of these settings could then be made redundant by a boolean setting that is set to true when registered. Sorry about not providing code, but this might give you a start.
Posted by The ANZAC
|
|
|
|
|
With one of my applications I have an encrypted file named "Activation.dat". This file contains 3 lines of code.
{ProgramEdition}
{Time activation file created - day of year)
(days left of the trial period)
When the program starts in the main procedure I read in all this data and make sure that the days left not equal to less than 0 and that the day of year is not before the current date of the computer. If the file is missing or the days left is less than 0 then I write to the days left field 'expired'. The program will then fail to execute. This is a very basic form of trial protection that I am using in the beta release of one of my pieces of software, I will be updating it but this is what I have right now. I would suggest a strong encryption procedure, I use a OneTimePad rolling encryption algorithm, but algorithms like RSA, DES, Rijndael should be sufficient.
For further protection you can also have the software end on a particular date.
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 have cretaed one blank report and i have placed one textobject now i want to connect to database how to do it?
|
|
|
|
|
|
CR HAVE MANY OF SOURCE OPTIONS
IN FIELD BROWSER U CAN SPECIFIED A PLANTY OF SOUCES
I USE DATATABLE FROM DATASET WICH IS, BY SOME ADAPTER, FILLED FROM DATABASE
FIRST CREATE STORED PROCEDURE TO FILTRATE DATA
WRITE SOME CODE FROM FRONT END TO FILL DATATABLE USING DATAADAPTER IN, FOR EXEMPLE, BUTTON'S CLIK EVENT
THEN CONNECT WITH CR
....
|
|
|
|
|
Hi all,
Can anybody please send me the code of how to write into a file.
Thank you.
|
|
|
|
|
How about something a little more usefull[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Lets say you wanna write data into binary file. Make sure you already convert the data into byte array (in this examples: StreamByte()). And if you;re using vb 2005, use this a line code to write to file.
My.Computer.FileSystem.WriteAllBytes("C:\MyData.dat", StreamByte, True)
Set the last argument to False if you want to append the file. It means, you can add more bytes chain into the same file.
And if you wanna read your data, use this one
Dim StreamByte As Byte() = My.Computer.FileSystem.ReadAllBytes("C:\MyData.dat")
hope this helpful.
|
|
|
|
|
How do I fix this error.
Pls I have the following code as a method in a class.
Public Function adminlevel() As Dataset<br />
Dim adminsql As String = "Select * from userlevel"<br />
Dim admindata As New SqlClient.SqlDataAdapter(adminsql, con)<br />
Dim adminset As New DataSet<br />
con.Open()<br />
If con.State = ConnectionState.Open Then<br />
admindata.Fill(adminset, "userlevel")<br />
<br />
admlevel = adminset.Tables("userlevel")<br />
<br />
con.Close()<br />
'Catch ex As Exception<br />
' MsgBox(ex.Message)<br />
'End Try<br />
Else<br />
MsgBox("No Connection")<br />
End If<br />
Return admintable<br />
End Function<br />
<br />
<br />
//at form end I have following code to bind combo box cboUser to a databse field.Stepping thru the code line cbouser.displaymember="levelname" returned the error after the code.<br />
<br />
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
Try<br />
Dim myuserlevel As New Underwriter.Underwriter<br />
Dim load As New DataTable<br />
load = myuserlevel.adminlevel()<br />
cboUser.DataSource = load<br />
cboUser.DisplayMember() = "levelName"<br />
cboUser.ValueMember() = "levelname"<br />
Catch ex As Exception<br />
MsgBox(ex.Message)<br />
End Try<br />
<br />
End Sub<br />
<br />
the error returned is below:<br />
Could not bind to the new display member <br />
Parameter: newDisplayMember
Fikunmi Feyijin
Hicad Systems
Nigeria
|
|
|
|
|
You might want to step through your Form1_Load code and watch the load variable to see what it contains after the load = myuserlevel.adminlevel() line. Make sure it contains a DataTable with the correct column names. Somehow, I doubt it, especially after looking at the code of your adminLevel method. What is admintable and where was it defined? I notices that you're assigning adminLevel a supposedly filled DataTable, but then you go and return a different variable, namely admintable , to the caller. Which is it?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi dave,
Thanks, the way I referenced the column names was wrong. The System is case sensitive. All I did was to ensure the correct casing of the column names in the database
So my system now works.
Fikunmi Feyijin
Hicad Systems
Nigeria
|
|
|
|
|
Hi All,
I want to convert an excel report in English Language to chineese language.
Plz Help ....!!! its urgent.....
|
|
|
|
|
What does this have to do with VB.NET???
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
While am running my vb.net,Sql server based Application through network
find the following issue,
"Request for the permission of type
System.Security.Permissions.EnviornmentPermission, mscorlip,
Version= 1.0.5000.0, Culture=netural,
Public Key token=b77a5c561934e089 failed."
How to handle this issue ?
Have any tool is avilable for correct this issue?
Advance Thanks
Anandan k
Steadfast Technology Services Private Ltd
|
|
|
|
|
Is your .EXE being launched from a network share or network mapped drive latter? If so, this is probably the source of your problem. Code running from any remote source, by default, is not trusted. You can learn about Code Access Security here[^]. It's a pretty large topic, and affects everything you do while using the .NET Framework so it's a good idea to understand, at the very least, the basics of how, and why, code security works.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I am student of final year engineering student. I selected “SMS Website” as my project topic. In this I have to send Bulk SMS through website and provide other kind of services related to SMS.
Please tell me which steps I should follow to make this kind of software.
Please send me some material or any kind of source code related to it.
I need your help.
Thank you!!!
Contact Me: ashish.0619@gmail.com
|
|
|
|
|
Why don't you start by reading up on how to send SMS messages first[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi All,
Anybody knows how to drag drop multiple rows from one datagridview
to another.I know how to drag drop single row.If any body have idea please
guide me how to do this.
Thanks,
venkat
|
|
|
|
|
I take it you're sending a DataRow object when you call SetData? Off the top of my head, you can probably create your own implementation of the IDataObject interface and encapsulate 1-n DataRow objects in it (implement your own collection of them), then just send that object instead of the one DataRow.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|