|
Why are you using the substring method? I assume you are looking to take only a part of the actuall string. If that is the case your line str.substring(22,6) tells me to start at position 22 and read the next 6 characters. Does that sound right??
I use the following way to read from a text file
Dim str as string = string.Empty
Dim sr as new StreamReader(filename)
Do while sr.Peak > -1
str = sr.readline
'Do what ever needs to be done with the string.
Loop
|
|
|
|
|
hellow to all
i am looking for a way to put a string into array so that i can slide to anywhere i wana to in the array and pick up letters ..
thxx for anyhelp .
|
|
|
|
|
What i have understood from your question that you want to store the string into array of characters.
For this, function (ToCharArray) is provides already in String Class and u just need to do like this.
Dim str as string = "Khurram"
Dim char() as char = str.ToCharArray()
and u will get array of each character from the string.
|
|
|
|
|
As far as putting it anywhere you want in the array. If you mean take an array and put it in the middle of another array...the easiest way I know of is to make another array and add the elements from both arrays until you have what you want. Array doesn't have an insert..but, arraylist does.
|
|
|
|
|
how can i predefined a path, drive, folder, source, destination, for a user, by using a textbox, a button control and a messagebox . In other words, How can i setup a fixed path for the textbox, before the user types the filename.
Is it possible?
I need some help to setup a textbox with predefined paths. Like the user will type a filename and click find, the find button will start the procedure of finding the files, I have no problem doing that with hard code paths, but I do not know how to do it for any file, so far the way i'm doing it is by typing the paths and filename in my code, but is there any way to do that randomly, how can i look for any file at any time in my predefined locations, instead of just having to type the file name in my code?
|
|
|
|
|
Have you used the system.io class? Use DirectoryInfo class to get the directory you want. Use DirectoryInfo.GetFiles to get the files that are in the directory.
dim dr as New DirectoryInfo("C:\")<br />
dim fl() as FileInfo=dr.GetFiles
these classese provide ways of checking directories and files to make sure they exist.
Also to double check that a location is good you may want to use Split() to split the location into each directory (use the character "\") and use DirectoryInfo.Exists() to ensure that each path exists.
|
|
|
|
|
Can anyone Please show me how to create a text overlay which will display over a full-screen directx capable game.
thanks
|
|
|
|
|
I need to come up with an application that allows dynamic configuration of database connectivity via the Windows ODBC Datasource Administration Interface. How do I call this dialog interface from within a .Net Application.
JRM
|
|
|
|
|
Well I have done this around 5 years back in VB6. So dont have the code but I think that I found the sample code from www.VBCode.com by that time. check there if this helps....
remember one thing.. while coding I made some mistake by that time and it results in my window re-installation.. so be careful while changing the code...
Best of luck...
|
|
|
|
|
hello!
i have to programm a remote desktop app in vb.net (because the whole project is in vb.net) and i don't know how to do so?
does anyone have code or can help me?
it is really urgent!
thanks!
|
|
|
|
|
Reinhard Taucher wrote:
i have to programm a remote desktop app in vb.net (because the whole project is in vb.net) and i don't know how to do so?
That is very vague. Can you be more specific? For example, what do you mean by a "remote desktop app"? Is this an application that will be run through a remote desktop connection? Or do you want to programatically control a remote desktop connection? Or what?
My: Blog | Photos
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
|
Hi
I'm trying to use a .Net User Control in a VB6 Form.
I've created the control, as a class of a class library, adding references to System.Windows.Form. The class inherits from UserControl and implent an interface that is suposed to expose the control's methods to com:
Class declaration:
<guidattribute("8dfe85ee-604a-4350-b4fc-8b6e97cc1a08"), _
classinterface(classinterfacetype.none)=""> _
Public Class UserControl1
Inherits System.Windows.Forms.UserControl
Implements IUserControl1
'Constructor and initialize components
public function doSomething() as string
return "hello"
end function
End Class
' Interface
Imports System.Runtime.InteropServices
<interfacetypeattribute(cominterfacetype.interfaceisiunknown)> _
Public Interface IEJSimple
function doSomething() as string
End Interface
Then i execute de tlbexp and regasm commands and create a new project in visual basic 6 with reference to the tlb generated with tlbexp.
with this code:
Private Sub Form_Load()
Dim o As Object
Set o = Me.Controls.Add("mySolution.UserControl1", "o")
o.Visible = True
End Sub
I can add the control to the VB6 form i'm not able to call the doSomething() method. The error i get is "the object does not admit that property or method(error #438)"
I also tried to add the control to the VB form as follow:
Dim o As mySolution.UserControl1
Set o = Me.Controls.Add("mySolution.UserControl1", "o")
But i get a type missmatch error.
¿What is wrong with this o what i'm forgetting?
Thanks
|
|
|
|
|
Hai..
I need to display the wave signal from MP3 file. Please help me any body have idea. Otherwise give me some related information.
Thanks,
e.veera raghavendra
|
|
|
|
|
|
That will display the wave signal from the wave file. But, i need to display the wave signal from MP3.
Thanks,
e.veera raghavendra
|
|
|
|
|
I am working on a Custom Draw ListView. So far it looks pretty good. I am going off the cade from fotovision from Microsoft. The problem I am having is how to make the listviewitem's bounds bigger to fit the site of the custom drawn item.
Any ideas?
|
|
|
|
|
Figured it out...use a imagelist and set the imagelist image size to the size I need
|
|
|
|
|
Hi All,
I just findout a special button control: AquaButton for .NET for my application. I think it's really cool.
http://www.econtechvn.com/en/aquabutton_detail.htm
But anyone tried this before?
I'm going to buy it and I need your comments.
Thanks,
NicVan
|
|
|
|
|
You're going to buy it - why do you need our comments ? This sounds like an ad to me.
Either way, don't crosspost this crap here, it's not appropriate. Try the lounge if you haven't already and you really want to post this stuff.
$61 for a lousy button ? You must be kidding.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I'll read 512 bytes from a file with loop.Using API function CreateFile() open file and using API function ReadFile read file.generally,the file pointer auto move 512 bytes,but the file pointer not move,always at begin head.How to move file pointer.
|
|
|
|
|
It does move on it's own. How are you reading the file and why are you using the Win32 API to do this?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
hellow to all
i am looking for a tutorial or code on working with graphics in vb .
like building Rectangels and ellipse , filling them and all this stuff ..
where can i find ?
thxx a lot
|
|
|
|
|
VB6 or VB.NET ? msdn.microsoft.com has all the GDI+ docs for VB.NET, and my GDI+ articles translate pretty easily to VB.NET also.
Christian Graus - Microsoft MVP - C++
|
|
|
|