Visual Basic 6.0 Gets Run time Error '70' Permission Denied in Windows Vista and Windows 7
Visual Basic 6 programming is still supported by Microsoft Corporation until the latest Operating System which is Windows 7. However, there are some functions in Visual Basic 6 that Windows Vista or Windows 7 does not allow to execute the command like for example the "SendKeys" it will got an error "Run-tine error '70': Permission denied". Please check the sample visual basic 6.0 code below.
Visual Basic 6 programming is still supported by Microsoft Corporation until the latest Operating System which is Windows 7. However, there are some functions in Visual Basic 6 that Windows Vista or Windows 7 does not allow to execute the command like for example the "SendKeys" it will got an error "Run-tine error '70': Permission denied". Please check the sample visual basic 6.0 code below.
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then SendKeys "{tab}" '13 = Enter Key
End Sub
I've tried to research at the google about this problem but I found nothing. Through my experiment I found a solution that will work 100% based on my own project, I uploaded also a short video to youtube.com as a demonstration. Youtube link is http://www.youtube.com/watch?v=I9Zbq4ASq6w
1. Select the executable files you want to run and then click the right button of the mouse and select 'Properties' menu. Please see the image below.
2. Click the 'Compatibility' Tab. Please see image properties below.
3. In Compatibility Mode, select checkbox 'Run this program in compatibility mode for:'
4. Select the 'Windows XP (Service Pack 2)' and then click the OK button to save changes.
5. Done! Please try to run your executable file and hope it will help solve your problem.



11 comments:
visual basic 6.0 download only 47 mb
http://uploading.com/files/c7c55f7d/Visual%2BBasic%2B6.0%2BExpress.part1.rar/
http://uploading.com/files/116d6b1e/Visual%2BBasic%2B6.0%2BExpress.part2.rar/
If the executable file resides on a server (ie is used in a multiuser environment) you cannot use the compatibility mode, as you describe, as they are greyed out. Any thoughts?
I have no words for this great post such a awe-some information i got gathered. Thanks to Author.
Your Sharing is enjoyful to me, i got some help from your posting.
my software is compatible with windows 7 except a single commant that is dataenviroment1.command_grouping where as dataenvironment1.command works well. can u help me
Imaging for Windows XP
kakopa.com/imaging/index.htmlKodak/Wang Imaging is a neat program which first came out with Win95 as ... to be bundled with Windows so it disappeared from Windows XP which is a shame as it ... Imaging is a great program for something very specific which is to scan, view, edit, ... Run the install.bat file and it will do the entire installation automatically.
Attribute VB_Name = "Module1"
Public xyCoord(500, 6)
Public gintXScroll As Long, gintYScroll As Long ' seting the x and y scroll position
Public gintCurFieldPosition As Integer ' seting the position for image
-on form level
ImgEdit1.Image = Dir1.Path & "\" & File1.FileName
ImgEdit1.Display
Private Sub File1_Click()
Text1.Text = Dir1.Path & "\" & File1.FileName
lblcount.Caption = Trim(File1.ListCount)
lblbatchNo.Caption = File1.ListIndex + 1
lblbatch.Caption = File1.FileName
ImgEdit1.Image = Dir1.Path & "\" & File1.FileName
ImgEdit1.Display
'Image1.Picture = LoadPicture("")
'Set Image1.Picture = Nothing
'Image1.Picture = LoadPicture(Dir1.Path & "\" & File1.FileName)
'Picture1.Picture = LoadPicture("")
'Set Picture1.Picture = Nothing
'Picture1.Picture = LoadPicture(Dir1.Path & "\" & File1.FileName)
End Sub
Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub
Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub
Private Sub UpDown1_Change()
UpDown1.Min = 10
UpDown1.Max = 150
ImgEdit1.Zoom = Val(txtZoom.text)
ImgEdit1.Display
End Sub
Private Sub UpDown1_DownClick()
If ImgEdit1.Zoom <= 10 Then Exit Sub
ImgEdit1.Zoom = ImgEdit1.Zoom - 10
ImgEdit1.Refresh
gintXScroll = (xyCoord(gintCurFieldPosition, 0) * 0.4) 'right
gintYScroll = (xyCoord(gintCurFieldPosition, 1) / 27) 'right
ImgEdit1.ScrollImage 3, gintXScroll 'left
ImgEdit1.ScrollImage 1, gintYScroll 'up
txtZoom.Text = ImgEdit1.Zoom
Exit Sub
End Sub
Private Sub UpDown1_UpClick()
If ImgEdit1.Zoom >= 150 Then Exit Sub
ImgEdit1.Zoom = ImgEdit1.Zoom + 10
ImgEdit1.Refresh
gintXScroll = (xyCoord(gintCurFieldPosition, 0) * 0.4) 'right
gintYScroll = (xyCoord(gintCurFieldPosition, 1) / 27) 'right
ImgEdit1.ScrollImage 2, gintXScroll 'right
ImgEdit1.ScrollImage 0, gintYScroll 'down
txtZoom.Text = ImgEdit1.Zoom
End Sub
sir
i want to help,
sub:- finding data
using 1.data 2.text box, 3.command button
i create a program 3 textbox (a.student name b.address)3 command button (a. save b. new c. delete) now i want to that i type any name in 3rd textbox and data will show in 1st and 2nd textbox. how it possible. please tell me sir.
Thank you so much for this helpful post! I'm running Windows 7 with Visual Basic 6.0 (which I now realize has compatibility issues) I was trying to use SavePicture (Picture1.Image, "Pic.bmp") to simply save an image from my PictureBox onto the hard drive. When I run the program I got no error messages but when I go look on my hard drive there is no "Pic.bmp"! So after scratching my head and googling for an hour or so I finally found the answer here! I had to make my Visual Basic .exe "compatible with Windows XP" and now it works! Thanks!
thanks...
I have Windows 8 with visual basic 6 and the problem persists. compatibility with Windows XP Service Pack 2. sendkeys continuous mistake. any suggestions?
Post a Comment