Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
User interface operation not allowed this time.
Message
De
12/07/2002 10:29:49
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00677894
Message ID:
00678018
Vues:
17
>the example code below is the one that i compiled as single-threaded com dll server.
>

You cannot have interface elements in a VFP DLL. Probably you can build this into a COM EXE instead, haven't tried it though.

To be certain what code produces the error, you can add an error proc to your class and write the error details to a text file.

>The command bellow causes an error- "blah blah user interface operation not allowed this time."
>
>oCom = createobject('keyboard.keyboard1')
>ocom.show()
>
>whats did i miss in my code. Please advise
>
>Thanks in advance
>********** sample code
>
>DEFINE CLASS keyboard1 AS form OLEPUBLIC
>
>
> Height = 205
> Width = 313
> Desktop = .F.
> ShowWindow = 2
> DoCreate = .T.
> AutoCenter = .T.
> Caption = "Ahead Keyboard"
> ControlBox = .F.
> MaxButton = .F.
> MinButton = .T.
> MDIForm = .F.
> TitleBar = 1
> WindowState = 0
> AlwaysOnTop = .T.
> Name = "keyboard"
>
>
> ADD OBJECT command1 AS commandbutton WITH ;
> Top = 156, ;
> Left = 72, ;
> Height = 27, ;
> Width = 84, ;
> Caption = "Command1", ;
> Name = "Command1"
>
>
> ADD OBJECT command2 AS commandbutton WITH ;
> Top = 156, ;
> Left = 156, ;
> Height = 27, ;
> Width = 84, ;
> Caption = "Command2", ;
> Name = "Command2"
>
>
> ADD OBJECT command3 AS commandbutton WITH ;
> Top = 96, ;
> Left = 48, ;
> Height = 27, ;
> Width = 84, ;
> Caption = "Command1", ;
> Name = "Command3"
>
>
> PROCEDURE Load
> PUBLIC wshshell
> WshShell = CreateObject("wscript.Shell")
> ENDPROC
>
>
> PROCEDURE Init
> _screen.Width = this.Width
> _screen.Height = this.Height
> _screen.AutoCenter = .t.
> thisform.AutoCenter = .t.
> thisform.Resize
> ENDPROC
>
>
> PROCEDURE command1.Click
> WshShell.appactivate("ahead point of sale")
> WshShell.sendkeys("1")
> ENDPROC
>
>
> PROCEDURE command2.Click
> thisform.release()
> _screen.Visible = .t.
> CLEAR events
> ENDPROC
>
>
> PROCEDURE command3.Click
> WshShell.appactivate("ahead point of sale")
> WshShell.sendkeys("{enter}")
> ENDPROC
>
>
>ENDDEFINE
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform