|
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
|
|
|
|
|
I've already done it but just in several games (not all). Thank you!
|
|
|
|
|
Yance Lawang wrote: 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?
The standard-approach (from with style StayOnTop) would work for a 'lot' of applications, but not for all. Some people don't want forms jumping into their screen - and some games open their own dekstop with some very strange screen-resolutions. Getting those last 5% of games to behave 'correctly' would be quite a challenge.
A more expensive alternative might be using a dedicated display; somewhat similar to the LED-display on your radio, informing the user how much time they have remaining. An example on how to do that would be here[^].
Another alternative, from the internet-cafe around the corner; catch the Ctrl-Alt-Delete combination and show your own desktop with the time remaining. That even works with some older DOS-games, although it doesn't look great when switching resolutions, it works.
Happy programming
I are Troll
|
|
|
|
|
Thank you, this is great code (from code4fun). Before, i have try to use a sound for informing the user. But it seems not satisfy for me.
|
|
|
|
|
I used to think Ctrl-Alt-Delete was a special combination which couldn't be easily intercepted by user applications. I guess it would require some code injection or some other clever trick to capture it, but it may require less work than using a dedicated display. Well, I am sure both would provide endless hours of fun
|
|
|
|
|
First - Obviously you already have the code for setting the top z-order (like through a Windows API call), but what I am guessing may be happening is that another app/game is itself grabbing top z-order. So what you may want to try is a form timer than sets the Access window to top z-order again.
Second - I appreciate the benefits of Access more than most, but I really don't think it's the right solution in this case.
Third - I'm not an expert in this area, but I think that there will always be a chance that a game will "override" the standard Windows elements and essentially take over the display, making it impossible to have your app on top. Again, I do claim ignorance in this area as I've not dealt with game development or direct interaction with Windows display control (other than through Visual Studio)
|
|
|
|
|
Thanks G-Tek. I have build this application using vb6 before, but now i try to build it using microsoft access. Based on your comment and another opinion in other forums, so i think this is impossible to make sure my form always on top in all type of games. Maybe, i must try to run a new desktop to give information about the time used (without minimize the game). But seems it is not work properly in microsoft access, but works well in vb6. Is this metode just can to applied in executable (.exe) files? Because if i try using this code to show my application (microsoft access) in new desktop, the code failed to create a new desktop, but works if i use the executable file. (Based on code from: http://www.codeproject.com/KB/winsdk/AntonioWinLock.aspx and http://www.vbaccelerator.com/home/vb/code/libraries/Windows/Creating_New_Desktops/article.asp
|
|
|
|
|
Access handles "window handles" (hwnd) differently than VB applications. As you have likely already seen - when you are making Access top most you actually have to make the "Micrsoft Access Application" top-most (not your form within Access), whereas in VB you are making your form topmost. This makes handling of window specific functions (like topmost, or drag & drop) more limiting and difficult to perform reliably. This type of behavior is one of the reasons that activex controls that work fine in VB may not work at all in Access. I've also had varying success with Windows API calls (used in the links you sent) and since they are most often used by people in Visual Studio, rather than Access, it can be difficult to get much support in resolving issues (including the issue that you're having). I did a lot of work in Access many years ago and have done things with Access that most others didn't think was possible (because most developers don't see Access as a real platform, largely because many people that use Access don't know what they heck they're doing!) - it can be a great platform for the right person to develop pretty great solutions in a small timeframe, but it definitely has its limitations... and for your needs I think Visual Studio is a better approach. I'd also recommend you upgrade to .net rather than using VB 6 - you can get the Visual Studio express edition which should meet your needs (http://www.microsoft.com/express/[^].
|
|
|
|
|
Games that work don't output video through DirectX, the ones that do not work use DirectX.
DirectX based applications are allowed to use dedicated video output, which leads to a different way to display stuff that has nothing to do with window handles or the desktop. It's na area Forms don't touch. DirectX is needed to display over DirectX
|
|
|
|
|
I was actually wondering if it was related to DirectX, but since I've not done any work in that area I really didn't know. That makes complete sense though.
|
|
|
|
|
You can't use forms to display over directX based games, they use a dedicated video buffer to display directly to the display that the Forms can't touch. It's simply a whole different way to display stuff. You will have to interop with DirectX to acheive that (out of my league).
With games like Counter Strike work because they are displayed with OpenGL or other engines that do not use dedicated video output.
Refer to this WF forum thread for more info:
http://social.msdn.microsoft.com/forums/en-us/winforms/thread/0E65F2E7-E277-4461-85BC-95B03B556CDF[^]
Regards,
Fábio
|
|
|
|
|
I accomplished something like this a few years ago by using a directx proxy dll. Using a custom proxy for directx lets you inject and display whatever you want on top of a directx game. See this site for details: http://www.mikoweb.eu/index.php?node=21[^] I used that code as a starting point and I created a stats/info box for an MMO similar to the forum post linked above.
It worked well in my situation but it may be difficult to support many different games, as you will need to make sure that your proxy directx dll is loaded by each individual game.
|
|
|
|
|
Wow...i will try this. Thank you!
|
|
|
|