|
And you can go back to the original requirement and scrap all this SessionEnding crap and maintain database consistency with transactions. So what if Windows shuts down before the app is done?? What if the power fails??
|
|
|
|
|
Dave Kreskowiak wrote: And you can go back to the original requirement and scrap all this SessionEnding crap and maintain database consistency with transactions. So what if Windows shuts down before the app is done?? What if the power fails??
... What are you on about? You seem to be upset about something and I'm not sure what you're actually saying/asking here.
"If you think of yourselves as helpless and ineffectual, it is certain that you will create a despotic government to be your master. The wise despot, therefore, maintains among his subjects a popular sense that they are helpless and ineffectual."
- Frank Herbert
|
|
|
|
|
Patrick Sears wrote: ... What are you on about? You seem to be upset about something and I'm not sure what you're actually saying/asking here.
No, it's just another situation I thought of at the very last minute. My brain has been fried all day...
|
|
|
|
|
Dave Kreskowiak wrote: No, it's just another situation I thought of at the very last minute. My brain has been fried all day...
No problem.. I know the feeling. I've been battling a stupid databinding problem all day..
"If you think of yourselves as helpless and ineffectual, it is certain that you will create a despotic government to be your master. The wise despot, therefore, maintains among his subjects a popular sense that they are helpless and ineffectual."
- Frank Herbert
|
|
|
|
|
Well, the code worked. Thank you!
However, I found what was causing me mass frustration. The code works perfect in XP (which is the platform I need it for), but on Vista, it always brings up that End Task box. Apparently MSDN says Microsoft added that on purpose for Vista...
I hate Vista.
Thanks for all your help
|
|
|
|
|
Is it possible to copy the data in a DataGridView column into an array without using a loop? I was hoping that there was, and that it might be perhaps faster than a loop.
Thanks in advance
|
|
|
|
|
cstrader232 wrote: Is it possible to copy the data in a DataGridView column into an array without using a loop?
No. You have no choice but to enumerate the cells you need from wherever the data is being kept and copy them to any array.
|
|
|
|
|
I have to execute an application (ie: c:\applications\task1.exe). I have to send some different commands and wait for the responses. Some responses are fast and has only few lines, some will take long time to execute but response every second with a dot until it completed
I would line to send command line through VB environment (might be with Shell (...) command?), but able to capture the responses without waiting it completed (to monitor its processes)
Anyone can show me how to do it?
Many thanks
|
|
|
|
|
There's a bunch of code behind that. But, you're launching the process with the Process class, then redirecting the StandardInput and StandardOutput streams so your code can capture the output of the console app.
I don't have an example handy because I'm walking out the door right now...
|
|
|
|
|
ATC wrote: I have to execute an application (ie: c:\applications\task1.exe). I have to send some different commands and wait for the responses. Some responses are fast and has only few lines, some will take long time to execute but response every second with a dot until it completed
I would line to send command line through VB environment (might be with Shell (...) command?), but able to capture the responses without waiting it completed (to monitor its processes)
Anyone can show me how to do it?
Here is an example, which executes the "cmd.exe" (command line executable), gets a directory listing, and displays the result in a messagebox:
Dim ps1 As New Process
ps1.StartInfo.FileName = "cmd.exe"
ps1.StartInfo.WindowStyle = ProcessWindowStyle.Normal
ps1.StartInfo.CreateNoWindow = False
ps1.StartInfo.UseShellExecute = False
ps1.StartInfo.RedirectStandardOutput = True
ps1.StartInfo.RedirectStandardInput = True
ps1.Start()
Dim s As String
Dim sIn As StreamWriter = ps1.StandardInput
Dim sOut As StreamReader = ps1.StandardOutput
sIn.AutoFlush = True
sIn.Write("dir /p" & System.Environment.NewLine)
s = sOut.ReadToEnd()
MessageBox.Show(s)
Don't forget to "Imports System.IO" for this. I hope this helps.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
Thanks, I also hope so, but I got errors on Dim sIn As StreamWriter (not defined). might be I need add some kind of Import?
|
|
|
|
|
ATC wrote: Thanks, I also hope so, but I got errors on Dim sIn As StreamWriter (not defined). might be I need add some kind of Import?
Correct. At the very "TOP" of your Windows Form, type "Imports System.IO". That should fix your problem.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
Hi Pete,
Thanks for the reply, however when I try to run as it is (without compiling error), it launches cmd (ms-dos window) empty then stays there forever until I close the ms-dos window then it shows the responses ( MessageBox.Show(s) )
I do not know why I have to close the ms-dos window manually, can we close it automatically?
Thanks
-- modified at 10:29 Tuesday 16th October, 2007
|
|
|
|
|
ATC wrote: Thanks for the reply, however when I try to run as it is (without compiling error), it launches cmd (ms-dos window) empty then stays there forever until I close the ms-dos window then it shows the responses ( MessageBox.Show(s) )
I do not know why I have to close the ms-dos window manually, can we close it automatically?
Its because of this statement:
s = sOut.ReadToEnd()
Take that line out and it will close the DOS screen on its own.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
Oopps, in that case how can I read the return from the application?
|
|
|
|
|
i made a c++ project long back.
now i am learning dot net..
i want to add an interface now on vb.net..
but i dont know how to add .cpp file in vb.net
can anybody help.?
|
|
|
|
|
manni_n wrote: i made a c++ project long back.
now i am learning dot net..
i want to add an interface now on vb.net..
but i dont know how to add .cpp file in vb.net
can anybody help.?
What you can do is to either compile the C++ project into a DLL and add a reference to it in VB.NET, or you can convert your C++ project to VC++ .NET project and add a reference to the whole project.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
Hi,
I made my download manager in VB.Net but I don't konw how to set it as default for IE 6 and also for IE7 ?
Any idaes?
Thanks,
Dan
|
|
|
|
|
There is no Download Manager in IE, so no way to set one.
|
|
|
|
|
I think I need to explain more. I have created the download manager like flashget,freedownloadmanager,Getright and the other ones... They all have the option to set them in ie as default so when a download begins the ie show thier interface instead of its' orignal.I want to do same thing.
|
|
|
|
|
I don't know how it does it, but IE doesn't have this "option". Maybe if it was written as a AddOn to IE you get this ability. I can't tell you because I've never written anything for IE.
|
|
|
|
|
Hi,
Yes IE doesn't have any options but we can do it using some registry help.I think I found the perfect answer from this link : http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2154635&SiteID=1
Thanks,
Dan
|
|
|
|
|
Hmmm... I never knew about that one.
|
|
|
|
|
Oh .. Never mind
|
|
|
|
|
Hi:
I have a problem, i'm programming under vb.net 2005 express edition, i have a main window with some panels with controls over they, well, i have a track control who is scroll to change the window opacity, i was this method in another programs and the window change the opacity without problems, but in this program my windows is darkness when i change the opacity value, only first time, why?.
The track control is over slipt panel but i need this panel to what the user change the meters of panel, could be the problem reason?, if yes what could im made?, thanks very much for your help
|
|
|
|