Re: API: 2nd posting please help! [was API: Eeeek! "Ghost" on edges of generated drawing w/properties]

perhaps set the form's autoredraw property to 'True'...

Hello everyone, > I am creating a utility which generates formatted drawing sheets from a user > form. The problem I am having is that when the form appears on the screen, the > image does not seem to fill the whole window pane. The left and top edges have a > kind of "ghost" on them. If anyone wants to help I will be glad to send a screen > (scream?) shot. There is about a 1/4" margin on the top and left hand sides that > acts as if the drawing is not filling it. If I "ALT/TAB" to another window, then > back, when I go back the margins contain left over image from the previous > window. If I maximize and then go back to partial size, the band goes away on > the top but remains on the left. I have tried it on two different computers, one > Win2000 and one WinXP. Same thing. If I minimize then maximize again, it returns > to the top and the left as well. The drawing itself seems to "work" OK, but > those edges just look nasty. > The part of the code that actually generates the drawing is below. There are > other routines that take user input from a form to set up the properties. I > thank in advance everyone who offers any help! > -plh > > Private Sub cmbMakeItSo_Click() > Dim bolRtn As Boolean > > Set swApp = Application.SldWorks > > Select Case intSize > Case 0 > Set swDrawing = swApp.NewDocument(A_FORMATSHEET, swDwgPaperAsize, 0#, 0#) > Case 2 > Set swDrawing = swApp.NewDocument(B_FORMATSHEET, swDwgPaperBsize, 0#, 0#) > Case 3 > Set swDrawing = swApp.NewDocument(C_FORMATSHEET, swDwgPaperBsize, 0#, 0#) > Case 4 > Case Else > MsgBox ("Unexpected result in Case Else @ cmbMakeItSo_Click()") > End Select > Set swDoc = swApp.ActiveDoc > swDoc.SummaryInfo(swSumInfoAuthor) = strAuthor > swDoc.SummaryInfo(swSumInfoComment) = strTitle > bolRtn = swDoc.AddCustomInfo2("Material", swCustomInfoText, strMaterial) > bolRtn = swDoc.AddCustomInfo2("Revision", swCustomInfoText, strRev) > 'swDoc.FileSummaryInfo > > End Sub > > I keep hitting "Esc", but I'm still here! > (If "123" is in the email address that's and anti-spam thing - remove it)
Reply to
TheTick
Loading thread data ...

I have seen the ghost border you are talking about. The only time I get it is if I try to open a sheet format thru windows explorer. If you do a new drawing and then pick the sheet format that you want, I don't get the ghost image. I would recommend doing it this way. We were able to recreate this problem on another machine doing the same process. I hope that helps.

Reply to
B Waggoner

Ok, so when you say "Sheets" you are rfeferring to SolidWorks. and when you say "Form" you are referring to VB/A UserForm ?

screen, the

Again, if you mean the 'ghost' is on the userform, then it sounds like you are using the OLE control?

Reply to
rocheey

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.