|
Hi everybody
Please can you tell me the methode allows to check if a file is existing in a directory "X"
if it is then its ok if not
i want to create it with some statements in
please if you know write me the code & explain as much as you can
thank you
try to be good if you can't be the best
|
|
|
|
|
You could do something like this example
Dim fs As System.IO.FileStream
Dim scrFile As System.IO.StreamWriter
strFileName = "some path and filename"
If Not IO.File.Exists(strFileName) Then
fs = New System.IO.FileStream(strFileName, IO.FileMode.OpenOrCreate, IO.FileAccess.Write)
else
'Just open file here
Endif
code is posted "as is" an is just an example.
You could check out the IO namespace
http://msdn2.microsoft.com/en-us/library/system.io.aspx[^]
http://msdn2.microsoft.com/en-us/library/system.io.filestream.aspx[^]
this will properly give you a good idea which statements you need
It's my opinion that nothing is impossible, it's "just" at matter of enough knowledge, time and money.
|
|
|
|
|
Hi to everyone, Well i have some saves created by my appication!!When my application is open i go file open open and my save it's opens!!!Now my problem is when i try to open this save with right click and "open with" it doesn't opens my application!!!My problem is that i want this saves to be opened by an other application and displays me my first application with the saved values!!!!
Does anyone knows how can i do that!!!
I try to made it with "Shell()" and "sendkeys" but i made nothing!!!
Thanks for ur time.....
giotis
|
|
|
|
|
%SystemRoot%\Explorer.exe /e,/idlist,%I,%L
we can send this command to explore.exe to open specific folder through double clicking in folder .
or after doubleclicking in folder, window send this command to explorer
similarly i want to receive parameters in my program. how can i do it?
please help me..
|
|
|
|
|
Hu ,
please i have an application in vb.net
i wanna recuperate some data from the database but somefields there are empty then when i get them in the textboxes they gave errors do you have a solution ?
try to be good if you can't be the best
|
|
|
|
|
Mohammed Amine wrote: somefields there are empty then when i get them in the textboxes they gave errors do you have a solution ?
What do you mean by "empty"? Do you mean it is an empty string? Or do you mean it is a null value?
What error message do you get?
"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
|
|
|
|
|
i meant a null value , when you have a null value in a field in the database & you try to get this field to your application in a textbox it dosen't want to
try to be good if you can't be the best
|
|
|
|
|
Then check if it is null before attempting to populate the text box. A null from the database will be a System.DBNull.Value
"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
|
|
|
|
|
with the try catch isn't it man ??
thank you thank you very much
try to be good if you can't be the best
|
|
|
|
|
Hi ,
please i wanna ask something abt access i wanna call a procedure or a request of access from vb.net using the objcmd & adatpter & ...
please if you know how tell me
thnx
try to be good if you can't be the best
|
|
|
|
|
hello,every one
i want ask about how i can convert the pixels of any image into 3RD pixel
thank alot;)
noor al-huda
|
|
|
|
|
I think that you have to explain what you mean. What is a "3RD pixel"?
I tried searching the web for "3RD pixel", but obviously all I found was a lot of "3rd pixel", e.g. in the meaning of "third pixel".
---
b { font-weight: normal; }
|
|
|
|
|
Dear Friends,
I have a problem updating the record in sql database table because of relationship, i mean i want to update the data as per the relationship can i know the relation between two table at the run time by which i update the data in sequential manner.
for eg.
i have two table 1)Employees and 2)EmployeeTerritories in NorthWind Database
in which Employees is Primary key table and EmployeeTerritories is foreign key table both are related to each other by EmployeeID
if i want to update the data i have to update first in Primary key table (Employees)after that it update to foreign key table (EmployeeTerritories) but i want it at run time can any one know how can i do this....
Thanks in advanced
Sasmi
|
|
|
|
|
Hello There
My application contains a toolbar and it was working fine until I added 4 more buttons and 4 more images in imagelist. then I assigned them to new buttons. this work fines in the application. but when I deploy the application the icons for newly added button does not appear. can any one help me what is going on ?
Best Regards
Rizwan Bashir
|
|
|
|
|
Got my self a stupid solution. may be this will help others
I changed the Form color and compiled it on release and then changed the color back and compiled it. and it started working. How ??? I dont know !!!!
if any one knows the theory behind this .. would be lot help ful for me
Regards
Rizwan Bashir
|
|
|
|
|
how to to set a Map Property with GOOGLE Map.
Plz guide me.
|
|
|
|
|
Sir,
In the label control , i want make the text moving in upward direction like scrolling at run time and the text lines are continuously moving upward.The process should continue until the application is exited.
Thanks and Regards
Amaneet Brar
|
|
|
|
|
hello friends,
plz guide me so that i am able to find a file in a directory.
Is there any ready made API or dll?
Currently i search file as follows--
first of al i get a number of files in a directory .
then using a for loop, i check every file .
plz reply
Rahul here
|
|
|
|
|
The following will give you all files with the extension 'dll':
Dim di as System.IO.DirectoryInfo = new System.IO.DirectoryInfo(myPath)
Dim fi as FileInfo() = di.GetFiles("*.dll")
You can search by any pattern you like.
You can also use File.Exists to check whether a specific file exists.
|
|
|
|
|
Thank You!!!
Rahul here
|
|
|
|
|
I have make a form (bollon) just have the same function and appearence of new email arrive in Outlook 2003.
It shows very nice, but it take the focus when I show the ballon.
How can I show it but without take the focus?
Thank you!
|
|
|
|
|
Are you using VB.Net?
If so, you can use Form.SendToBack() Method Just after
Form.Show()
Make sure TopMost property of the form is set to false and you dont use Form.ShowDialog()
|
|
|
|
|
Sorry, My situation is,
Show the box topmost, but doesn't take the focus from main form.
|
|
|
|
|
Good then, what you can do is
Dim frmChild As New ChildForm
fr.Show()
Me.Activate()
PS: You can't use ShowDialog
|
|
|
|
|
please how can read data in lines from textpad and view them in the listview
start the code from browsing until fill the listview
nice day
amarni
|
|
|
|