|
|
You've overcomplicated this. I have no idea what you were doing with the ConvertAll and the ProcessToProcess thing. GetProcessesByName returns an array of Process objects. If you expect only one instance of the process you're looking for, check the size of the returned array for 1 instance and just check the HasExisted property of the one instance. If you're expecting that you can have more than one instance, you'll have to complicate the code a bit.
Dim processes As Process() = Process.GetProcessesByName("ProcessName")
If processes.Length = 1 Then
Do While processes(0).HasExited = False
' Wait half a second and check HasExited again.
Thread.Sleep(500)
Loop
End If
' The process has exited. now you can do whatever you need.
|
|
|
|
|
|
If that one messed you up, I you should seriously pickup a book on VB.NET and work through it. You've got a ton of basic concepts that need to be laid out to you before you can really start understanding the documentation on the rest of the .NET Framework.
|
|
|
|
|
Are You tried this..,
System.Diagnostics.Process .GetProcesses
Rajesh B --> A Simple Programmer <--
|
|
|
|
|
I've been sitting here for hours searching useful information in your question. What did you try? what do you know about the process of interest, how will you identify it? Can you modify said process, e.g. make it set a Mutex?
|
|
|
|
|
Hi, I create dynamically textboxes and want to add data from them to database, but I don't know how do this.
I use this to create textbox
v = 1
Dim l As Integer
l = 40
For i = 1 To Form1.k
l = l + 30
Dim lab As New Label
Dim t As New TextBox
Dim chk As New CheckBox
lab.Location = New Point(10, 30 + l)
t.Location = New Point(100, 30 + l)
chk.Location = New Point(420, 30 + l)
Me.Panel1.Controls.Add(chk)
Me.Panel1.Controls.Add(lab)
Me.Panel1.Controls.Add(t)
lab.BringToFront()
t.BringToFront()
chk.BringToFront()
t.Size = New Size(300, 20)
t.Name = "t" & i
lab.Name = "lab" & i
lab.Text = "Отговор" & i
chk.Name = "chk" & i
Next
|
|
|
|
|
Which part do you not know how to do?
- Get the data from the controls.
- Connect to the database.
- Create a command/query to run against the database.
- Add the data as parameters to the command.
- Execute the command.
|
|
|
|
|
I don't know how to get the data from the controls, because in running program they not in the form and program give a error. I don't know with what name use them.
|
|
|
|
|
To access those controls you basically have two ways:
1.
keep a reference to each Control somewhere, maybe in a List Of Control, then enumerate the list elements.
2.
find the Controls by name: you can do Me.Panel1.Controls["John"] to access the Control with name "John".
|
|
|
|
|
Thank You very much this work.
|
|
|
|
|
hi, im doing a app on vb6 and i have a doubt about the transaction. how can i know if the transaction is "open" or not. thanks,
Marcus
|
|
|
|
|
mabrahao wrote: app on vb6
VB6 is dead.
mabrahao wrote: how can i know if the transaction is "open" or not.
As much as i can remember (asuming that you are using ADODB) the only way to use a variable. After opening the transaction make it true and after commit or rollback make it false.
|
|
|
|
|
Goutam Patra wrote: VB6 is dead
Is that your answer if a customer asks whether you can change his/her code?
I are Troll
|
|
|
|
|
Well that was not my intention. Yes, some of my clients are still using good old VB6 application. And I told them I will not be able to give any more functionality in this application platform, I can give you support up to some minor changes.
I think there is no point of doing any further development on VB6. And that’s why I said so. And I also I gave OP the some solution also. I just didn’t reply OP to say that.
|
|
|
|
|
Goutam Patra wrote: I think there is no point of doing any further development on VB6.
They can't not do .., because of client requirement., some client are still using windows98 with low and configuration systems which are not supported by .Net environment., they don't want to invest/upgrade their systems.
In this case there is no chance for Programmers
Rajesh B --> A Simple Programmer <--
|
|
|
|
|
Rajesh Puli wrote: In this case there is no chance for Programmers
I agree
|
|
|
|
|
Goutam Patra wrote: VB6 is dead.
More accurate to say that it is undead: Microsoft hasn't supported it in years, but many companies are too (censored) cheap to buy upgraded software, or have solutions developed in-house that "work fine, so why bother going through the cost and hassle of rewriting it in a new language?"
Like COBOL and RPG, VB6 (and earlier) will be around until the last corporate manager is mouldering in his grave.
|
|
|
|
|
If you opened one, it's open (until commit or rollback is called). If you didn't open it, you probably won't be able to close it anyway. If I need a transaction, I tend to start it when the connection opens, and commit or rollback just before I close the connection again.
I are Troll
|
|
|
|
|
If you are using MS-SQL, this might help you determine how many transactions are running ...
select @@TranCount AS TransactionCount
|
|
|
|
|
You can check if <<your connection="">>.State equals 'adStateOpen' constant.
|
|
|
|
|
Hello, i in project to made an i-cafe software. But i find a problem with always on top form. This form i use to give information about time billing of internet using. This forms work well in all maximize window and several full screen games like: Point Blank, Cross Fire, & Counter Strike. But not in call of duty, popcaps game, etc. How to make form full always on top in all of fullscreen games using vb code? (but i build this application in microsoft access 2003)
|
|
|
|
|
|
Thanks for your reply. that's not what i mean. i didn't to tried made my form be fullscreen but i just make a form with small size and want it always shows on top even in fullscreen games. so my form should always views while i am playing the game, is it clear?
|
|
|
|
|
Oops. But I think you can't do that above dos based games. I'll check again.
thatraja |Chennai|India|
Brainbench certifications Down-votes are like kid's kisses don't reject it Do what you want quickly because the Doomsday on 2012
|
|
|
|