|
please while i am reading from txt file
i faced some problems please help
dim i as io.streamfile
dim t as io.file
i=t.open("c:")
while t.read
listview.add(t.readline)
end while
the code is similar to this
but the problem is when he type any row he missed the first char so that this is wrong
please help me how can i solve this problem as type all of the string
when i try to print "amarni"he types "marni"
Amarni
|
|
|
|
|
Amarni wrote: io.streamfile
Does not exist.
Amarni wrote: the code is similar to this
You should always post the actual code - It makes it much more difficult for people to help you when you post "similar" code.
Amarni wrote: the problem is when he type any row he missed the first char so that this is wrong
The While t.Read is likely wrong but since it does not match any valid method signature on FileStream (which is what I can only assume you meant my streamfile above) I can't tell. You should always post the actual code you are using.
Also FileStream does not have a ReadLine method so this code should not even compile. You should always post the actual code you are using.
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
so that tell me the code that i could read from txt file
Amarni
|
|
|
|
|
Post YOUR code so we can see what the problem is.
If you don't do this then we cannot help you.
...Steve
1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once
|
|
|
|
|
then what should i do
Amarni
|
|
|
|
|
After you've posted your code, you sit back and wait for somebody to (hopefully) reply.
This is pretty simple.
1) Copy the code you have written by highlighting it and pressing Ctrl+C
2) Paste it into a reply using Ctrl+V
3) Sit back and wait (Could be anywhere between 1 second and 1 year)
4) Read reply
5) Thank respondant
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
-- modified at 5:00 Thursday 18th May, 2006
|
|
|
|
|
Well you could go for a walk, wash the dog, polish the dolphin, have a good meal, or perhaps post your code?
Maybe - just maybe - someone will then look at it and see where you need to modify the code so it will work. Posting nothing will get you the same in return.
Since you are a newbie, you may not realize that the forum members are not blessed with telepathy so do yourself and us a favour - provide sufficient information for us to help.
...Steve
1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once
|
|
|
|
|
Best Regards,
Apurva Kaushal
|
|
|
|
|
Can any body please tell me difference in early and late binding (in VB6) along with example or link.
|
|
|
|
|
Basically: with early binding the compiler knows the type of object at compile time. With late binding, the type of object is only known at runtime.
There are cases for using one or the other but my preference would be for early binding where possible because many problems and type-related issues can be sorted out during development. If you late bind, some problems may not be evident until your application is live!
There are many samples of this on the web - including The Code Project. Simply search for them.
In the meantime, very brief samples are shown below...
' Early Binding
' Compiler knows what type x is.
Dim x As Word.Application
Set x = New Word.Application
' Late Binding:
' Only know what type x is at runtime.
Dim x As Object
Set x = CreateObject("Word.Application")
...Steve
1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once
|
|
|
|
|
In addition to what Steve said, I should add that early-binding is much much faster than late-binding and is the only case to select (unless you HAVE TO use late-binding) for example when you don't have compile-time access to the COM...
|
|
|
|
|
I ve added skin in my dotnetnuke project it is uploading correctly but when i want to view that in my site under portal sin and admin skin i am not able to see it.
I need urgent help.
aashutosh tiwari(aashutosh.tiwari@sakasolutions.com)
|
|
|
|
|
I have the below source code:
<webservice(namespace:="http: tempuri.org="" ")=""> _
<webservicebinding(conformsto:=wsiprofiles.basicprofile1_1)> _
<global.microsoft.visualbasic.compilerservices.designergenerated()> _
<policy("servicepolicy")> _ '(or <policy(gettype(usernamepolicy))> _ )
Public Class Service
Inherits System.Web.Services.WebService
<webmethod()> _
Public Function test1() As String
Return "Test1 Function Called"
End Function
<webmethod()> _
Public Function test2() As String
Return "Test2 Function Called"
End Function
End Class 'Service
Now I want to do 2 things:
1. The policy will be only applied for test1 Function, not Function test2()
( some things like that:
<webservice(namespace:="http: tempuri.org="" ")=""> _
<webservicebinding(conformsto:=wsiprofiles.basicprofile1_1)> _
<global.microsoft.visualbasic.compilerservices.designergenerated()> _
Public Class Service
Inherits System.Web.Services.WebService
'The policy will be applied for test1 function
<policy("servicepolicy")> _
<webmethod()> _
Public Function test1() As String
Return "Test1 Function Called"
End Function
'and the policy will not be applied for test2 function
<webmethod()> _
Public Function test2() As String
Return "Test2 Function Called"
End Function
)
2. By using an application the Admin can configure what policy will apply on the web service without rebuild (recompile) the web service.
( The service is deployed on IIS server, and then the admin will use another application to configure that web service)
Thanks in advance!
Hung.
Hung
|
|
|
|
|
I'm a senior student. I'm making graduation report so I need your help!
I have MDI application with MainMenu on FormMain. When runtime i opened a childform,i do something on it and i want to control(enable/disable) some of MenuItem on MainMenu. This is my code:
//////Module/////
Module class......
public sub ControlMenu(Byval mnu as system.windows.forms.form.MenuItem,Byval bool as boolean)
mnu.enable=bool
end sub
........
End class
////////FormMain////
Class FormMain
..declare some var
...
private child as ChildForm
.....
//event MenuItem childform.click()
private sub childform_click(byval sender as object, byval e as ...)Handle childform.click
child =new childform
child.MdiParent=Me
child.show()
end sub
....
End Class
/////ChildForm//////
Class ChildForm
..do something
//set a MenuItem
Me.parent.ControlMenu(NameOfmnuItem,fasle)
//Close child form
Me.close (or Me.hide)
End Class
But I get an error or ControlMenu not declare this show up whenever i move mouse on Me.parent.ControlMenu(NameOfmnuItem,fasle). Everybody help me Plz. Thanks
|
|
|
|
|
Seems like the documentation says that the API call to Logonuser does
not work under the Windows 2000 platform. If I have a username, domain, and password
how do I get a token for impersonation?
Better yet how do I impersonate this username and password if I don't use Logonuser
Thanks
|
|
|
|
|
|
I think I am on the right track. Where do I get a list of what all of these codes mean. I am geeting a failure code of 1314 when I run LogonUser.
Thanks
|
|
|
|
|
|
I figured this out. Whom ever the authenicated user running the application is must have
the "Act on behalf of operating system set" under the local security policy settings. If this
privledge is not set then LOGONUSER Fauls.
|
|
|
|
|
I was wondering if it's possible to embed VB.NET class libaries into Internet Explorer. I'm not using ASP.NET. I've been trying to create a cab file and deploy it that way but the control never seems to register. It works fine on my local machine but when I upload it to a server and try to initiate the object I get the ugly X. Thanks for the help.
|
|
|
|
|
Hi!,
I want to store and build a tree (using the control treeview of windows forms) from database table.
Some people say to me that the table structure is like:
Table Name : TUserStruct
Table Fields of TUserStruct : iNodeParent, vcNodeText
And the functions are recursive.
Please some body do this?, is possible send the code...
Thank you.
gangeles
|
|
|
|
|
Hi everyone,
I'm debugging some code that we just migrated from 1.1 to 2.0 net. I'm running into some .vb code that was working before.
Dim oParamMod As New Reflection.ParameterModifier(2)
oParamMod(0) = True
oParamMod(1) = True
Dim aParamMod() As Reflection.ParameterModifier = {oParamMod}
After I "dim" the oParamMod, I can hover over it and I get the message:
"In order to evaluate an indexed property, the property must be qualified and the arguments must be explicitly supplied by the user."
Similar code is running fine in c# but no vb. Anyone else run into this issue? It's like vb doesn't like the ParameterModifier anymore.
Thanks, Jessica
|
|
|
|
|
I have been trying for couple of days now to send 1 byte of data through the serial port to a processor. I have tried multiple different coding schemes I see the com port. It seems to send it but as far as I can tell nothing.... I am using a usb to serial converter... My system sees it as COM1 no problem I detect when I tell the program to find serial ports. finds it...
This is the code in question
using com1 as io.ports .serialport=
my.computer.ports.openserialport("COM1")
com1.writeline(hex(data1)
end using
This is just a byte of data that I need to send. Then I need to receive the data on the same port.... I am at my wits end.... I have put textboxes in place to monitor portions of the code and set breakpoints and it walking through the code.. no problem... so I am not sure what is going on...
Any ideas....
Scott
|
|
|
|
|
It's possible that your code may be fine.
Try communicating via Windows HyperTerminal first. That way you can verify that your cabling and serial port settings are correct.
|
|
|
|
|
okay.. my hardware through hyperterminal works just fine.... I get a my led to flash... using com1 as my port....
Scott
|
|
|
|