Click here to Skip to main content
15,899,026 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: read access denied to com port in vbs Pin
sonisan16-Jul-11 22:06
sonisan16-Jul-11 22:06 
QuestionBrowser with advanced tab Pin
ObscureA9215-Jul-11 20:38
ObscureA9215-Jul-11 20:38 
GeneralRe: Browser with advanced tab Pin
Shameel16-Jul-11 4:14
professionalShameel16-Jul-11 4:14 
GeneralRe: Browser with advanced tab Pin
ObscureA9216-Jul-11 7:26
ObscureA9216-Jul-11 7:26 
GeneralRe: Browser with advanced tab Pin
Shameel16-Jul-11 8:40
professionalShameel16-Jul-11 8:40 
GeneralRe: Browser with advanced tab Pin
ObscureA9216-Jul-11 12:08
ObscureA9216-Jul-11 12:08 
GeneralRe: Browser with advanced tab Pin
Shameel16-Jul-11 21:01
professionalShameel16-Jul-11 21:01 
Questionthis code Pin
albertodiprima15-Jul-11 5:21
albertodiprima15-Jul-11 5:21 
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' ACD CHEMBASIC DEMO PROGRAM '
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' '
' Molecular 3D Editor//MIRROR.BAS '
' '
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' '
' The utility flips the molecule at a plane '
' '
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''


CONST TITLE="ChemBasic Molecular Editor // Mirror"


'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Function Main As String
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' MIRROR.BAS '
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Dim page,diag,asm,struc As Object, s As String, OK As Boolean

MAIN="Failed or nothing to do!"

' Get 1st structure from the curent page
page=ActiveDocument.ActivePage
If page.Diagrams.Count<1 Then Exit Function
diag=page.Diagrams.Item(1)
asm=Assemblies.AddFromCS(diag)
If asm=NULL Then Exit Function
struc=Asm.Structures.Item(1)
If struc=NULL Then Exit Function

' Do the job
s=UserIOBox("Flip X, Y, or Z coordinate ?" ,TITLE , "Y")
s=UCase(Left(s,1))
If s="X" OR s="Y" OR s="Z" Then
' Flip !
Call Flip(struc,s)
' Show the results
RefreshDiagram(diag,struc)
Main="Completed."
End If

End Function



'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub Flip(struc As Object,s As String)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Dim x,y,z As Double, asm,at As Object
With struc
asm=.Assembly
For Each at In asm
.GetAtomXYZ(at,x,y,z)
Select Case s
Case "X"
x=-x
Case "Y"
y=-y
Case "Z"
z=-z
End Select
.SetAtomXYZ(at,x,y,z)
Next at
End With
End Sub


'***LIBRARY PROCEDURES BEGIN



'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub RefreshDiagram(diag As Object,strmol As Object)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' LIB0.BAS PROCEDURE '
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Redraws the diagram with a molecule or structure object '
' '
' ENTER '
' diag object of type CS_DIAGRAM '
' strmol object of type CB_MOLECULE or CB_STRUCTURE '
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Dim l,t,w,h,w1,h1 As Integer
diag.GetBound(l,t,w,h)
diag.Depict(strmol)
diag.GetBound(w,h,w1,h1)
diag.SetBound(l,t,w1,h1)
End Sub



'***LIBRARY PROCEDURES END

'@@@@@@

someone can help me with this code?!?!?
AnswerRe: this code Pin
Alan N15-Jul-11 6:26
Alan N15-Jul-11 6:26 
AnswerRe: this code Pin
Dr.Walt Fair, PE15-Jul-11 7:26
professionalDr.Walt Fair, PE15-Jul-11 7:26 
GeneralRe: this code Pin
albertodiprima15-Jul-11 8:12
albertodiprima15-Jul-11 8:12 
GeneralRe: this code Pin
Dr.Walt Fair, PE15-Jul-11 8:29
professionalDr.Walt Fair, PE15-Jul-11 8:29 
GeneralRe: this code Pin
albertodiprima15-Jul-11 16:25
albertodiprima15-Jul-11 16:25 
GeneralRe: this code Pin
thatraja15-Jul-11 16:48
professionalthatraja15-Jul-11 16:48 
GeneralRe: this code Pin
Dr.Walt Fair, PE15-Jul-11 17:05
professionalDr.Walt Fair, PE15-Jul-11 17:05 
GeneralRe: this code Pin
albertodiprima18-Jul-11 8:59
albertodiprima18-Jul-11 8:59 
GeneralRe: this code Pin
albertodiprima15-Jul-11 17:25
albertodiprima15-Jul-11 17:25 
GeneralRe: this code Pin
Richard MacCutchan15-Jul-11 22:43
mveRichard MacCutchan15-Jul-11 22:43 
GeneralRe: this code Pin
albertodiprima16-Jul-11 8:14
albertodiprima16-Jul-11 8:14 
GeneralRe: this code Pin
albertodiprima16-Jul-11 8:27
albertodiprima16-Jul-11 8:27 
QuestionPrinting Function on Windows 7 Professional 64-bit not working Pin
Dominick Marciano13-Jul-11 10:58
professionalDominick Marciano13-Jul-11 10:58 
AnswerRe: Printing Function on Windows 7 Professional 64-bit not working Pin
Richard MacCutchan13-Jul-11 22:05
mveRichard MacCutchan13-Jul-11 22:05 
GeneralRe: Printing Function on Windows 7 Professional 64-bit not working Pin
Dominick Marciano27-Jul-11 10:00
professionalDominick Marciano27-Jul-11 10:00 
GeneralRe: Printing Function on Windows 7 Professional 64-bit not working Pin
Richard MacCutchan27-Jul-11 22:07
mveRichard MacCutchan27-Jul-11 22:07 
QuestionDLLs and Compiler Directives Pin
TheComputerMan13-Jul-11 0:46
TheComputerMan13-Jul-11 0:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.