|
can u pls give me some example ,
delete file "a.txt"
i need to rename a file rename "b.txt" as "a.txt",
or
overwite "a.txt" with "a.txt"
oFile1.Delete("C:\WINDOWS\Doctors.txt")
System.IO.File.Move("C:\Windows\tempdoc.txt", "C:\Windows\Doctors.txt")
oFile1.Move
-- modified at 5:52 Wednesday 7th June, 2006
|
|
|
|
|
ptr_Electron wrote: can u pls
Can you please use full sentences in the forum, in oppose to SMS Speak.
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
This code works fine for me..
System.IO.File.Move("C:\Windows\tempdoc.txt", "C:\Windows\Doctors1.txt")
'The process cannot access the file because it is being used by another process' can be caused either
a. tempdoc.txt is opened by some other application.
b. tempdoc.txt is still open by your application and failed to close.
|
|
|
|
|
Thanks u My dear Friend
it my mistake!,
I had not closed the file in overlook, and breaking my head from few hours
Thanks a Lot
Have a Nice day!
Bye
Understanding comes form failures
Sucesses comes form Understanding failures
-- modified at 5:59 Wednesday 7th June, 2006
|
|
|
|
|
I need to find out which day does a date belong to,
in
VB. Is there anyway where I could input a date and know the which day it
is or could I know which date is the next Monday from today
bharath.s
|
|
|
|
|
To find day of the week, you may use
WeekdayName(Weekday(Now))
|
|
|
|
|
Hello friends ,
i am creating a file file and adding a structure in that
code--> '''setting_rec_ip==> structure name
Open fileName& ".Tpl" For Random As #1 Len = Len(setting_rec_ip)
Put #1, 1, setting_rec_ip
Close #1
-->
the file has extension .Tpl.
And while openning the file-->
Open fileName For Random As #1 Len = Len(setting_rec_op)
Get #1, 1, setting_rec_op
Close #1
--- the problem is that if any body created a .Tpl file from textpad, that file is also get opened and and cause error!!!!
I want to create a file which has unique Header information.
plz tell me how to create such a file
hoppin best from u!
Thanks in advance!!!
Rahul here
|
|
|
|
|
Hi, I have design my own database application in Ms access with my computer screen resolution of 800 * 600. But when i change my screen resolution to 1024 * 768, I found that my database application control (button, list box...) seem too small and the form border do not fit with the screen anymore. Now I try to find the code to change the form size and control size to fit the screen resolution when I change it. Does anyone has any comment, resource or a sample code?
|
|
|
|
|
Hi Guys,
just getting my head around web custom controls. I am hosting websites and in VS2003, i was able to upload my "controls" for handling contact us and other generic website tools as a webapplication to a website. And then overlay that with the personalised website details as another webapplication. Two .dll would sit there serving the two layers nicely
Now in VS2005, the directory is deleted when you upload a webapplication and the copy option is not tight enough to make sure you are uploading what you need.
SO, i decided to try and set up a webcontrol library, where i thought i could build my basic controls ie contact us, copyright, shopping carts and then easily reuse them across the websites i host.
I have read that the best way to share or reuse controls is custom web controls. I am finding it very diffcult to say the least.
I have used MSDN to copy code for simple web custom controls into a project called webcontrollibrary. This project I am then adding to a solution that has a webapplication there. Some of the basic custom controls will automatically appear to be dragged from the tool bar, more complicated composite controls don't.
I have read about making an assembly via the command prompt and then copying that to the bin folder or adding to the toolbox. But it seems that once added to the toolbox, if i go and update that control and reassemble the assembly, i have to delete from tool box, add back to toolbox and then drag from scratch each of those controls into all of the web applications that use them. Seems very messy?
I am surely missing something really basic. I can see how powerful the web custom controls will be, but managing the sharing and deployment of these controls across the web applications i build has me reticent about getting too far into them.
Thanks guys
David Pretorius
---------------------------
David Pretorius
Precons Corporation Pty Ltd
|
|
|
|
|
hi all
is it possible to create the help files with vb.net wihtout using the 3rd party software or not.
Tasleem Arif
|
|
|
|
|
|
Hey, I'm new to VB.NET (and have no experience programming in VB) - I tried to post earlier but for some reason it didn't work, and the second attempt is never as good as the first!
I'm using Visual Studio 2005 with .NET Framework 2.0.
Anyway, in my project I have a need to call rasapi32.dll, from what I understand I need to use an unmanaged code block in order to make use of this DLL. This is what I have so far:
<br />
Imports System.Runtime.InteropServices<br />
<br />
Public Class TestRASDial<br />
<br />
<DllImport("rasapi32.dll", CharSet:=CharSet.Auto)> _<br />
Public Function RasDial(ByVal LPRASDIALEXTENSIONS, _<br />
ByVal LPCTSTR, _<br />
ByVal LPRASDIALPARAMS, _<br />
ByVal DWORD, _<br />
ByVal LPVOID, ByVal LPHRASCONN) As Long<br />
<br />
End Function<br />
<br />
End Class<br />
Now, I realize this doesn't actually do anything just yet, but I need to get the basics working first. So, the above bit of code gives me the following error:
"System.Runtime.InteropServices.DllImportAttribute' cannot be applied to instance method."
The word "RasDial" is underlined so I'm assuming that's the problem, however, I don't know how else to do this. I've tried searching online but can't seem to find much on the topic for some reason.
I would really appreciate it if any of you are able to help me out and point out what I've done wrong! You'd be a lifesaver...
Thanks a million...
|
|
|
|
|
The function must be shared.
Public Shared Function RasDial(ByVal .... ect.
hope that helps.
|
|
|
|
|
Ahhh yes! That has gotten rid of that error... many thanks!
Now just to figure the rest out...
Thanks so much.
|
|
|
|
|
|
If I have 10 text boxes text1, text2, text3 ... text10 and a "start over" button
I want to be able to click the start over button and have the cursor jump to text2 no matter where it is in the tab sequince.
Start at text1,
(TAB) go to text2
(TAB) go to text3
(TAB) go to text4
(TAB) go to text5
(TAB) go to text6
Push "start over" button
Change text in text2
(TAB) go to text3
Is this possable?
-- modified at 15:20 Tuesday 6th June, 2006
|
|
|
|
|
Try this in the click event of your start over button:
text2.focus()
|
|
|
|
|
Thanks that is what I was looking for.
|
|
|
|
|
My dear friend
for each textbox right click
Select Properties
u will fine TabIndex Property
select Text1 change the TabIndex Property to 1
select Text2 change the TabIndex Property to 2
select Text3 change the TabIndex Property to 3
............
:
:
:
|
|
|
|
|
In my VB.Net 2003 web app I got the ProductName and ProductVersion from the AssemblyInfo.vb with the following code:
With Diagnostics.FileVersionInfo.GetVersionInfo (Reflection.Assembly.GetExecutingAssembly.Location)
lblVersion.Text = .ProductName & " -- Version " & .ProductVersion
End With
These values are Nothing in .Net 2005!
What gives? How do I get the values in .Net 2005?
Thanks...Steve
|
|
|
|
|
Steve,
Works for me here. must be something on your system.
progload
|
|
|
|
|
Does it work in the IDE?
Where is your AssemblyInfo.vb file, in the project folder or in App_Code?
Thanks...Steve
|
|
|
|
|
Steven J. Reed wrote: Does it work in the IDE??
Yes
Steven J. Reed wrote: Where is your AssemblyInfo.vb file, in the project folder or in App_Code?
In the project folder.
|
|
|
|
|
i want to save the text of textbox in a string defined by me. i dont want to access the textbox text by textbox1.Text method. i want to know by which property i can change the by default location of the text. so plz help me as soon as possible
|
|
|
|
|
Your question is hard to understand. Are you just asking how to put text from a textbox into your own string? If so, that looks like this:
Dim myString as String = txtMyTextbox.Text
Then you can manipulate the myString value without changing the text currently in the textbox. Is that what you were asking for?
Or wait...maybe you mean you want to use the textboxes TextChanged Event. When ever the text inside the box changes it fires. It would look something like this:
Private myString as String = ""<br />
<br />
Private Sub txtMyTextbox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtMyTextbox.TextChanged<br />
myString = txtMyTextbox.Text<br />
End Sub
|
|
|
|