IProgramIt Thank you for the suggestion. I will give it a whirl and see what happens.
gwittlock
Posts
-
Get Image from embedded resource -
Get Image from embedded resourceI am using the following code to get an image from a file.
Using stream As New FileStream(sImageFilename, FileMode.Open, FileAccess.Read)
Dim img As Image = Image.FromStream(stream)End Using
Now what I would like to do instead is get the Image from my Resource file. I think I need to use MemoryStream but I am not sure how to use it. Any help is greatly appreciated.
-
How to create relationship of 2 tables using OleDbConnectionWell It Looks like I had a typo after-all. I had a space in the sable name where it should have been an Underscore. Thanks.
-
How to create relationship of 2 tables using OleDbConnectionWell I flip them per your suggestion and I still Get the same error.
-
How to create relationship of 2 tables using OleDbConnectionI have a MS Access Database that has 2 tables (for this example) Table_1 has a Filed named [ID] which is the Primary Key Table 2 has a field name [tbl1ID] I want to Create a relationship between Table_2 and Table_1 I tried:
"ALTER TABLE Table_2 ADD CONSTRAINT [tbl1ID] FOREIGN KEY (MyNewID) REFERENCES [Table_1](ID)"
I get the error "Can Not Find Table Or Constraint" I know Table_1 and Table_2 exists and I know ID is a filed in Table_1 and I know tbl1ID is in Table_2 So can anyone tell me where I went wrong?
-
How to Set Allow Zero Length for Field using OLEDBCommandAhhh! Am I right Eddy that there is some limitations on triggers? I thought I saw something that said you could only use framework 2, 3 or 3.5. I believe I did anyways. I would like to stick with 4.5.
-
How to Set Allow Zero Length for Field using OLEDBCommandTrigger? Not sure what that means
-
How to Set Allow Zero Length for Field using OLEDBCommandYeah I found the same thing when I Google it. I was hoping there was some bckdoor found by some of the GURU's here. Thanks for you help though.
-
How to Set Allow Zero Length for Field using OLEDBCommandI have to allow both. "So simply but yet so hard" I guess I could always create a ADOX wrapper but I don't really want to go that way
-
How to Set Allow Zero Length for Field using OLEDBCommandHmm not really I am not using ADOX. I was hoping to just change the sql statement somehow. I am just using standard OleDbConnection
-
How to Set Allow Zero Length for Field using OLEDBCommandI have the following code where I am updating a new field to a Table. I tried using the NULL in my statement and it does create the field but the Allow Zero length is still false in the table. Can anyone show me the errors of my ways? :)
Dim sql As String Dim connection As OleDbConnection Dim connetionString As String connetionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source='" & PathCMDB() & "';" connection = New OleDbConnection(connetionString) connection.Open() Dim cmd As OleDbCommand = New OleDbCommand(sql, connection) cmd.CommandText = "ALTER TABLE \[Machines\] ADD \[CNC\_Folder\] Text (255) NULL" cmd.ExecuteNonQuery() connection.Close() connection.Dispose()
-
Capturing a Picturebox in Windows 8I 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
-
Capturing a Picturebox in Windows 8I agreed with you in my second post. I will just delete this post and everyone will be happy.
-
Capturing a Picturebox in Windows 8I 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.
-
Capturing a Picturebox in Windows 8OK OK! I get it! Don't ask questions. Done and Done.
-
Capturing a Picturebox in Windows 8That would be my mistake then.
-
Capturing a Picturebox in Windows 8My mistake then about this group.
-
Capturing a Picturebox in Windows 8I understand that. But wouldn't that be the answer to every question posted in this group? This group is for VB. There is another group for .net correct?
-
Capturing a Picturebox in Windows 8Thanks for your response. I agree with upgrading to .NET but that is not always possible when you have several projects with millions of lines of code. Not everyone has the luxury or rewriting or upgrading all their code. I was asking if there was a solution to a very specific problem.
-
Capturing a Picturebox in Windows 8I have the following code which works on windows 7 but when I run my app on windows 8 I just get a black box. I am using VB6 and have seen several capture submissions here but they all do the same thing (or at least the several I have tried. Here is my code
Public Function CaptureWindow(ByVal hWndSrc As Long, ByVal Client As Boolean, ByVal LeftSrc As Long, ByVal TopSrc As Long, ByVal WidthSrc As Long, ByVal HeightSrc As Long) As Picture
Dim hDCMemory As Long Dim hBmp As Long Dim hBmpPrev As Long Dim hDCSrc As Long Dim hPal As Long Dim hPalPrev As Long Dim RasterCapsScrn As Long Dim HasPaletteScrn As Long Dim PaletteSizeScrn As Long Dim LogPal As LOGPALETTE On Error Resume Next If Client Then hDCSrc = GetDC(hWndSrc) Else hDCSrc = GetWindowDC(hWndSrc) End If hDCMemory = CreateCompatibleDC(hDCSrc) hBmp = CreateCompatibleBitmap(hDCSrc, WidthSrc, HeightSrc) hBmpPrev = SelectObject(hDCMemory, hBmp) RasterCapsScrn = GetDeviceCaps(hDCSrc, RASTERCAPS) HasPaletteScrn = RasterCapsScrn And RC\_PALETTE PaletteSizeScrn = GetDeviceCaps(hDCSrc, SIZEPALETTE) If HasPaletteScrn And (PaletteSizeScrn = 256) Then LogPal.palVersion = &H300 LogPal.palNumEntries = 256 GetSystemPaletteEntries hDCSrc, 0, 256, LogPal.palPalEntry(0) hPal = CreatePalette(LogPal) hPalPrev = SelectPalette(hDCMemory, hPal, 0) RealizePalette hDCMemory End If BitBlt hDCMemory, 0, 0, WidthSrc, HeightSrc, hDCSrc, LeftSrc, TopSrc, vbSrcCopy hBmp = SelectObject(hDCMemory, hBmpPrev) If HasPaletteScrn And (PaletteSizeScrn = 256) Then hPal = SelectPalette(hDCMemory, hPalPrev, 0) End If DeleteDC hDCMemory ReleaseDC hWndSrc, hDCSrc Set CaptureWindow = CreateBitmapPicture(hBmp, hPal)
End Function
Any help in changing or making it work on windows 7 & 8 is much appreciated