|
By being very creative?? Really, if we all just said how we do it, we'd be violating our own security by "giving away the keys to the kingdom." The key is hiding your information in plain sight by employing judicious use camouflage.
VB6 isn't supported by Microsoft anymore, and so library support for VB6 is also fading. Libraries that do things like registration and expiring trials.
You'd have to come up with your a method of using and encrypting data that you use to determine the date the app was installed, or the number of times the app was run, or how long the app has been running, or ..., or ..., and even any combination of those information. You store it in some out of the way place that's on everyones machine, either in the Registry or the filesystem somewhere, or both using filenames and registry keys that look like they belong there.
|
|
|
|
|
I am currently working on a program that will open on it’s own each day.
I have tried using the task scheduler, but I keep getting: access is denied (0x80070005)
I have looked in to creating a window service to accomplish this task. I have found a window service
example that would make you system speaker beep every three seconds, that works fine. My question is how can I make a window service that will call a specific program
Programming environment :
Visual Basic (Visual Studio 2005 Pro)
.Net Framework 2.0 SDK
Can anyone out there help. Thanks in advance
|
|
|
|
|
creating a service that calls a programme is probably not the best thing to do.
since a service will start before the user logs in any calls to start a programme (wich requirs a user to be logged in) could result in some very strange behavior
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistaks.
|
|
|
|
|
Thank you for your reply
And it was helpful
It may steer me in an easier way
I am trying to launch the program so that I will see the messages that it will display.
The program is for Prescriptions, when to reorder, and a reminder when to take pills
If you would have any suggestions would be helpful
Thanks again
|
|
|
|
|
Code_Addict wrote: I have tried using the task scheduler, but I keep getting: access is denied (0x80070005)
Access Denied usually means that the account you told the Scheduler to use to launch your app either is the wrong username or you gave it the wrong password, or both. The Scheduler uses that account information to launch your app under those credentials.
|
|
|
|
|
I have two files with fields shown as below
xvEntryID:47F92F70 8E5B46EE547C9ECE
xvTo:NOTES:"Clayton N Corrao/QAE5"<cn=clayton n="" corrao="" o="QAE5">
xvFrom:NOTES:"Notes Admin/QAE5"<cn=notes admin="" o="QAE5">
xvDate:Thursday, 26 July 2007 20:15:44
xvSubject:#12 - Message with 2 Attachments
I have to compare ONLY the entries (Entry is the text followed by colon) corresponding to each of those fields (xvEntryID, xvTo, etc) in both the files and return if they are the same or different, using VB.NET.
I will be happy if someone can help me with the basic idea of how to start off with it.
Ravi.
|
|
|
|
|
Is this by any chance a case of ghrupath?
Apologies if my Hindi is not up to scratch here.
You always pass failure on the way to success.
|
|
|
|
|
I am sorry, I didn't understand what a ghrupath is.
Ravi
|
|
|
|
|
Apparently it means 'homework' in Hindi.
I was asking if what you are presenting the message board with is a homework assignment.
You always pass failure on the way to success.
|
|
|
|
|
Nope its not. Well, shouldn't homeworks be discussed here?
Ravi
|
|
|
|
|
Hi,
What I suggest is opening two textstream objects, one for each file, then simply read line by line comparing the fields with functions such as INSTR and MID etc.
Regarding homework.
My take on the area is that if someone has not made any effort to google it search in the archives of Code Project; then whether it is homework or not I'm not usually prepared to help, because as all experienced programmers know the only way to break into programming, as a career, is to have taken the initiative in ones learning and gone beyond asking for help as soon as one hits a wall.
You always pass failure on the way to success.
|
|
|
|
|
Thanks for the idea and advice. But the prob with that method is the lines might be diff in both the files. I mean The first lines might not fields at all in both the files. So I will have to compare only the FIELDS.
|
|
|
|
|
Hi Ravi,
I don't understand so can you give me an example.
Thx
You always pass failure on the way to success.
|
|
|
|
|
If order is irrelevant and other lines might be present, this is what I would suggest:
read one file and build a Hashtable/Dictionary with field-value pairs;
then read the second file and build a second HT/Dict, then compare both.
Optimization: rather than building the second HT/Dict, you could search the first one
and remove as you find; in the end everything should be found and removed to be identical.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
I have an Windows Application(Developed in VB.net) in Windows Vista which sends an email using Outlook 2007. We can enter the text for the email in a form in the Windows application.First a word document is prepared using a 2003 word template and then this document is included in the email using vb.net (.net 2.0) office automation.
Now the problem is if there is more than 1 space in the text it appears as �
(Unicode Replacement Glyph) in the outlook word editor and therefore appears in the mail as well.For 2 spaces 1 � appears and for 3 spaces 2 � appear.For a single space there is no problem.
Can anybody suggest any solution or at least tell me why this may be happening? This character should not come in the mail generated.
PS: This application sends an email without any issues in XP(where automation is done using .Net 1.1 and Office 2003).It was migrated to .Net 2.0 for use in Vista
rahul
|
|
|
|
|
I am a newbie, be gentle.
I am starting out with basic File I/O and have seen an example here on 'The Code Project' (TextFileImporter) that uses a data table classto hold the data and then display it in a grid via a dataset.
I want to temporarily store the data whilst parsing each line and validating but ultimately don't want to display the data in a grid.
Is it common practice to still use a data table in VB.NET or should i use an array or string as in the VB6 style.
Thanks
Barney
|
|
|
|
|
Good question.
There are different answers depending on what you want.
If you want ease of programming then a datatable is a good choice. This is because it uses rows and columns with which you are probably familiar.
If you want speed of processing then I would recommend an arraylist.
Arraylists are faster to read and write to, in my experience, than arrays. The catch is that arraylists are not multidimensional.
The good news is that there is a way around this problem i.e. how to represent rows and colums in an arraylist.
I use arraylists in a csv class I created and they whack the pants off arrays when it comes to processing speed.
Alternatively you could use a dataview.
What this does is basically make a view of your table.
So that it contains the same data.
The advantage of a dataview is that you can very easily apply sorts and filters.
Also with a dataview all you basically do is point the dataview object to your table et voila you have another way of looking at your datatable.
I hope this is of some help to you.
You always pass failure on the way to success.
|
|
|
|
|
Thanks, i think i'll opt for the data table for now then, just to get up and running as i'm only dealing with reasonably small files.
For larger files though i'll consider arraylist.
Many Thanks
|
|
|
|
|
Presently i am using the context menustrip for showing popup menu for dynamic controls when i click on textbox it is showing the defualt rt.click properties . I want to show the Custom Context MenuStrip properties .It is showing both properties . How to disable the predefined properties???
Waiting For Help....
DVSriram
|
|
|
|
|
Is this possible to show .gif file in status bar by vb.net 2003?
Thanks In Advance
Ejaz
|
|
|
|
|
You can't show a file in the status bar. Load the file into an Image object, then it's possible to show it.
If you are using framework 2, use StatusStrip instead of StatusBar. Add a ToolStripStatusLabel to the bar and assign the image to the Image propery.
---
single minded; short sighted; long gone;
|
|
|
|
|
hi, really need to know how to add the reference lybraVb.dll, so that i can use hoverGradientButton.
Faruzzy.net!
|
|
|
|
|
Do NOT post the same question multiple times in the same day. Show some patience. You posted your question while most people, who answer questions on these board, were asleep.
If you want help THAT bad, call the people who wrote the library and pay them whatever they want to support you.
|
|
|
|
|
Hi, I have develop an application in vb2005 and want to produce the report in crystal report. From here, does anyone know how to display a report in crystal report (which integrated with vb2005) with a dynamic coding?
Thank in advance
|
|
|
|
|
Hello,
To include the report on the Web page, we need to drag and drop the Crystal Report Viewer control from the Toolbox. Because the Crystal Report Viewer control doesn't have a ReportSource property available at design time, you have to set that property inside your code.
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Public Class WebForm1
Inherits System.Web.UI.Page
Protected WithEvents CrystalReportViewer1 As CrystalDecisions.Web.CrystalReportViewer
#Region " Windows Form Designer generated code "
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
CrystalReportViewer1.ReportSource = Server.MapPath("crystalreport1.rpt")
End Sub
End Class.
or you can create instance of the report class which was created by Visual Studio.NET when you designed your report. The name of that file is same as report that you create CrystalReport1.vb. To see this file expand CrystalReport1.rpt (click on + sign in front of the CrystalReport1.rpt).
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Public Class WebForm1
Inherits System.Web.UI.Page
Protected WithEvents CrystalReportViewer1 As CrystalDecisions.Web.CrystalReportViewer
#Region " Windows Form Designer generated code "
Dim crpt As CrystalReport1
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
crpt = New CrystalReport1()
CrystalReportViewer1.ReportSource = crpt
End Sub
End Class.
If you set WebForm1.aspx to be the Start Up page for the project, and start the project, you will get the report page if you have blank password in database for "sa". If "sa" or any other user name that you want to use to access database has password, when you run the report, you will see the "LogonFailed" error. If we were developing windows application, Crystal Reports will ask us for password information. This error occured, because when you design and save report, all of the connection information is saved within the report except password. If the password is blank, there will be no problem to create or generate the report.
To prevent this, you will need to provide login information in your code before you set ReportSource property. To do so, you will add some code in Page_Load event. Now, your code should look like:
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Public Class WebForm1
Inherits System.Web.UI.Page
Protected WithEvents CrystalReportViewer1 As CrystalDecisions.Web.CrystalReportViewer
#Region " Windows Form Designer generated code "
Dim crpt As CrystalReport1
Dim myTable As CrystalDecisions.CrystalReports.Engine.Table
Dim myLogin As CrystalDecisions.Shared.TableLogOnInfo
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
crpt = New CrystalReport1()
For Each myTable In crpt.Database.Tables
myLogin = myTable.LogOnInfo
myLogin.ConnectionInfo.Password = "test"
myLogin.ConnectionInfo.UserID = "sa"
myTable.ApplyLogOnInfo(myLogin)
Next
CrystalReportViewer1.ReportSource = crpt
End Sub
End Class.
Now, if you run the report, you will not get an error page and evrything will look OK. The report will be generated and shown in your Web page.
Regards,
James
James Smith
www.componentone.com
|
|
|
|