|
Hey,
I was developing a program to edit shell icons and I had a reference list of what all the icons each code was for (i.e. 15 = My Computer). Anyway, I noticed that there were a few codes that's values were unknown, like: 14, 41, 42, 45 and 46. What shell icons are these?
And also, I was thinking of creating my own Dll file that holds pre-made shell icons (just like Windows' Shell32.dll). How do I go about compiling a Dll file to hold icons like that?
Thanks allot!
-- modified at 0:57 Saturday 14th October, 2006
|
|
|
|
|
I'm using Microsoft Visual Basic 6.0.
I'm doing my VB project to be handed in to my lecturer.
I have the following code in my VB project:
Open "D:\data.txt" For Input As #1
I want my program to display a messagebox if the file "D:\data.txt" is not found. How to do it?
|
|
|
|
|
This should work:
<br />
If My.Computer.FileSystem.FileExists("D:\data.txt") = True Then<br />
MsgBox("File not found")<br />
End If<br />
|
|
|
|
|
This won't work in VB6.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
First : imports System.IO
Then do this code:
if File.Exists("D:\data.txt") = False then
MessageBox.show("File not found")
End if
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
|
If ( Dir("D:\data.txt") = "" ) Then
MsgBox "Not Found"
End If
|
|
|
|
|
This code work for me. Thank you.
|
|
|
|
|
On Error Resume Next
Open "D:\data.txt" For Input As #1
If Err.Num > 0 Then
' Some kind of error occured opening the file...
Exit Sub
End If
' Continue on with processing the file...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hey,
I am working on a program that will detect the keys that someone hits and having certain functions be called for those certain keys. I have been having trouble with the "enter" button on both Alphabetical and Numerical sides of the keyboard.
This is the code that I'm using:
<br />
If e.KeyChar >= ChrW(48) And e.KeyChar <= ChrW(57) Then<br />
MessageBox.Show(("Form.KeyPress: '" + _<br />
e.KeyChar.ToString() + "' pressed."))<br />
End If<br />
Select Case e.KeyChar<br />
Case "6" '6 (Right) key pressed<br />
Function1()<br />
Case e.Enter '8 (Enter) key pressed<br />
Function2()<br />
Case ChrW(49), ChrW(52), ChrW(55)<br />
MessageBox.Show(("Form.KeyPress: '" + _<br />
e.KeyChar.ToString() + "' consumed."))<br />
e.Handled = True<br />
End Select<br />
The "e.enter" is how the help file showed to do it, but it didn't work. Any ideas on what I'm doing wrong?
Thank you!
|
|
|
|
|
I'm pritty sure your in the KeyPress Event and you'll need to be in the KeyDown Event.
Select Case e.KeyCode<br />
Case Keys.Right<br />
Function1()<br />
Case Keys.Enter<br />
Function2()<br />
Case Else<br />
e.Handled = False<br />
End Select
And so one....
Hope this helps.
|
|
|
|
|
Sorry, but this raises errors.
Thanks anyway though!
|
|
|
|
|
I'm confused on how this would raise errors? If you don't mind explaining, so I don't make the same mistakes again.
|
|
|
|
|
These errors are raised:
KeyCode' is not a member of System.EventArgs
Handled is not a member of System.EventArgs
|
|
|
|
|
AreJay wrote: your in the KeyPress Event and you'll need to be in the KeyDown Event
Private Sub _KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
I've used the code before and tried it again today and it still works.
|
|
|
|
|
My mistake, it works.
Thank you!
|
|
|
|
|
guys another question here... how can i call the video with extension name of .wmv? what i want here is that, when i input a phrase or a word in the textbox, the video that corresponds it will show. and also, i want the videos to store in a database. how can i store the video in the database? its for thesis guys - thanks
|
|
|
|
|
Ok, you asked: < font color="aaaaaa:>what i want here is that, when i input a phrase or a word in the textbox, the video that corresponds it will show.
Are you asking to have a video come up for the path/filename of the video that you type in the textbox?
Please be more clear and I might be able to help.
|
|
|
|
|
most probably yah. when i input word or phrase in the text box, the corresponding video of that word or phrase will show.
|
|
|
|
|
Well, I don't know how to play the video, but you can look here for the code on how to. But here is an example on how to call the video.
<br />
If PhraseBox.Text = PhraseVarible Then<br />
'(Play Video Function)<br />
End If<br />
Sorry I couldn't be musch help.
|
|
|
|
|
well thanks very much!!! it will help a lot
|
|
|
|
|
Hey,
I am designing an app that will download the newest version of my software off my website. But, I want to have a progressbar that will monitor the progress of the download. I have found millions of tutorials but they have all been for VB6, and I'm using VB2005. Does anyone know how I could do this?
Thank you!
|
|
|
|
|
I've been using the OneClick feature within VS 2005 and it's easy and simple to use. I've haven't found a way to customize the downloading splash screens, yet! This will allow you to write your app and publish it to your site and set the application to check for update before it runs. This will make updates a snap.
|
|
|
|
|
Thanks, but that's not the question. I want to know how to get the progress of a download using a Progress Bar.
|
|
|
|
|
The only way you're going to get the progress of a download is if you write the code that is doing the actual download. Without that, you'll only be able to show the 0 and 100% marks since there isn't a component in the ToolBox that does download stuff and gives you progress updates.
Other than that, it's simple math.
Dim Percent As Integer = (BytesTransfered / TotalBytesInFile) * 100
ProgressBar1.Value = Percent
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|