|
Hi all,
I have a MDI names as MainForm and in that MainForm MDI i have a menu item names as File
to the File Menu item i have a form named as 'Employees',
Here in my 'Employees' form i have a button names 'AddEmployes'
Whenever user clicks on 'AddEmployes' Button a form named as 'Employee Details' will opens,
NOW MY PROBLEM IS --When the user selects one employee department of 'Employee Details' Form and selects Save Button of 'Employee Details' Form
data of THE 'Employee Details' Form is saving and the 'Employee Details' Form is CLOSING..
ALL I need is i need to make the Employee details form to be in to the same state allowing the user to select another option..
I've tried in several ways,(taken Dialog box at last) and left with no answer,
I don't want to use DialogBox option,,,
Please help me
Thanks in advance
Prashanth
|
|
|
|
|
I have a program that search for files. I created an access table that include excluded files and file paths. Here are the fields:
ExcludePath: ExcludeFileName:
C:\Windows\Media\recycle.wav recycle.wav
C:\Windows\explorer.exe explorer.exe
C:\Windows\Help\camera.chm camera.chm
I need to know how to check this table to see if the file exist. For example, if the file exist in the db then add ExcludeFileName to listbox2.
jds1207
|
|
|
|
|
File.Exists
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi i want to fetch time frome system with milliseconds in the format of hr:min:s:milliseconds how we can do this
pls tell me if not possible inthis way then tell me some other way in which we can fetch the same or equivalent
with regards
Balagurunathan.B
|
|
|
|
|
|
try this
dim stringDate as string
stringDate = Format(dateValue,"HH:mm:ss")
--dateValue is the given date
--format function returns string
if you want to have a datevalue then try this:
dim newDate as datetime
newDate = Date.Parse(Format(dateValue,"HH:mm:ss"))
--hope this would help!
|
|
|
|
|
yeah, now add .fff to the format string to get fractions of a second.
|
|
|
|
|
I m using Visual Studio 2005. How can I drag and Drop Table From Data Connection Node of Server Explorer to Form. I have done it n Visual Studio 2003. But I m not able to do this in 2005. Does VS 2005 does not support it, or ther s a special method for that.
Thanks in Advance
|
|
|
|
|
Not sure about whole tables. I drag and drop fields from tables and views with no problem...
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
hi
i am doing a project in which creating log files for the users signed on . its automated input process so i will be writing each and every input in log file .
log file is a .txt file i am appening the file using streamwriter
at the same time i am trying with another button to read the file using stram reader or any io.files.readalllines() but its not allowing to read. how i can read the file while some strea writes into it. please any one tell me this. i cannot close the stream each and every time as the process is automated for testing purpose.
with regards
Balagurunathan.B
|
|
|
|
|
What you want to do is impossible. You absolutely need to close the stream, in order to read it.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
but my doubt is if you r opening and editing a word document and on the same time if some other user on network trys to read they can open in read only mode and can read lastly saved one then why can us do the same programatically
thanks
with regards
Balagurunathan.B
|
|
|
|
|
Word handles this by creating a temporary file, which is the file that is opened for editing. Read only mode means it reads the entire file, then closes it, it doesn't keep it open.
Open a Word doc, then look in Windows Explorer, you'll see the temporary file there.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
I beg to differ: whoever creates/opens a file is in control regarding the
operations others can do to the same file.
one can easily share a file between threads and even processes; it suffices
to apply the correct FileShare value when creating/opening the file.
My example shows a first stream writing to a file it allows others to read,
and a second stream reading from same file allowing others everything:
string filename="streamTest.txt";
using(FileStream fw=new FileStream(filename, FileMode.Create,
FileAccess.Write, FileShare.Read)) {
using(StreamWriter tw=new StreamWriter(fw)) {
tw.WriteLine("Created new file");
using(FileStream fr=new FileStream(filename, FileMode.Open,
FileAccess.Read, FileShare.ReadWrite)) {
using(StreamReader tr=new StreamReader(fr)) {
for(int i=0; i<10; i++) {
tw.WriteLine("line "+i);
tw.Flush();
string s=tr.ReadLine();
Console.WriteLine(s);
}
}
}
}
}
BTW the flush is there to undo the buffering that takes place in these streams;
without it there probably would be nothing to read when the short loop
terminates; for longer streams, flushing is not needed ! And normally
the reader should continue to read after the writer has done, my example does not.
PS: sorry for posting a C# example in a VB.NET forum !
|
|
|
|
|
hi Luc Pattyn
but its not working mate
i am appending the string
is it because of that something else
with regards
Balagurunathan.B
|
|
|
|
|
balakpn wrote: not working
please be more specific: if it throws an exception show it; if it runs but
does not produce the expected outcome, please explain.
I did run my example before posting it. Much depends on the FileMode, FileAccess
and FileShare values you use EVERY time the file or filestream gets created/opened.
e.g. the simplest overloads for creatinbg/opening a file (those with default values
for FileShare) would use FileShare.None, disallowing others to touch the file.
|
|
|
|
|
hi
its working fine
i made a minor mistake thts the problem sorry and thanks a lot
with regards
Balagurunathan.B
|
|
|
|
|
|
I am developing ASP.NET Web Application using vb.net One of
the requriement of this application is ...when user submit
the Web Form....it should open the Word Templete and
insert the values into that templete...
Does anybody knows...How to Open and Writes into Word
Document Using ASP.NET and vb.net Directly...i am looking for
specific sample...
Thanks,
|
|
|
|
|
What on earth are you thinking here ?
1 - I told you that ASP.NET isn't going to matter to your solution
2 - I told you what you need in order to do this, all you have to do is google and download it, I'm sure it comes with samples
3 - for all that, I am sure that you're not the first person who wants to do this, there must be countless google hits that will tell you the answer, with code
4 - posting the same question over and over, when the last time you asked is still visible, is just plain annoying, it's not going to leave anyone inclined to answer you any faster.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
OK, well, perhaps you need to write a single, intelligent post that actually outlines what you have done, instead of posting the same vague question over and over ? If what you want to do, occurs on the client side, then it's not going to work in ASP.NET, because the server code is on the server, not on the client.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
One Post is enough.
WHy are you again and again posting the same question.
there itself CG has answered you.
Regards,
Satips.
|
|
|
|
|
Got to love it when instead of taking your advice, they just delete all their posts.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
You're mixing types in a horrible way.
BTW, since tot is an Integer , it cannot store a floating point value.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
so what should i do to store float numbers
|
|
|
|