Mr.M 89 Future Programmers

If your question has been answered please mark it answered. Thank you.

Mr.M 89 Future Programmers

Wait, where do you select the item that is populated to a ListBox? Your details is not providing enough information, I don't understand of your components. Please clarify that and I can help you with your problem.

Mr.M 89 Future Programmers

Thanks but I've already solved this problem by using the SQL statements.

Mr.M 89 Future Programmers

We only help you when you stuck with an error or method in your code or project. You need to show us your effort on this assignment and tell us where you stuck, we want you to be the best programmer not by getting high marks but by being able to understand how problems are solve so it we do for you your assignments you won't know how to solve it so write some code as per your teacher told you and if you get stuck then you can post your codes with comments and also clearly state your problem if it an error please do post the error message so that the members can help you solve the problem. Remember we don't do you homework but we help you when you stuck.

Mr.M 89 Future Programmers

Well I've managed to solve this problem. Thank you for your participation

Mr.M 89 Future Programmers

Thanks but how do I locate my database. Let say I've added the database as resources or is located within the project file under the bin directory. Also there a quite a number of codes which are not supported bu ASPX that are on your post such as ConnectionError. And also I don't understand the str where does it come from or I have to declare it, if I declare it I should declare as what? String or?

Mr.M 89 Future Programmers

Thanks to everyone who tried helping me in this problem. I've just solved this problem. On the Master page I added the If Session("d") isNot Nothing line of code under the Else and it solved the problem.

Mr.M 89 Future Programmers

Thanks but that method of changing the manifest didn't work, the program still produce the same error which is access denied tried all those manifest from requireAdmin, to highestAvailable but still the program can't delete the file it produce the access denied error. Also my manifest I got it under Application properties under the Application tap and I clicked View Windows Setting then I got my manifest. Is there anything I'm doing wrong here? Because I figured instead of skipping I have to check or read the contained files because I want to make sure the files listed on my text file are removed from a computer if found.

Mr.M 89 Future Programmers

Hi Dw

I want to read a text file line by line and refer to those lines, meaning the text file will have 1 word per line and these words are the names which will be used by a scanner to check if there are any files named as these words on a system and if the file is found be removed, the main part that I want is to read the text file line by line and use each word to check if there is a file named like that or there is a file with that name.

The text file will contain many lines.

Anyone know how can I do this?
Thank you

Mr.M 89 Future Programmers

Thanks and sorry to take too long to reply I just tried now your code and it produced an access denied error it I select a folder from the ListBox items and also it failed to copy the normal file, I'm not sure that failure in copying is done by that I have 2 forms the first form is the form where there is a listbox and all the items are populated at and now once you select the item from the listbox it that ask you if you would like to retrieve files or not if you click yes then it show form2 which is where you supply the credentials you used earlier and it the credentials are correct that it that form that tries to copy the selected files but not after supplying the correct credentials it act as if it did copy the file and produce a message that the files has been copied while there is no file on the Desktop. Any idea why it fail? Also I think the problem can be with this piece of code "& "\" & d.Name, True" because previously on my code instead of that code I used this " & "\" & System.IO.Path.GetFileName(f + Form1.ListBox1.SelectedItem)" and it was copying but only copy the files that are for instance it will only copy files in "C:/test" but it will populate the files in "C:/test/just" but it won't find these items that are located in the "just" folder for retrieval but …

Mr.M 89 Future Programmers

Thank you. Please see may post for the problem that I'm facing. www.daniweb.com/software-development/vbnet/threads/475675/how-to-enable-the-button-in-aspx-in-vb.net

Mr.M 89 Future Programmers

Hi Dw

I've create an ASP.NET web app using VB.NET and now I want to connect an access database to it so that it can save data, and also read data from it, I've added the database as resources but I'm not sure if this is appropriate and I haven't wrote any code for linking it because I didn't want to mess with it at this time because the due date is thursday which is tomorrow. Any help, references will be appreciated thank you

Mr.M 89 Future Programmers

Hi Dw

I've created some few ASP using Visual Basic .Net and the files when I publish it (exporting from IDE to a folder) are in .aspx format and the problem is that I didn't find the hosting that support this kind of format they support .asp so my question is that where can I get a hosting that support this if anyone know one preferable South Africa because I'm running out of time so we need a host that we will deposit and reflect immediately. Also another question is that is there any way to reload the master page when you change pages meaning when you move from home to service the master page reload as its load the service page. Thank you

Mr.M 89 Future Programmers

The problem is that the master page only loads once so even you load another page but the master page will not load again so I need maybe a way to reload the master page when changing the pages or perhaps refresh it so that it will re-execute the Form_Load() codes then I'm pretty sure it will do what I want it to do.

Mr.M 89 Future Programmers

Thanks williamwalker but I wanted to create it without the Ozeki but guess I will just try the other way other than the use of Ozeki.

Mr.M 89 Future Programmers

Check these out. https://www.interspire.com/support/kb/questions/1011/HTML+Examples+%233%3A+How+To+Do+An+Image+Swap

www.dynamicdrive.com/forums/showthread.php?63552-Image-Change-using-mouseover

And a very nice example here: reference.sitepoint.com/html/event-attributes/onmouseover

helplogger.blogspot.nl/2012/05/create-rollover-image-effect-change.html?m=1

Hope you will get what you want here.

Mr.M 89 Future Programmers

Well what I think you can do is count the withdrawals made and for each withdrawal add a date because your interest seems as if it not a static so when you add the date that will be easy to track the withdrawal made.

Mr.M 89 Future Programmers

Nice one. Well said. Power to you.

Mr.M 89 Future Programmers

Please add comments to you codes and repost the code with comments which start what each line does so that it will be easy for us to follow and see where you stuck and help you because so far I don't get straight what you want to achieve even though I get a little bit when you try to explain but you just get me lost other than before when you start adding the numbers, I'm really not clear what exactly you want. What I think you are trying is to determine a passed month and subtract 1 from 12 which is 12 months each and every time the month ends up to 12 month Right? If I'm correct now is you time to explain about the $ what exactly you want to do with it and which variable holds which $ value on your code. Please explain that I'm sure once you have done that it will be easy for us to help you.

Mr.M 89 Future Programmers

You didn't specify where or how much is the income so you can't calculate something which is null, what you need to do is as cgeier has said and also make sure to be clear on every part you will use for calculation but what you have said so far is the calculation just that you need to change otherwise to Else, also identify or specify where and how much will be the income, you can link the income using TextBox so that you can type it on the textbox, I would also like to help you on this.

Mr.M 89 Future Programmers

What the formula for that?

Mr.M 89 Future Programmers

Hi Dw

Well I know this kind of question has been asked over and over again but with not straight to the point question, so since I'm also creating a program that require it I've decided to break this down and ask a straight to the point question to get an idea of how it is done. How can I detect a program that is coping a file or performing coping task of files using the heuristic
analysis, meaning in VB.NET how can I detect a program that is performing a file copying task. The examples will guide me and also give me and others the idea of how to detect a program's behavior and flag it or notify of such a program and most importantly gets it location.

Thank you.

Mr.M 89 Future Programmers

Try this on the page not on the css. I will give you the complete code I used.

<Img border=“0" id="img1" src="your location for the primary image" height="30" width="100" alt="Name of your image" onMouseOver="FP_swapImg(1,0,/id/'img1',/url/'"your location for the image you want to replace the current image"')" onMouseOut="FP_swapImg(0,0,/id/'img1',/url/'"your location for the image you want to display when the mouse move off the image"')>

Note that where I putted '""' you will leave the ' and replace the " with the location and also that is the code I used on my menu so if you are working with a big image you can adjust the size using the height and width.

Hope this will help you. Sorry for not formating the codes I'm using mobile

Mr.M 89 Future Programmers

I can't find the path even if I point the DOS to Drive f:/ where my phone is at but the command prompt says can't find the path. Any help?

Mr.M 89 Future Programmers

What I think is that move all the calculation above the "line 31. Dim row As String
() = New String()" because what I see is that before you calculate the BegValue you add everything to a database and the just below or after you added things to the database you then calculate the BagValue so as you save it, it has the Cost values so to get the correct results also try to remove this assign BegValue = Cost just use cost straight there because you used twice begvalue and only use it here:" line 42. BegValue =
EndValue" and see.

Mr.M 89 Future Programmers

Yes I've traced the Session and what it does is save the age and I've referred to it earlier before I even face this problem and it was giving me the correct age. I tried adding another master page but I removed it because I didn't want to get too confused because I had to keep a session because if the session is nothing then the user is transferred to a page where the session will be generated. Thanks for the like but now how can I write this: Button1.Visible = True using the FindControl on the link you provided?

Thanks again.

Mr.M 89 Future Programmers

Hi Dw

I'm creating a web app for my future use and now I'm having a problem in calling a button to enable it. The web app start with Default.aspx and that where a user had to fill in 3 text boxs and click a button. So I've removed the default menu buttons and now I've added 5 buttons on a Site.Master page so that the buttons will be visible to all pages so the problem start here because I don't want the Default.aspx page to have these buttons because a user has to confirm first so there should be just one button on a Default button which is named "I ACCEPT TERMS OF USE" which I've added straight to the Default.aspx page, I've decide to use the Session() so that I can try to track if the user has confirmed or not, I've added the Session("d") = TextBox3.Text

"d" is for date which is calculated from the info entered by the user. So if the user is over 18 years which is Uryear = TextBox3.Text - Year(Now)
So if the user is over 18 then I record the session with the total or the age of the user in a negative form (-00) so on the Master page I've added the code to check if the session("d") has something or not and if its empty then I hide the 5 buttons which named by default from Button1 to Button5 which are on the master page and it seems …

Mr.M 89 Future Programmers

That's exactly what I'm trying to do to get as many 200s as possible and if for example the user choose to withdraw 1500 its can get up to seven 200s and one 100 to make up the 1500 and just incase the 200s are not available it can then move on maybe to use the 100s to make up the total. So how can I do this in codes.

Thank you

Mr.M 89 Future Programmers

Hi Dw

I've recently created an application in java on this post:www.daniweb.com/software-development/java/threads/458306/how-to-work-with-jpos and now I just want to improve this by enabling a feature of mixing the cash notes when dispensing the required amount. The machine has these bills notes: 10, 20, 50, 100, and 200 so now what I want let say a user chosen to withdrawal 4000 the program can mix all the bill notes to form the required amount, should there be any un-available bill note the program uses another bill notes let say it was suppose to make 100 with 10 which is 10x10 bill notes and now there are no more 10 on the ATM the program should then skip and uses 20 to form 100 which will be 20x5 and also use the 50, 100, 200 to make up to total of 4000 amount.

I have no clue nor idea on how to start this, a recommendation and assistance will be appreciated.

Thanks

Mr.M 89 Future Programmers

Hi Dw

There is a program that I'm doing and what it does is move a chosen file/folder to a folder on drive "C:\test" and I have a list box that only display the files name inside the Test folder and when the user click the file name on a listbox its then copies the selected file to Desktop but I have 2 problem:
1) The folders can be moved in to the test directory but I don't know how to make the folder name(s) that are inside the test file be displayed on a listbox but without the path it has to be only the folder(s) name.

2) The listbox displays every file but not folders that are inside the test folder even if the file is inside another folder inside the test file the file is displayed but here it come a problem: let say inside the test folder I have another file called 123 and inside the 123 folder I have a file maybe named test.txt the test.txt will be shown on the listbox but when I click it to download it the error is produced and the reason for the error is that I coded it like this:

Dim downld As String = "C:\test\" + ListBox1.SelectedItem
IO.File.Copy(downld, My.Computer.FileSystem.SpecialDirectories.Desktop & "\" & System.IO.Path.GetFileName(downld), True)

Now the problem as you can see is that I can only or I only pointed it to look inside the known directory which is "C:\test" but I can't point it …

Mr.M 89 Future Programmers

Can you guide me step by step please on loading the manifest and also applying those levels? Thanks you.

Mr.M 89 Future Programmers

I'm have one account on my Laptop and I'm the Administrator, and also how can I make that in vb.net? Meaning running it as admin.

Mr.M 89 Future Programmers

Sorry to take long to reply I had a problem in accessing internet. I'm scanning with these codes below:

Dim Fl1 As string
Fl1 = Directory.GetFiles("C:\", "*.dav", SearchOption.AllDirectories.GetHashCode)
For Each FileName As String In Fl1
    ListBox1.Items.Add(FileName)
    IO.File.Delete(FileName)
    ' But for the above IO in some other fields I will make it be the user who confirm the removal due to sometimes false detection but that will apply when I'm using the Hex.
Next

That's the code I use to scan for the file at the moment but to scan the Folders meaning to detect the folders I think I have to edit this:

Fl1 = Directory.GetFiles()

To something like:

Fl1 = Directory.GetDirectories()

But when I try that it gave me an error it was saying can't convert from a 1 something array to string.

Mr.M 89 Future Programmers

Hi Dw

I'm doing a scanning program and now the problem is that there are some files and folders which the program can't access because of access denial and it just produce an error and don't continue with the scan so now I want to know how can I skip the access denied files and folders to scan all files in a computer?

Thank you.

Mr.M 89 Future Programmers

I've just managed to solve this problem by playing around with loop.

Dim y As Long

For y = 1930 To Year(Now)
DropDownList13.Items.Add(y)
Next

Mr.M 89 Future Programmers

Hi Dw

I'm create an application that register a user and now because we accept even oldest people we have to include their years in a dropdownbox so I'm not sure if this is possible but I do think it is possible it just that I don't have a clue how to start it, I want on form load the form count(not just counting but add the years starting let say from 1930 to current year automatically and add starting from 1930 to date to a dropdownbox so that a user can be able to select his/her year of birth) because typing each year manually on the codes will produce a long codes and not to mention the time it will take to complete. Anyone has an idea on how I can achieve this or references will be appreciated.

Mr.M 89 Future Programmers

Hi Dw

I'm creating a registration page and log in page. I'm just planing on saving the data that the client will supply on the registration page and the log in page retrieve data which consist of password and username from the database to verify if the user is registered or not. Any one who can help me in this or reference will be appreciated.

Mr.M 89 Future Programmers

What I want is to get the hidden file like this:
If My.Computer.FileSystems.DirectoryExist(Dir("C:\test",VbHidden)) Then

MsgBox("Folder exist")
Else
MsgBox("No folder")
End If

But I'm using this code to get the files but it says Access Denied

Dim fFile() As String
fFile = Directory.GetDirectories("C:\", "test", SearchOption.AllDirectories.GetHashCode)

For Each FileName As String In fFile
Msg("File exist")
Next

So the last above code is the code I'm using and I can get the files with it but it fails to get the hidden directories. Sorry for not formating the codes I'm using a mobile phone.

Mr.M 89 Future Programmers

Hi Dw

I'm creating a program which I want to check if the normal and also a hidden folders exist or not and if exist delete it.

Mr.M 89 Future Programmers

How can I access the registry and also how can I change the permissions?

Mr.M 89 Future Programmers

Thanks but all the codes didn't disable the Autoplay (Autorun) I restarted the computer after executing the codes but when I plugged the USB it Autoplay it but if I do it manually and plugged the USB it doesn't play it automatically. The OS is Win7 that I'm using.

Mr.M 89 Future Programmers

Hi Dw

Is it possible to disable the autorun or autoplay feature on windows using VB.NET, I want to disable this feature automatically if it is enabled on a computer.

Any suggestion is welcome.

Thank you.

Mr.M 89 Future Programmers

No that was to show how to start and it was just a sample he could change from creating a file and go with Setting, I was just showing him because he's seem to be lost.

Mr.M 89 Future Programmers

I'm not sure and clear on what exactly you want but no offense but it sound more like you want to do something else here. What the main purpose of trigging the client? Is the program that will trigger the client will be installed on a clients computer or remotely?

Mr.M 89 Future Programmers

This is so very simple. On your Main form on it Form_Load try this.

Dim firsttime As String = "done"
' Check from file if the file exist or not, if the file
' Exist that means the program is not running the first time
If My.Computer.FileSystem.FileExist("C:\firsttime.txt")
Then
Me.show()
Else
My.computer.FileSystem.WriteAllText("C:\firsttime.txt", firsttime, True)
Me.Hide()
'Call the form2 as Setting form
Form2.show()
End If

Mr.M 89 Future Programmers

Jea I'm currently having problems with selecting the Mark Question Solved button on a mobile it just refreshes the page so I will mark all my solved questions using a desktop. I think I should forward all the problems I'm experiencing with Daniweb on a mobile to administrator but I don't know how to reach them.

Mr.M 89 Future Programmers

Ok thank you. I've already used the WebBrowser to view the files and it did the way I wanted it to, it shows the file names, Date modified, Type of file, and lastly size of each file. But thanks again for your help. ;-)

Mr.M 89 Future Programmers

Hi Dw

I have folder which has all the files and the folder can have as much files inside as possible so I have created the function which gets all the files inside this folder and populate it on a listbox so now the problem is that it shows with the path to the file on the listbox which is what I want to get rid off. Here is my function code:

Public Function Scan()
Dim ScanFolder() As String
ScanFolder = Directory.GetFiles("C:\examplefolder\", "." , SearchOption.AllDirectories.GetHashCode)

For Each dFile As String In ScanFolder
ListBox1.Items.Add(dFile)

Next

End Function

So the above code displays the full path to the folder but what I want is to display only the names only. Anyone how can help me in this. Thank you.

Sorry for not formatting the codes I'm using a mobile.

Mr.M 89 Future Programmers

Thanks now the problem has been solved.

Mr.M 89 Future Programmers

Ok Now I get what you'll saying that I should specify the name of the file when it is copied now the problem is how can I keep the same name or original name as from source where the user chosen the file from? E.g if the file is located in Desktop for instance and the file name is test1.txt and the user browse to this file and select it to copy it to C:\example how to keep the same name test1.txt to the destination? Keep in mind that the path to the file will only be determined when the user Browse to the file so I can't write manual the path to the file because I don't know where the user will browse to for files to copy to the folder example.