|
|
Ive never seen these used until today. What is the reason someone would use these instead of just opening an exact file by name?
Cleako
|
|
|
|
|
That's old VB6-style stuff that really shouldn't be used in VB.NET.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Well a current app does this and it just assigns random numbers, I guess Im trying to figure out what that is all about.
CleAkO
|
|
|
|
|
Because someone couldn't get out of their VB6 mind set when they wrote it.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
What is the equivalent now though? If they were doing FileOpen(86, whatever) what is the equivalent in 2.0? Actually I dont understand how they were actually doing anything with that file by just opening it.
CleAkO
|
|
|
|
|
All the Stream -based classes under the System.IO namespace[^].
And they were doing anything with the file just by opening it.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I want the coding in Visual Basic to convert the wmv format to mpg format
|
|
|
|
|
Noone is just going to hand you the code, and it's not that easy to write either. There isn't just a couple of lines of code you can paste into your app and your done...
You might want to start by Googling for "VB6 DirectShow" or "VB6 Video Encoding" for some examples...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I am migrating the vb project from vb6.0 to vb.net framework.when i am trying to migrate the api function its showing the error in any the below function.
Declare Function CopyString Lib "kernel32" Alias "lstrcpy" (hdest As Any, hsource As Any) As Long
in this function vb.net dosent support any as keyword.give me some solution for solving the above problem..
pls reply me as soon as possible
|
|
|
|
|
"As Any" was a bad idea in VB6 and there is no need whatsopever for it in VB.Net - instead declare an overloaded version of the function for each of the data types you are going to pass to the API.
|
|
|
|
|
On top of what Duncan posted, CopyString has some SERIOUS limitations on it's use in the .NET Framework. Since an object can be moved at any time, CopyString can be passed invalid addresses unless the objects invloved are pinned in place.
What does this function do that you require the use of CopyString??
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I ahve a rich text box on my form and I want it to, when you add text to it I want the program to dispaly the file size it will be when it is saved (hTM or RTF. i want it to display this on lblfilesize label.
In the end we're all just the same
|
|
|
|
|
About the closest you're going to get, without actually saving the file to do it, is to use the length of the RTF property.
Dim length As Integer = RichTextBox1.Rtf.Length
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
In vb6 exist a function called FileLen, who return the filesize in bytes, i don't know if this function exist in vb.net but i belive what yes.
Cuando salga el sol, no estare aqui...
|
|
|
|
|
Useless if the file was never saved.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi, My Application has a tray exe built in VB.The menu will be automatically refreshed in every second.If the tray menu is kept open, the menu jumps while refreshing. How can i avoid the tray menu from jumping. This problem is only in Windows Vista.
Please help.
Thanks in advance
-Ranjan
|
|
|
|
|
I have made a program and it has a Rich Text Box. I have a button called "TblBtn" and when its clicked I want it to insert text at the cursor location on the Rich Text Box. Using VB 2005. Any advice?
In the end we're all just the same
|
|
|
|
|
You might want to try something like this:
rtb.SelectionStart = 100;
rtb.SelectionLength = 0;
rtb.SelectedText = "text to insert"
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dim stream As FileStream
Dim tmpstr As String
Dim myFileName As String
Dim myFile As System.IO.FileInfo
myFileName = ListBox1.SelectedItem.ToString
tmpstr = path_name & "\" & myFileName
myFile = New System.IO.FileInfo(fileName:=tmpstr)
stream = File.Create(tmpstr)
Dim info As Byte() = New UTF8Encoding(True).GetBytes("hello")
' Add some information to the file.
stream.Write(info, 0, info.Length)
sream.Close()
it's wokin when im going to read "hello".
bt when im goin 2 read the file's content,instead of "hello".
it's nt done...
plzzzz giv me advice wht 2 do?
|
|
|
|
|
Uhhh...This is very confusing. The code you posted doesn't read anything. It writes a string of bytes to a file and that's about it.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
What is path_name at 7th sentens?
|
|
|
|
|
hi. i am trying to read data from usb through vb.net but i am not getting any success. please write to me the code for reading data through usb.plz send reply to <ronaktamboli@gmail.com>
ronak
|
|
|
|
|
That's because you don't read anything from USB. It's a bus, not a port. You read data from the devices attached to the USB bus, but how you do that depends entirely on the device itself and what methods it's driver exposes.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I m using vb.net 2005 & crystal report(bundeled version which comes with .net).
& using Dsn of mysql 5.0 driver for connection on my report to access data.
I wnt to add result from procedure to my report.
Procedure is ready & giving result in mysql but
as i go into database Expert of Report in my application, i cant see the procedure there.
Only add commant & tables of my database shown but how to add procedure to my report .
Anyone please help me.
Thanx.
-- modified at 1:48 Tuesday 20th February, 2007
"The Difficult i can do it now...
The Impossible will take a little longer."
|
|
|
|