|
The problem you're going to have asking questions about VB6 is that very few people still have it installed to test the code and come up with a solution! This is going to be true at ANY forum, unless it's specifically dedicated to VB6.
|
|
|
|
|
OK OK! I get it! Don't ask questions. Done and Done.
|
|
|
|
|
There's nothing wrong with asking questions. But you need to understand that using a programming language that is years out of date is going to be difficult for people to answer. Also, that the later versions of Windows use features that VB6 was never designed to handle.
|
|
|
|
|
I understand about it being out of date. I also know there are a lot of people still programming in VB6. When a whole product works except for 1 feature it is difficult to justify the cost of totally re writing an app.
I feel like I asked a simple question just to get bashed because of the language. If people do not have an answer why be little someone for asking a question.
|
|
|
|
|
gwittlock wrote: why be little someone for asking a question. No one has belittled you. We are just trying to get you to understand that VB6 is so long out of support that almost no one (particularly on this forum) uses it any more. The problem you are seeing may well be due to the fact that you are trying to use very old libraries and code on a much later OS which uses many new features. I have given you one suggestion to try and isolate whether the problem is definitely due to VB6, and you could save some time by trying it.
|
|
|
|
|
gwittlock wrote: just to get bashed because of the language
I don't think any of us were belittling you, we have all used VB6 in the past, I doubt the VB6 is your choice and I can understand supporting legacy code. While it maybe a single feature that has failed now the problem is only going to get worse as the OS moves forward and you are stuck in the 90s, alright early 00s.
You should have had a migration plan in place 10 years ago if it is part of your core business (millions of lines of code indicates it is a major commitment).
To give you some perspective, MS have announced the sun setting of Silverlight in 2020 (I think) we are looking at rewriting 34 applications into either MVC or WPF and yeah possibly as much as 1m LOC.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I never said "don't ask questions". I just told you why you're going to have a hard time getting an answer to it.
It's not just "a simple question".
|
|
|
|
|
I want to thank everyone for their responses. As a matter of fact Richard has helped me out before with I question I asked about .net and I greatly appreciate it.
I do program in .net and have done so for awhile. All of may main products have be upgraded as some suggested here.
I do believe my question was detailed, I provided the particular code that I believed was the issue and did explain the issue I was having.
It is probably my fault for this question getting off track. Just as much as ask the right question, answering the question should be just as important. If someone has an answer that is great. That is what these forums are for IMO anyways.
Saying you should upgrade the code to .net doesn't answer the question (at least I do not think so because that is certainly the way to go. If you can justify the cost VS benefit). Maybe I asked it in the wrong forum. I agreed that programming in VB6 was not the greatest but it is what I had to work with. I was hoping that someone else had encounter the same issue. Here another way of looking at it. You have lived in your house for 10 years and you discover a leak in your plumbing. Now the plumbing is not the latest and greatest technology. Do you replace all of your plumbing? Do you say that the plumbing is 10 years old so you should buy a new house? Of course not. (No sarcasm intended here. Just trying to relay an analogy). You just fix the leak I am sure.
As I said this question got a little off track, so again I want to thank everyone for their input it is always appreciated
|
|
|
|
|
gwittlock wrote: I was hoping that someone else had encounter the same issue. The number of responses you received suggest that no one has. Have you tried that code in VB.NET as I suggested, just to see if that really is the issue?
|
|
|
|
|
gwittlock wrote: Do you say that the plumbing is 10 years old so you should buy a new house? You did not even replace a part with something newer when it was broken, you waited until it became obsolete in the industry.
So, you already new that your 10 year old house was using an out of date plumbing, and went ahead with it because it is cheaper. You have chosen to become obsolete. And yes, I will keep hammering that point, because someone else "might" think that your argument is valid.
It was, 2004. Not in 2014.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
On the Windows 7 computer that works, have you disabled Aero? It sounds like your code doesn't work with layered windows.
Most Google results seem to suggest that you need to pass the CAPTUREBLT flag (&H40000000L ) to the BitBlt function[^]. It's not declared in the RasterOp enum[^], because VB6 came out a long time before Aero, so you'll need to declare it yourself.
My VB's a bit rusty, but something like this should work:
BitBlt hDCMemory, 0, 0, WidthSrc, HeightSrc, hDCSrc, LeftSrc, TopSrc, CLng(vbSrcCopy Or &H40000000L)
Edit: Forgot that VB6 uses Long for 32-bit integers.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
i am using the following table
idno name activity startdate enddate
1 abc def 10/26/2014 11/01/2014
2 ghi jkl 10/26/2014 10/30/2014
3 mno pqr 10/26/2014 10/30/2014
4 stu vwx 10/26/2014 11/01/2014
i want to blink 2 and 3rd row(not particular row because i have many rows in my database) because column enddate has todays date.
likewise i want to blink each row if only column enddate is todaysdate.
thanks and regards,
Bobby Sharon
|
|
|
|
|
Hi Bobby,
Why dont you write the code on RowDataBound. Something like:
Private Sub GridView_RowDataBound(sender As [Object], e As GridViewRowEventArgs)
If e.Row.RowType.Equals(DataControlRowType.DataRow) Then
If Convert.ToDateTime(e.Row.Cells(4).Text) = DateTime.Now.[Date] Then
e.Row.Style.Add("text-decoration", "blink")
End If
End If
End Sub
Hope this helps !!
Regards,
Praneet
|
|
|
|
|
hi praneet,
thanks for your code, actually i am new to visual basic, i am getting the following error while applying to this code.. is there any command needed to be included
error is :
type GridViewRowEventArgs is not defined
type DataControlRowType is not declared
|
|
|
|
|
hi,
I've a pdf file of 10 pages. I need to insert text ("xxx") on the left side of the each page of the pdf file through vb.net 2008 code.
how can I do this?
|
|
|
|
|
You would need to use one of the third party libraries such as iTextSharp.
|
|
|
|
|
You have already asked this question[^] in QA.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hello.
I have an application in VB6 from which I print a report with Crystal Reports 4.0.
For example, when I set a printer as the default printer pdf, when you open the dialog box to save the pdf file in the File name field I wrote "Seagate Crystal Reports - xxxxx.pdf."
How do I set this code to the file name that comes by default?
Which Crystal Report I have set to change the name of the file / print?
Thanks to all
|
|
|
|
|
I've seen a lot of discussion on this subject, but no real solution. I get the problem on one machine but on another the program works correctly. I'm using Visual Studio express 2013, but all the "solutions" I've seen refer to Visual Basic 2010 and the "solution" doesn't seem to work with VS Express 2013. Any help would really be appreciated.
|
|
|
|
|
|
I've used ADO but ADODB is easier for me to use and I've used it for many years (I'm 81 now so I've used about all the languages there are over time). But, I like ADODB for Visual Basic, and it has always worked correctly until Microsoft started messing with it. So, was that your solution?
|
|
|
|
|
It was just a suggestion. ADODB is definitely an "ex-parrot" now; it hasn't been updated since .NET was released, and although it still works, it's not supported.
Using ADODB from a .NET application is going to be significantly slower than using ADO.NET, since your .NET code has to talk to a COM wrapper for ADODB. It also has significantly less features that ADO.NET, and makes many operations harder than they need to be.
If you feel like taking the plunge, there are plenty of articles to get you up to speed. For example:
Migrating from ADO to ADO.NET[^]
Migrating Code and Concepts from ADO "Classic" to ADO.NET[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I love this. It means that there is hope for me at 70. I've been a programmer for decades using 4g OOP, mostly Progress DB system, but never got into VB. But I'm retired now and I'm really trying hard to understand all the .net object calls, there are so many and with so many parameters.
This is really encouraging to me, Ed, Thanks. LOL
|
|
|
|
|
It sounds like your reference has the "Embed Interop Types" property set to "True". Try changing it to "False".
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
That is the "solution" that I've seen from several others, but in VS 2013 there doesn't seem to be any way to do that. I've tried every way I can think of. If you have a suggestion as to how; I will certainly try it.
|
|
|
|