Mr.M 89 Future Programmers

If you use the Process Class You can run any file and windows will use the associated program to open it.

Thanks but I don't know whether that will help me or not but I will try it out, the problem is that the program that I created in java do run when I run it on the IDE but when I try to run it using the CMD it just say unable to start myproject.jar so it seems as if it can't find the project or it fail to execute it I even changed the JRE which was SE to just a pure JRE but this jre it act as an update to the system. The NaviCoder I failed to export the project in a way that it is an executable file it save a project in cpj format.

Mr.M 89 Future Programmers

Hi DW

I created a program in NaviCoder For Java and now I want to export it so that it can be a exe file so that it can be executed on a computer on it own without the need of an IDE. Thanks

Mr.M 89 Future Programmers

Hi DW

I've created a program in java and now because I'm also new in java but I know better visual Basic i couldn't complete the program the way I wanted because there are features I find it hard to do so I just completed the main program on java and now I want to create the program that will execute this program I created on java using vb.

Mr.M 89 Future Programmers

Ok now my worry is the shouldn't in generate an exeption error since I'm debuging it from a computer which doen't have a dispenser device because now it just run smooth as the first time I didn't put the dispenser codes, shouldn't it produce an error stating that it didn't find any dispenser to dispense the choosen amount?

Mr.M 89 Future Programmers

I'm not clear with your question but I think you want to close the selected button off which was the button that you created using the codes you posted above am I right? If so then please see this you will then need a way to trace your buttons because in this case I had a visual buttons on my interface ruther than you in which it will be created an run mode.

Mr.M 89 Future Programmers

Well your situation is a bit complicated since I find it harder to remove the created button so I then decided to add a timer to force the control to remove the UGB so you can do it like I did below in the codes hope it will answer your question.

Public Class Form1
    Dim TC As Integer
    Dim NT As New Button
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim TCP As New Integer

        If Button1.Text = "Create" Then
            TC = TC + 1
            TCP = TC * 100
            NT.Anchor = AnchorStyles.Top And AnchorStyles.Left
            NT.Enabled = True
            NT.Location = New Point(TCP, 85)
            NT.Size = New Size(100, 30)
            NT.Visible = True
            Controls.Add(NT)
            Button1.Text = "Close"
            Timer1.Stop()
        Else
            If Button1.Text = "Close" Then
                Button1.Text = "Create"
                Timer1.Start()
            End If
        End If

    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Button1.Text = "Create"
    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Controls.Remove(NT)
    End Sub
End Class
Mr.M 89 Future Programmers

:-) Thank you so much for solving this now I don't know whether I should worry about sorting the billRequired method or it will determine on it own when it has been installed on a device with a dispensing device.

Mr.M 89 Future Programmers

Well thanks for the link but I didn't understand what I should do in my codes since you said you don't have the latest code well bellow is the new code which I changed the CashDispenser to cashDispenser and it indeed solved my first problem which was errors so now with this NullPointException I really don't know how can I assign this to a value. here is the latest snip code

switch (withdrawSelection){
    case 1:
        accountWithdraw(10);
        amount = 10;
        cashDispenser.dispenseCash(amount); //New code
        cashDispensed = true;
        mainMenu();
        break;

Thank you.

Mr.M 89 Future Programmers

uhm, use cashDispenser instead of CashDispenser? And actually assign that variable a value, of course.

Thank you that really fixed the errors and now it can debug and once I've choosen the amount I want to withdraw it then gave me this error bellow. Is this error comes as a result that I was deburging this on a computer which doesn't have a Dispenser device or? Thanks again for your help.

Exception in thread "main" java.lang.NullPointerException
    at Main.withdrawFunds(Main.java:76)
    at Main.mainMenu(Main.java:33)
    at Main.main(Main.java:171)
Mr.M 89 Future Programmers

So How and where can I go about fixing this?

Mr.M 89 Future Programmers

Hi Dw

I'm creating an atm appication and now my research pointed me to use the Java Point Of Service/Sale (JPOS) my application allow user to choose the amount from the options displayed on the screen and the user will use the number keypad to make his/her selection and the amount displayed on screen is retrieved from his/her account and it is splited in to 5 ways. Now if I run it, it gives me 5 errors under the Dispense amount, I've commented next to the line(s) where there are errors and I've wrote the error that I get as is on the comment in the codes.Please refer to the codes below.

/*
 *@author Mr Hacker
 */
import java.util.Scanner;
import CashDispenser;

public class Main {
private double currentBal =1899562589;
Scanner input = new Scanner(System.in);
private CashDispenser cashDispenser;
int amount;
public void mainMenu(){

    int selection;
        System.out.print("Welcome to the Automated Teller Machine!\n");
        System.out.println("Select from the following menu options below:\n");
        System.out.println("========================");
        System.out.println("| [1]  Check Balance   |");
        System.out.println("| [2]  Withdrawal      |");
        System.out.println("| [3]  Deposit         |");
        System.out.println("| [4]  Exit            |");
        System.out.println("========================");
        System.out.print("Please select your option now: ");
        selection =input.nextInt();


switch (selection){
    case 1:
        viewBalance();
        break;
    case 2:
        withdrawFunds();
        break;
    case 3:
        depositFunds();
        break;
    case 4:
        System.out.println(" Thank you for using This ATM today. Bye!");

}
}
public void viewBalance() {
    int selection1;
    System.out.println("You have selected Balance.\n");
    System.out.println("\t-- Your Current Balance is:R " + currentBal);
    System.out.println("Return to main menu? \n [1] for YES \n");
    selection1 =input.nextInt();
    switch (selection1){
    case 1:
        mainMenu();
        break;
}
}
public …
Mr.M 89 Future Programmers

After a little search via uncle Google found some information about Microsoft POS, Here

Thank you but what I was looking for wasn't there and I just managed to sort it last night which I was just suppose to add the Library to the application's reference and then import it to the application. Now the problem I just encounted was to call the BillDispenser to dispense the amount entered so I don't know how can I call it because if I call it, it gave me errors and now I just encounted another errors please see my codes and I've commented where there are errors and I've wrote how I want it to be.

'*******************************************************************
'*                                                                 *
'* I've commented where there are errors and where I have problems *
'* how I want it to be please refer to the comments.               *
'*                                                                 *
'*                    Thank you                                    *
'*                                                                 *
'*******************************************************************

Option Explicit On
Option Strict On
Imports Microsoft.PointOfService
Public Class Form2
    Public MustInherit Class BillDispenser
        Inherits PosCommon

        Public Overrides ReadOnly Property CapPowerReporting As Microsoft.PointOfService.PowerReporting
            Get

            End Get
        End Property

        Public Overrides ReadOnly Property CapStatisticsReporting As Boolean
            Get

            End Get
        End Property

        Public Overrides ReadOnly Property CapUpdateStatistics As Boolean
            Get

            End Get
        End Property

        Public Overrides Function CheckHealth(ByVal level As Microsoft.PointOfService.HealthCheckLevel) As String

        End Function

        Public Overrides ReadOnly Property CheckHealthText As String
            Get

            End Get
        End Property

        Public Overrides Sub Claim(ByVal timeout As Integer)

        End Sub

        Public Overrides ReadOnly Property Claimed As Boolean
            Get

            End Get …
Mr.M 89 Future Programmers

Hi Dw

There is a project in which I'm working on and now it had come to a point where I had to start including the Microsoft Point Of Service and I've already downloaded it and installed ow I must say I'm using windows 7 Home basic and I can't change my OS because I will loose lot of work so I can't install the windows that fully packed with the POS.

If I check the sample codes under Microsoft about how to start calling this feature it show that I have to Inherites the PosCommon under the BillDispenser Class so if I do this it underline the PosCommon I don't know whether I have to load the packs to VB and how am I going to do so so that if I call it on VB it can be linked. If anyone know how can I start working with this please help me.

Thanks.

Mr.M 89 Future Programmers

Ok thanks I've managed to solve this problem now my problem occured when I debug this program at first I tried using the jpos and I called the BillDispenser but it gave me about 22 warnings that the com.sun is a sun properitery and it maybe removed in the future release so I decided to remove it and I added a Withdrawal file and I called the dispensing method like this cashDispenser.dispenseCash(amount);
cashDispensed = true;
Now the problem is this method which gives me the problem and also it I use the SSystem.out.Println("the message here") for more info please refer on my first post. The problem says something like the cashDispenser cannot be refered to a static something it just that I'm not near my computer but it something like that.

Mr.M 89 Future Programmers

it's likely that libary is not in your path.

can you instruct me from starting it because what I did is that I just called it without doing any other thing so that I can show you or give you an idea of what I want to do, infact I don't even know how I will declear or call this, is there a simple way to control the dispense device and also count the money to be sure that the machine withdrawals the exacly amount choosen not more than that. just a way in wich I can do this instruction or control on a device. Thank you.

Mr.M 89 Future Programmers

Hi DW

I'm creating an ATM program and now I want to call the Dispensor to dispense the selected amount from the options provided. The main problem here is importing this import atm.input.CashDispenser;
the rest of the code is fine. here is the full code:

import atm.input.CashDispenser;
import java.util.Scanner;
public class Main {
private double currentBal =1899562589;
Scanner input = new Scanner(System.in);
public void mainMenu(){
    int selection;
        System.out.print("Welcome to the Automated Teller Machine!\n");
        System.out.println("Select from the following menu options below:\n");
        System.out.println("========================");
        System.out.println("| [1]  Check Balance   |");
        System.out.println("| [2]  Withdrawal      |");
        System.out.println("| [3]  Deposit         |");
        System.out.println("| [4]  Exit            |");
        System.out.println("========================");
        System.out.print("Please select your option now: ");
        selection =input.nextInt();
switch (selection){
    case 1:
        viewBalance();
        break;
    case 2:
        withdrawFunds();
        break;
    case 3:
        depositFunds();
        break;
    case 4:
        System.out.println("  Goodbye! ");

}
}
public void viewBalance() {
    int selection1;
    System.out.println("You have selected Balance.\n");
    System.out.println("\t-- Your Current Balance is:R " + currentBal);
    System.out.println("Return to main menu? \n [1] for YES \n");
    selection1 =input.nextInt();
switch (selection1){
    case 1:
        mainMenu();
        break;
}
}
public void withdrawFunds() {
    int withdrawSelection;
    System.out.println("Amount to withdraw: ");
    System.out.println("[1] - R1500");
    System.out.println("[2] - R3500");
    System.out.println("[3] - R5000");
    System.out.println("[4] - R10000");
    System.out.println("[5] - R20000");
    System.out.println("[6] - MAIN MENU");
    System.out.print("Please select your option now: ");
    withdrawSelection =input.nextInt();
switch (withdrawSelection){
    case 1:
        accountWithdraw(1500);
        mainMenu();
        break;
    case 2:
        accountWithdraw(3500);
        mainMenu();
        break;
    case 3:
        accountWithdraw(5000);
        mainMenu();
        break;
    case 4:
        accountWithdraw(10000);
        mainMenu();
        break;
    case 5:
        accountWithdraw(20000);
        mainMenu();
        break;
    case 6:
        mainMenu();
        break;
}
}
public void accountWithdraw(int withdrawFunds){
    currentBal = currentBal -withdrawFunds;
    System.out.println("Please take your funds.");
} …
Mr.M 89 Future Programmers

Hi DW

There is a project that I'm currently doing and now I just thought of saving some data online so now my question is that how can I write code to fisrt of all create a file with a name of a user then inside the file write and save files. let say the domain that I want to save all this will be www.123.com

Mr.M 89 Future Programmers

Hi DW

I'm developing an ATM service and now I want to call the dispensor to dispence the amount enetered by the user after his/her balance has been validated, you don't worry about writing the validation balance code I wrote it so now I'm stuck here anyone who can help just the code to control or execute the dispensor to dispance the amount entered. My other query is to check the remaining amount on the dispensor this will prevent the system from deducting users balance when he/she press enter if the dispensor does not have money or has a les amount than the amount enetered by the user. Thank you looking forward to see your assistance.

Mr.M 89 Future Programmers

Hi DW

I'm a VB.Net user and I have a project which I'm doing and the problem is that I didn't find the answer to my problem in VB.Net I found it in Java so now I'm forced to complete this project in java, I must say this is a program that will be installed and operate the ATM, I have the full code which I got it from Code.google.com but I will just have to add some features that I want to add in an ATM so my main problem at the moment is to find the java IDE that will support the import java.atm.bankDatabese packs which my java does not support. any one know what java because I'm using the Netbeans.
thank you

Mr.M 89 Future Programmers

Well the very simple way in which I use the most to send files with to someone which are being burnt by the mail server is just add any alphabet at the end of the file type and you file will be sents but then you have to tell that person that he/she had to remove that alphabet you had just added. here is an example: you want to send a file named mygame.exe so you have to do this mygame.exeg then send it tell that person to remove the last g in the file type.

Mr.M 89 Future Programmers

Well I think you have to add or do this as conditions so that for each states process it can update the label with the current process.

To do this I think you will have to add the timer on your project, I know someone may come with another Idea but this is how I use to track things even events. On your button you will have to remove those codes and just enter the code to start the timer so that it can start monitoring or tracking, than on your timer you can enter code to validate your label. Let say you are processing the or you are just reading names and surnames and ages, now let say you will be starting by reading names so you can write a code that will check if the reader has started reading if the reader has started than you can update the label that the first process is now running and then check if the reader has completed reading and also If the reader has completed reading than you can update the label and let say you will say Done proess 1 and then because the first process is done so it has to start the second process of reading surnames if you like you can make it sleep for a while before it start the next process, This is a very fist process if you will let the timer process it for you. you can then go on and on …

Mr.M 89 Future Programmers

Hi DW

Well I'm new in java I'm using Visual Basic the most so now I just decided to cross platforms and start doing java, so there is a project that I'm trying to create in jave (I'm sorry for the namings just in case I don't use the right java word it because I'm new and I'm famillier with VB.Net).

What I want is that I want to create 2 (Forms) I don't know whether you also call it forms in java or not but I want to create 2 forms in one project and what I want is that I want the first form to be the one that will be loaded when the program starts and it will wait for a Control Button Click event once this event happens it will then call or load the 2nd form and the 2nd form must set to always onTop and when I close the second form I want the first form not to close. what I also want is to hide the first form by removing it or hiding it icon on a task bar and on the processes and it also must be invisible. In vb.net I wrote it like this:

Public Class Form1
    ' Handling the key down and Load the 2nd form
    Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
        If My.Computer.Keyboard.CtrlKeyDown Then
            Form2.Show() ' Loading form2
            Form2.Visible = True ' Making it be visible
        End If
    End Sub

    Private Sub …
Mr.M 89 Future Programmers

run in encrypted form

well that is what I'm also having a problem on I tried to crypts mine and it did crypt but the problem was to remove the cryptions so that it can be read easy, you can check on my post and you will see how I wrote mine and where I got problem too.

To answer the question here, you can just simple count your self miliseconds, seconds, minutes, hours, days and you can choose either to count upwards or back wards and then simple refere to it e.g.

Dim Days, Hours, Milisec, Minutes, seconds As Interger

Private Sub Timer1_Tick()

Milisec = Milisec +1
If Milisec = 10 Then
Milisec = 0
seconds = seconds +1
End If

If seconds = 60 Then
seconds = 0
Minutes = Minutes +1
End If

If Minutes = 60 Then
Minutes = 0
Hours = Hours +1
End If

If Hours = 24 Then
Hours = 0
Days = Days +1
End If

If Days = 30 Then
MsgBox("Your trial Has reached and end Please purchase the full version to keep on using this program")
Timer1.stop
End If

End Sub

Hope this will serve you purpose what you need to do is just save this in files and refer to it.

Mr.M 89 Future Programmers

Thank you looking forward to hear from you.

Mr.M 89 Future Programmers

Hi DW

We want to run an experiment in our lab on ATM, we just want to keep it simple and easy, So far I've just created the two forms and since I've discorvered that most of the ATM's are running a Windows OS which I saw it in one garage so I just decided to start this experiment to see if it is really posible to run a Windows Application form project on an ATM but the problem with the ATM is It screen they use a special small screen to secure and they also use the special keyboard so my main question is just two buttens only, on my project I've used

If my.computer.keyboard = CRLDown Then

So what I want is that I want to change the CRLDown because the ATM has Clear, Cansel and Enter here I want to change that to Cansel so the code should be something like:If CanselDown Then but I want it to also have a number like If the Cansel is pressed 5 times in a row with no pause biger then 5 seconds between then I will carry on with my project from there, and also there is a TextBox so because the ATM doesn't have the mouse unless you have open it inside and plug your own so I want it to detect the enter key once I've typed on the textbox then when I press enter I want it to perform the withdrawal task which will …

Mr.M 89 Future Programmers

thanks! this really helped me out:)

now i was wondering, would it be possible to see everything on the display, so it would give: 8×(7+6) = 104 for example, all on the display.

Well you can try this out I think it will answer your question
This is the full code but it just a standard calculator for you to advance this you just need to add some more tricks or methods of doing things.

Public Class Form1
    Dim numb1, numb2 As Integer
    Dim sign As String


    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        TextBox1.Text = TextBox1.Text & "1"
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        TextBox1.Text = TextBox1.Text & "2"
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        TextBox1.Text = TextBox1.Text & "3"
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        TextBox1.Text = TextBox1.Text & "4"
    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
        TextBox1.Text = TextBox1.Text & "5"
    End Sub

    Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
        TextBox1.Text = TextBox1.Text & "6"
    End Sub

    Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
        TextBox1.Text = TextBox1.Text & "7"
    End Sub

    Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
        TextBox1.Text = TextBox1.Text & "8"
    End Sub

    Private Sub Button9_Click(ByVal sender As System.Object, ByVal …
TnTinMN commented: do you really think that that person is still waiting for an answer after 2 years has gone by? -2
Mr.M 89 Future Programmers

In my code in the Form Load handler try this:

Thank you but These codes didn't work not even if I create a new project it just don't function at all so what I've just decided is to create or simple add a new form that will deal with this potion I will be using your first codes that you firstly posted but the problem is with the strickout when the user has just typed a word on a textbox it strick it out so I want it to unstrick it when the user is removing the word from the textbox. Then after that I will use my codes to complete this project.

Mr.M 89 Future Programmers

Thanks

Tinstaafl

You might find this code helpful. It will take whatever text is typed in any textbox and if it equals the text in any of the labels it will strikeout the text in that label:

your code was almost or is what I need but the thing is that when I put that code on this form I'm working with it doesn't do anything but if I create a new project and past them there it works, I thing the problem

1) may be coursed by that I have many labels there which are the question in which when you typing on a textbox you are answering that particular question or

2) it maybe coursed by that these textbox's that are holding this names I've renamed them from their default to my naming which is w(number for that word) e.g. w1 up to w13

and to Reverend Jim

Create a dictionary wher

I can understand everything in your codes but the problem I've discovered is that the Dictionary list is not working or the whole code but only for ditionary part is detected as error it underlines it and says syntax error I thing those codes are for C# or C++ I'm not sure of those Languagies but other codes are fine just the listing words in ditionary I don't know whethere you can write it in VB.net language.

Mr.M 89 Future Programmers

Hi everyone.

There is a program that I'm writing and now I'm stuck here, What I'm doing is the verifier where I have 13 words and these words I've wrote them one each label that means I have 13 labels which are named w(number) e.g. label1 is named w1 and label2 is named w3 up to w13. I also have 10 textbox's which I just didn't name them so I left them in default mode. now the problem is stricking out the relevent label when that word is being typed on any textbox. Here is this these 13 words are words in which I choose the word and write it on the textbox and when the word has been writen to the textbox the word will be stricked out to indicate that the word has been choosed. Here is where I'm stuck, I tried using the Texbox_Change Handler but now I must track these words for 10 textbox's because I may type the word in any textbox but the system must detect it, I also tried using the Timer in which the next codes are wrote in timer.

Here is where I tried this by writing these codes in the one timer but the problem is that it will strick out the word when you typing in the first textbox but when you move on to the next textbox it just flick the strickeout of the next word or it just remove the strickeout from the word typed in textbox1.

Mr.M 89 Future Programmers

I should think the best way is to have everyone log in when they start the program. If you do that then you can easily expand on your idea to associate certain buttons and stuff by user and/or password. If the user does not have permissions to press a certain button then just hide it after logging into the program.

Yeap if those people who are authorised to access that part their password's as well as usernames are stored somewhere then it will be much easy to block those who are not authorised to access that part, Here is how you can do it. On your button before you put the instruction to open that part in which it can be accessed by authorised person only you have to first verify that person's identity who is clicking that button by providing a login screen where if the entered details are for that person who is authorised then he/she can access it or else the system denies the access.

Mr.M 89 Future Programmers

Hi I'm trying to create a website that will be more like this but I want it to have e-commerce to sell out the music. my problem is 1) providing a space where whenever there is new upload it will place it there on that space and also number it automatically, 2) If a user click the song it will display the artist's profile and bellow it will be a track bar with a media player where the song will be playing at and also the button of purchasing this song must be visible at this point. Any one who can help me on this please.

Mr.M 89 Future Programmers

Well I think you just need to simplify it by using the textbox's for each variable you want, e.g. for name there will be a textbox for name as well as for surname. But I've worked it out using the same texbox. meaning there is only one texbox and the user will enter both name and surname than the validation you will just add it or refer it to where you want or to your database.

Imports System.Windows.Forms
Public Class Form1

Dim name, name1, name2, space As String
Dim spacekey As Boolean
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Timer2.Start()
    Timer1.Start()

End Sub

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
    name2 = TextBox1.Text
End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

    If InStr(TextBox1.Text, " ") > 0 Then
        name1 = TextBox1.Text
        TextBox1.Text = ""
        Timer1.Stop()
    End If

    If Keys.Space = Keys.Space = True Then

    Else

    End If


End Sub


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    If name1 = "mlungisi " And name2 = "ndlela" Then 'Note of the space on the variable in name1
        MsgBox("Your information is valid")
        name = name1 & " " & name2
    Else
        MsgBox("Invalid entry")
    End If

    TextBox1.Text = name

End Sub

Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
    name = name1 & " " & name2
    'TextBox1.Text = name
    'If TextBox1.Text = CanSelect = False Then
    'TextBox1.Text …
Mr.M 89 Future Programmers

Hi DW peps.

I've used the following codes to crypt and save files now I want to decrypt it when I'm reading it so that let say I want to check if the saved password matchs the entered password which the saved password is saved on pc drive e.g. Drive D:.

I wont put all of my code but will put the code I used to crypt and save the crypted text in a file.

' ontop you need to import these files.
Imports System
Imports System.Security.Cryptography
Imports System.Collections
Imports System.Text

Private sub BtnRegist_Click()
Dim name As String

        name = CStr(TextBox1.Text)
        Dim sourceBytes1() As Byte = Encoding.ASCII.GetBytes(name)

        ' saving the crypted text.

        Dim encodedBytes1() As Byte
        ' ne will be for name
        Dim ne As String

        encodedBytes1 = EncodeBytes(sourceBytes1)
        ne = (Encoding.ASCII.GetString(encodedBytes1))
        ' writing to a file.
        My.Computer.FileSystem.CreateDirectory("D:\Test")
        My.Computer.FileSystem.WriteAllText("D:\Test\Name.txt", ne, True)

End sub

Private Function EncodeBytes(ByVal sourceBytes() As Byte) As Byte()
        Dim currentPosition As Int16 = 0
        Dim targetBytes(1024) As Byte
        Dim sourceByteLength As Integer = sourceBytes.Length

        ' Create a DES encryptor from this instance to perform encryption.
        Dim cryptoTransform As CryptoAPITransform
        cryptoTransform = CType(desCSP.CreateEncryptor(), CryptoAPITransform)

        ' Retrieve the block size to read the bytes.
        Dim inputBlockSize As Integer = cryptoTransform.InputBlockSize

        ' Retrieve the key handle.
        Dim keyHandle As IntPtr = cryptoTransform.KeyHandle

        ' Retrieve the block size to write the bytes.
        Dim outputBlockSize As Integer = cryptoTransform.OutputBlockSize

        Try
            ' Determine if multiple blocks can be transformed.
            If (cryptoTransform.CanTransformMultipleBlocks) Then
                Dim numBytesRead As Int16 = 0
                While (sourceByteLength - currentPosition …
Mr.M 89 Future Programmers

How can I check if the user is not using a computer for upto 5 minutes if he is not using a computer for 5 minute then perform a task or display something. Let say you were using a computer then you stop for maybe 5 minutes then the system will then display something just like the screen saver which is displayed after sometime a user is not using a computer, but i just want the instruction in vb.net. only how to check the user performance that all. thanks

Mr.M 89 Future Programmers

Thank you so mach for your help thank you I now manage to solve this problem of removing the address on a host file thank you and I will be glad if Tinstaafl you will please show me how to used those codes but thank you the problem has been solved.

Mr.M 89 Future Programmers

Thank you but this error is still showing and I noticed that when you were writing these codes you wrote them on a 3rd Form which is Form3 then I tried and load 3 forms and I copy these codes as they are and pasted them but still Can you use maybe the visual tools mean like the tools or listBox that you will load it from tools maybe I will be able to follow and maybe identify the problem that course this error Please note that I'm new in Vb and I'm just trying my best to understand it. Thank you

Mr.M 89 Future Programmers

Well I just discovered that the Question that I'm asking here is not easy to understand without any example or more explanation this comes as a result that these all solutions are not what I meant and I discovered this on Friday when I was telling one of my friend about this question but if you will read very careful my very first code you will get the picture of what I meant. You all think I want to perform a click on a button but that is what I don't want because I double click the button then code it but what I want is to let say I will use a time and this timer will be waiting or checking that has the button pushed yet. here is the Example of what I want in code.

Private Sub Button1_Click()
Button1.Hide()
End Sub

Private Sub Timer1_Tick()
If Button1.Click = True and Button3.click = True Then
Button2.Show
Else
If Button1.click = true and Button4.click = true Then
Button5.show
End If
End If
End Sub

I want something like this which will watch the clicking of a button. Hope The question is clear and thank you for you help hope you will be able to help me on this.

Mr.M 89 Future Programmers

well for that you will have to do as tinsaafl says but you will change the Label1.Text to that column you want.

Mr.M 89 Future Programmers

Thabk you tinstaafl but there is an error on this line of code.

File.WriteAllLines(FilePath, IPList, Encoding.Default)

the system underline this code

IPList

and says value of type(system.Collections.Generatic.List(OfString) 'cannot be converted to '1-dimmantional array of String.)

and my othere question based on your code I saw that when I make that line of code that is giving me an error and run the application I saw that you used the System drawing and I've never used that before my question is how then do I add Items in the fields and also I want the application to be editable on runtime, mean when the application is running and let say I want to add another Iterm that is not there and the application writes it to the Host file.

Mr.M 89 Future Programmers

Also make the stle be none not sizable .

Mr.M 89 Future Programmers

Ok I think I get you now, you want the keyloger to be invisible but do take keys pressed. Well in that case it so very simple there are 2 ways that I know you can do that. The first way is to make your program be ontop most and then make it be invisible by clicking the form(s) and go to properties then on the forecolor choose Trnansparent then on the BackColor also choose Transparent or Black color But black color do show a form incase it not responding so I prefere you use the Transparent. Now on your TextBox where you will be using to capture the logs select it and go to Properties make it be invisible then all the job left now is on the timer that you will be using to regord the pressed keys this has to record the selected key at the right time. You can also make the program be invisible but make sure the timer that will be recording the pressed keys is started on Form Load then now all matters for you keyloger to record the pressed keys is that it has to be running it dosn't metter whether it visible or invisible. If you still have a problem please post that potion of code you have a problem on so that I and other members will be able to help you.

Mr.M 89 Future Programmers

Jea I know That I will try my best then see how far I go but as I said I tried and I faild to connect the two.

Mr.M 89 Future Programmers

Hey peps

I've just used this code to block a website

Imports System.IO
Public Class Form1
    Dim path As String
    Dim sw As StreamWriter
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        path = "C:\Windows\System32\drivers\etc\hosts"
        sw = New StreamWriter(path, True)
        Dim Block As String = "\n 127.0.0.1 www.youporn.com"
        sw.Write(Block)
        sw.Close()
        MsgBox("Site has been registered to system to be blocked", MsgBoxStyle.Information, Application.ProductName)
    End Sub
End Class

how can I read the hosts file and remove the address that I've just registered because I can not delete the Host file like this.

  My.Computer.FileSystem.DeleteFile("C:\Windows\System32\drivers\etc\hosts")

I want to read it inside and only remove the name I've just entered without interfearing with other names writen inside this file.

Mr.M 89 Future Programmers

Hi I' haven't started this project yet so I'm just doing a research on how to modify a file on a server side via a client side.

Just to enlighten what is my question.

I want to create a server which will create:
1) the File (as a Directory) of each and every connected client and
2) if I had selected the client side I want from the connected list and click Do button
I want it to look for the correct selected client direcotry file and inside that directory file it will write a 3 files named placed, time and ready
and then
3) it will check if the file named free is writen to a file of each connected client if this file is placed the the state next to that connected client it will write free if the file is beasy then the state next to it on the server application will say not available.

The Client will then do this:
1) Check if the placed and ready and beasy files exist if not it will hide the password and username textboxs but it it exist then it will show the Username and password textboxs and the login and cancel buttons.
2) it will read the file name time to start counting down from the value that is inside the file and if the time equal to 0 then it will:
a) Remove the 3 files or delete the …

Mr.M 89 Future Programmers

I'm not so sure with your question but I think what you asking is to include a password on your code to protect it. well you can try this.

Dim password As String
password = "your password here"

' Now we are checking if the entered password do match
' With the main password or Admin password.

If txtpassword.Text = "your password here" Then
' The password is correct now you can do whatever you
' Want to do when the password entered is correct.

Else

 MsgBox("Incorrect password")
 txtpassword.Text = ""

 End if

You will put this code in the button that you will be using to login.

Mr.M 89 Future Programmers

So tinstaafl how will I go about doing that do I have to call it as.

Private Sub Button1.PerformClick();

or Do I have to put it under the timer control or I have to change the

Private Sub Button1.Click()

to that line of code?

Mr.M 89 Future Programmers

but how can I? I want to pass this if it happens so that i can call the actions when this has been happened.

Mr.M 89 Future Programmers

I want to call the button events. here is the similarity of what I want.

NB the following code is not working it just the sample to show what I want the code to look like.

if Button1.Clicked = True Then
' Do my thing
End If

So my problem is to call the Click handler. I don't want this please.

Private Sub Button1_Click(ByVal............)................Click

End Sub

Hope my Question is clear.

Mr.M 89 Future Programmers

Well according to your title you want to make the keyloger be invisible and if I take a look at your code it like you want it to be invisible when a certain key(s) is/are pressed. so there are many ways to make a program be invisible. first if you were asking on just making it invisible when you running it you just need to enter this code on Form load.

Me.Visible = False()

or if you want to make it be invisible when you have pressed a certain key then your code should look like this.

If certainkeypressed Then
Me.Visible = False()
Else
' If the key has not been pressed yet keep on being visible
Me.Visible = True()
End If
End If

That it and I'm sure you can see that you will have to change the certainkeypressed to that key you want. Hope this answered your Question.

Mr.M 89 Future Programmers

The simple way is to just count the total datetime then add it on a CountDownBox on properties then you will need to trace the shutdown events so that even if you close the program but it will keep a record of the last count before it shutdown so when you re-run it, it will then read the time from the disc. but let me first show you how I done this all. let say you want to count the 24Hours so if your timer will fire in minutes (1000) interval then here is how you count it. We know that you will be using the minutes so you start from 1000 x 60 x 24 = 1440000 so you will put the 1440000 to the properties of the CountDownBox then on your timer interval should be 1000 not 100 unless you counted from 100 not 1000 and your timer code will be like this

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
CountDownBox.Text = CountDownBox.Text - 1
If CountDownBox.text = 0 Then
Timer1.stop()
Else
' Do Nothing ather then Counting down
CountDownBox.Text = CountDownBox.Text - 1
End If
End Sub

then you have to track the shutdown events so that when you have close and rerun it wont start over and over again when ever you re-run the program. Hope I answered your Question.