vb6

How do I set file permissions for non-admin users in VB6?

I have an old update program written in vb6, which runs as admin. However, because it runs as admin, all the files it downloads and saves are read-only to other users. Even files in public places like the shared application data folder (which is where I'm saving the files in question). I'm lucky I found this before the 'vista-compatible...

How to view the CRViewer in Monitor full Screen?

Using VB 6 and Crystal Report 8.5 I am using CRViewer Control in my project and I’m using 15 Inch Monitor, when I run my project in 17 Inch Monitor, CRViewer control not displaying full Screen. How to set a CRViewer Control according to the Monitor Size? Need VB 6 Help. ...

Outlook programmatically avoid Attachment.SaveAsFile() Pop-up on XSL

Hi, I have developed a Outlook polling service that does the following: The service is not a windows service but a rich client. It is developed in Visual Basic 6. The "robot" basicly polls outlook for new mails If a new mail is found the Attachment.SaveAsFile(path) is used to save each attachment. When I save Excel files (xls) exten...

How to Work with checkboxes in VsFlexGrid in vb6.0?

Hi I am developing a form for handling access rights in a project. I use VsflexGrid7.0 and also Vb6.0. I thought that it would be good when I show 1 (has access) and 0 (doesn't have) via checkbox within my vsflexgrid(vsflexgrid1). Now, my problem is when I click on a checkbox for Insert access right, how to get control it's value ? Th...

Microsoft Office Document Image Writer cannot be programatically set to Landscape in VB6?

In our VB6 application, when the user's default printer is set to Microsoft Office Document Image Writer the following line of code causes the application to throw error number 380 (Invalid property value). Printer.Orientation = vbPRORLandscape If you are unfamiliar with what this line is doing, it is responsible for ensuring that the...

Equivalent (functionality) of ObjPtr from VB6 in C#?

Does any one know if C# has an equivalent of ObjPtr from VB6, or equivalent functionality (see more info below)? Here are a couple of links to info on ObjPtr devx , thevbzone. Basically I have a third party treeview that I need to walk thru to get specific nodes but the only (relevant) info the nodes have is name ... but the node names...

VB6: Special-Draw transparent picture

Hello got a PictureBox (called i_MC) and i draw a simple image (m_ImgMCN) on it doing: Call i_MC.PaintPicture(m_ImgMCN, 0, 0, i_MC.width, i_MC.height) now i would like to put a transparent image on this picture, on a specific position. i found a sample code, which does the job quite well with one problem: parts of the image that shou...

VB6 error propagation

Hi, I'm using an error handler on my main calling procedure and letting the other procedures just roll up to that error handler. Should I be clearing the error each time? Or should I Exit Sub instead of letting the error handler continue on the End Sub? I'm asking because I've read that I may catch the first error, and then the other ...

Error Handler - Exit Sub vs. End Sub

Why would I want to get out of an Error Handler (after handling) with an Exit Sub instead of just letting it go to the End Sub? I'm sure it's simple. I just don't understand. Thanks for any help. Example: Public Sub SubA() On Error Goto ProcError ''# other code MsgBox FuncA() ProcExit: Exit Sub ProcError: MsgBox Err...

End Process from Task Manager using VB 6 Code

I need to kill an application roughly so I can get phantom subscriber of that application in my database (this can not be produced by closing the application). Manually, if we kill the application from Task Manager, the phantom subscriber will be exist. Now I need to do it automatically in VB 6 code. Help! Thanks. ...

Using a Visual Sourcesafe 2005 database with VB6 still launches VSS 6.0d

I know all versions of VSS have many horror stories and I feel I will escape to a better source control mechanism someday but in the short term I am just trying to do a little cleanup and would like your advice on this issue: Objective - consolidate old VB6 source code in a "new" VSS 2005 database (currently all these old projects are c...

VB6, Usercontrol: Remove ability of getting focus

hello while designing my user control, i encountered the following problem: i would like to set the UserControl.CanGetFocus to false, which is not possible due an error message telling me that a control unable to receive focus can not contain elements who are able to receive focus. but as i don't want them to actually receive any focu...

G360 Execute 360 Folder Open Delay

I am using G360 Execute 360 CalClient vb6 API to integrate to Execute 360. My API version is 9.1. When opening folders type workitems from the workflow server using CalWorkitem.Open it takes very long to return the workitem folders. THe same occurs in the WorkDesk application. What is the cause and how can I fix it. ...

Automate Importing Multiple Excel Worksheets into SQL

In VB6: I need to allow a user to select an Excel file, and then upload All Worksheets to a SQL table. I'm not sure how to do this. The format of each sheet is exactly the same. And the worksheet format matches the SQL table format. I'm really banging my head against the wall over here. If anybody could offer a suggestion, or a cod...

Error on G360 Execute 360 when importing TIF file format

I am using the CAL and eiStream Imaging software to create a workitem (document) with a TIF import file. The workitem gets created without a problem, but as soon as I add the import file I receive an error saying incorrect format. This only occurs on some TIF images. What could the problem be? ...

VB6, ActiveX: Cannot create reference to OCX

hello again i have a little problem with the creation of a user control. though i have made a control i want to use in another control. as soon as i want to add the reference (would like to use it as compiled OCX) in the Component's list, the message "Wechselseitiger Verweis zwischen Projekten nicht zulässig" which means something like...

VB6: Why is Picturebox.Print() hidden from the Object catalogue?

hello the title already tells the question: you can successfully call the Print-Method on a PictureBox-instance. But it is not shown in the object browser. same applies for some other methods, Pset() for example is listed but the syntax is not completely correct. Edit: The methods Ubound() and LBound() for inspection of array bounds i...

Conversion of INTEGER to DATETIME differs to VB6

I'm looking at some legacy VB6 code (years+years old, before my time) which runs a query against an SQL 2005 db. It supplies a date restriction in the WHERE clause - where the date is given as an integer value as a result of a CLng() on the Date in VB6. e.g. ... WHERE SomeDateField >= 40064 40064 is what VB6 converts today's date to ...

VB.NET Write number formating

Have a bit of code ported from VB6 to VB.NET. It uses Write and WriteLine all the way to produce output files. Now, I need to compare outputs from original and ported code, but there's one tiny problem with number formatting. For instance whereas VB6 code Writes just .5, the VB.NET code produces 0.5, instead of .0005 (in original) it w...

VB6 quitting while debugging with active Windows message hook

One of our largest old VB6 apps has some code in it to allow other apps (including some dotNET ones) to pass an ID to it via a Windows message - this ID is then used by the VB6 app to load an entry in a regular Windows form. The message hook is added after the user is logged in and authenticated, and removed once they logout. Public Sub...