When i create a PDFView object (Delphi 2006) it's impossible to set properties or anything else before show ?
I want to export to Tiff but without interface, how to create the object without memory Read error... ?
Ah ah i'm not clear.
For example : On delphi formcreate, call the setdevinfo procedure and we get a big crash.
PDF Viewer export to Tiff without interface and Delphi
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
-
- User
- Posts: 36
- Joined: Tue Jun 12, 2007 8:22 am
-
- Site Admin
- Posts: 3556
- Joined: Thu Jul 08, 2004 10:36 pm
- Location: Vancouver Island - Canada
Maybe I'm wrong, but during FormCreate event does Delphi's form and its components already constructed? It is correct to call their methods ?
Tracker Software (Project Director)
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
-
- User
- Posts: 41
- Joined: Fri Jul 06, 2007 7:18 pm
Re: activex
Don´t know if it´s by design or a bug. I´m also not able to do anything with the activex as long as it´s not visible. Here´s what i´ve tried with some VBA codedidierurban wrote:Yes, i always set properties of activex on formcreate.
Thanks
---------------------------
Private Sub UserForm_Activate()
olectrl.Visible = False ' hide the control, ok
End Sub
-----------------------
As expected the control isn´t visible, but lateron each attempt to access the control fails with the runtime error "8000ffff" ( translated as "Catastrophic failure" )
------------------------
Private Sub btn3_Click()
Dim xx As Variant
' the next line causes a crash
olectrl.GetProperty "General.ApplicationModulePath", xx, 0
MsgBox (xx)
regards
Karl-Heinz
-
- Site Admin
- Posts: 3556
- Joined: Thu Jul 08, 2004 10:36 pm
- Location: Vancouver Island - Canada
-
- User
- Posts: 41
- Joined: Fri Jul 06, 2007 7:18 pm
Sorry, but i do not have VB installed. But just open the attached winword document. When you open the doc you must allow to execute makros !.
Now select "Extras" -> "Macros" -> "Visual Basic Editor" and you´re within the VBA IDE. Select the Project: "( PDFXChangeText2 )" and you can see the form-editor and the sources.
regards
Karl-Heinz
BTW. here are the complete extracted sources:
------------------------------
Public nID As Long
Private Sub btn3_Click()
Dim xx As Variant
' olectrl.OpenDocument "C:\huw.pdf", "", nID, 0
' MsgBox (nID)
' the next line causes an runtime error "8000ffff" ( translated as "Catastrophic failure" )
' when you activate the line :
'
' olectrl.Visible = False
'
' in the Sub UserForm_Activate()
'
' otherwise all works as expected.
'
olectrl.GetProperty "General.ApplicationModulePath", xx, 0
MsgBox (xx)
End Sub
Private Sub UserForm_Activate()
olectrl.Top = 0
olectrl.Left = 0
olectrl.Width = UserForm1.Width - 6
olectrl.Height = UserForm1.Height - 80
' olectrl.Visible = False
End Sub
-----------------------------------
Now select "Extras" -> "Macros" -> "Visual Basic Editor" and you´re within the VBA IDE. Select the Project: "( PDFXChangeText2 )" and you can see the form-editor and the sources.
regards
Karl-Heinz
BTW. here are the complete extracted sources:
------------------------------
Public nID As Long
Private Sub btn3_Click()
Dim xx As Variant
' olectrl.OpenDocument "C:\huw.pdf", "", nID, 0
' MsgBox (nID)
' the next line causes an runtime error "8000ffff" ( translated as "Catastrophic failure" )
' when you activate the line :
'
' olectrl.Visible = False
'
' in the Sub UserForm_Activate()
'
' otherwise all works as expected.
'
olectrl.GetProperty "General.ApplicationModulePath", xx, 0
MsgBox (xx)
End Sub
Private Sub UserForm_Activate()
olectrl.Top = 0
olectrl.Left = 0
olectrl.Width = UserForm1.Width - 6
olectrl.Height = UserForm1.Height - 80
' olectrl.Visible = False
End Sub
-----------------------------------
You do not have the required permissions to view the files attached to this post.
-
- Site Admin
- Posts: 3556
- Joined: Thu Jul 08, 2004 10:36 pm
- Location: Vancouver Island - Canada
Looks like olectrl.Visible = False causes trouble. For now I don't know who is responsible for this trouble -- the viewer, or Word. So, as a solution for now, you can jut put this control into 'wrong' place of the form, for example to set olectrl.Left = -1000.
Tracker Software (Project Director)
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.