|
This article doesn't have anything in it about running total fields. Could you please explain why you thought it would be helpful? If you were suggesting that I use parms, I know how to use them but I fail to understand how they would work/help in this particular situation. I could really use some advice, thanks for your help so far.
|
|
|
|
|
I have spent a great deal if the day reseraching how to do this. I thought I would post this snippet just in case anyone needs it. Please let me know if there is a more appropriate way of doing this.
Public Const WM_NCLBUTTONDBLCLK As Integer = &HA3
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
If m.Msg = WM_NCLBUTTONDBLCLK Then
'You can write your own code to handle the double click here....
Else
MyBase.WndProc(m)
End If
End Sub
|
|
|
|
|
Just finished my first business app using VB.net 2005/SQL2005 and wanted some advice/products to protect it before throwing it into the wild.
Looking on the web, there seem many ways to skin a cat, but I though an encryption class in the code to check a .LIC file looked the easiest. I wanted to later set up an online download/purchse/license model once it takes off so I'm not sure if the two are compatible. What the pro's experiences?
I
|
|
|
|
|
moldie wrote: wanted some advice/products to protect it before throwing it into the wild
What do you mean by protect your software?
|
|
|
|
|
I mean to protect it from copying. Just like the commercial software you get which gives you a 30 day trail then you have to pay the license fee. I was wondering what the best practice was to "make sure you get your money" for the thousands of hours of blood and sweat!!
-- modified at 6:39 Tuesday 13th June, 2006
|
|
|
|
|
As far as I know, the trail software will stock its functionality when user open X times or in a specific period (usually 30 days). You might need to count this thing (X time or specific period) with the time in windows or number of open application. These count number usually record in regedit. If you want to work with regedit in vb.net try to read this article[^].
|
|
|
|
|
Do you have vb.net QuickFillDemo_src?The VC CodeProject (QuickFillDemo_src) is very difficulty!
Do you have vb.net QuickFillDemo_src?The VC CodeProject (QuickFillDemo_src) is very difficulty!
|
|
|
|
|
I am Using Crystal Reports OCX Control in (C# ) VS.NET 2003.
I am using a DSN to connect database to report.I want to remove this method of connecting through DSN
I want to populate the Report using DataSet.
is it possible ?
thanks in Advance.
|
|
|
|
|
|
I am not using crystal report available with .net.I am Using Crystal Reports OCX Control
The code which I use is,
This is the two sentences which makes problem.
axCrystalReport1.ReportFileName= Application.StartupPath.ToString() + \\Reports\\Sample.rpt;
axCrystalReport1.Connect=System.Configuration.ConfigurationSettings.AppSettings
Here I use a dsn to connect which I want to avoid.
If I bring the result in a dataset I dont see any method to assign it to the report Object.This could have been done effectively with crystal reports of vs.net
|
|
|
|
|
|
Hi all,
I'm looking for people's thoughts on a problem I'm having. We mark users as active if they log in to our app, so they can't log into the app again using the same user. If they crash their PC they are left as active and can't log back into the sytem. How can find out if a user crashed out instead of being still logged in? I know this is probably a basic programming problem, but i've struggled for a solution so far.
Any help would be much appreciated.
|
|
|
|
|
Two solutions:
You could time out the login. If there has been no activity against their account after a period of time the system automatically logs them out.
You could set up a sort of heart beat where by the client PC sends a heartbeat message to the server every few seconds. If the server has no heartbeat after, say, a minute then it logs the user out automatically. This solution is really the same as the first one but with a shorter timeout because the PC is automatically generating events on a frequent basis. However, this could clog the network with heartbeat messages if you have a lot of clients.
Scottish Developers upcoming sessions include:
.NET debugging, tracing and instrumentation by Duncan Edwards Jones and Code Coverage in .NET by Craig Murphy
My: Website | Blog
|
|
|
|
|
Hi Colin,
Thanks for those solutions. I actually want users who crash out to be able to log in again. I suppose what I could do is everytime a client logs in, the server adds it to its list and marks it active. It then sends it your idea of a heartbeat every few seconds. If the user crashes their machine the heartbeat isn't answered so they get taken off the list and marked as inactive.
This could be the solution but seems like overkill.
Thanks for your help.
|
|
|
|
|
Not sure what is overkill about it. I have done it and it solves the issue pretty well.
It's really the only way to be 100% sure the client is still there. You don't want to just ping the machine either because that is no indication that the client app is still alive. Maybe just the app dies (or its task was ended with task manager) so you have to do some kind of message exchange with the app itself.
My Blog[^] FFRF[^]
|
|
|
|
|
Hi Ray,
Thanks for your help. What kind of message exchange did you use / recommend?
|
|
|
|
|
The exchange message contents really don't matter. Just the fact that you can send a message and get a response may be enough for you.
My application had specific requirements centered around security so when my users logged in they got back a security token. The server process would periodically ping them by sending a simple text string of 'TokenRequest' and the client had to respond with a hashed version of the token back. The server then compared the hashed response to the token that was stored form when they logged on and if they were the same then the client was still connected. If they were different then the client was disconnected by the server.
Unless you need all that security though you might be better off with just a ping pong type message. Something fast and simple.
My Blog[^] FFRF[^]
|
|
|
|
|
Sir,
I am using the following code to print the window page in vb.net 1.1.But getting th error
An unhandled exception of type 'System.ComponentModel.Win32Exception' occurred in system.drawing.dll
The data area passed to the system call is too small.
Private Declare Function BitBlt Lib "gdi32.dll" Alias "BitBlt" (ByVal _<br />
hdcDest As IntPtr, ByVal nXDest As Integer, ByVal nYDest As _<br />
Integer, ByVal nWidth As Integer, ByVal nHeight As Integer, ByVal _<br />
hdcSrc As IntPtr, ByVal nXSrc As Integer, ByVal nYSrc As Integer, _<br />
ByVal dwRop As System.Int32) As Long<br />
Dim memoryImage As Bitmap<br />
Private Sub CaptureScreen()<br />
Dim mygraphics As Graphics = Me.CreateGraphics()<br />
Dim s As Size = Me.Size<br />
memoryImage = New Bitmap(s.Width, s.Height, mygraphics)<br />
Dim memoryGraphics As Graphics = Graphics.FromImage(memoryImage)<br />
Dim dc1 As IntPtr = mygraphics.GetHdc<br />
Dim dc2 As IntPtr = memoryGraphics.GetHdc<br />
BitBlt(dc2, 0, 0, Me.ClientRectangle.Width, _<br />
Me.ClientRectangle.Height, dc1, 0, 0, 13369376)<br />
mygraphics.ReleaseHdc(dc1)<br />
memoryGraphics.ReleaseHdc(dc2)<br />
End Sub<br />
Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage<br />
e.Graphics.DrawImage(memoryImage, 0, 0)<br />
End Sub<br />
Private Sub PrintButton_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PrintButton.Click<br />
CaptureScreen()<br />
PrintDocument1.Print()<br />
End Sub
Please help me.
Thanks and Regards
Amaneet Brar
-- modified at 7:03 Monday 12th June, 2006
|
|
|
|
|
hai
as i m new to vb.net
anyone plz tell me the concept of licensing in vb.net
can anyone plz send me the code of licensing in vb.net.
how i can issue a license of 30 days for my application.
its very very urgent
thank you
|
|
|
|
|
One option would be to store the date the application was installed/should expire in the registry either during installation or the first time the user runs the app. Then insert code to check that registry value. In Visual Studio 2005 you can do this check in the ApplicationEvents.vb MyApplication_Startup Event. Like this:
Private Sub MyApplication_Startup(ByVal sender As Object, ByVal e As Microsoft.VisualBasic.ApplicationServices.StartupEventArgs) Handles Me.Startup
'If the current date is greater than or equal to the Expiration date, then the program will not open.
If CInt(Now.Date.ToString("yyyyMMdd")) >= gblintExpireDate Then
MessageBox.Show(My.Application.Info.ProductName & " has expired.", My.Application.Info.ProductName)
e.Cancel = True
End If
End Sub (Of course the gblintExpireDate would have to be a value from the registry instead of a global constant like I use)
Or for other versions of Visual Studio I suppose you can do this check in the OnLoad of the first form or in your main sub...
Hope this helps.
|
|
|
|
|
You could (instead of licensing) write the date when the program was installed to a key in the registry, and if the program is started when more than 30 days have gone by, the program won't start.
----
Dim Sleepy as Boolean = True
If Me.Sleepy = True Then
Goto Sleep
End If
----
|
|
|
|
|
HOw can i connect from vb.net 2005 to Excel, Foxpro?
................
|
|
|
|
|
|
I'm using an access database with VB6. My program has been working well until now. Then I set password on mdb database, the program not connect the database. Does anybody have any suggest how I can repair it, view or extract the data. Can anybody suggest why this is happening.
Thanks!
Tran Dung
|
|
|
|
|
Did you use access workgroup? If you use it you should change your provider
................
|
|
|
|