|
|
Sure. Most will allow you to change the form borders. How you do that depends on the library you chose.
|
|
|
|
|
I posted this in quick questions but didn't get any satisfactory response. I'm new here and don't know if it's possible to move my question here so I guess I'm guilty of cross posting. Admin - If you delete, could you delete my other post rather than this one please? Anyway - to my question.
Attempting to read from serail port, XP, admin accnt.
if there are chars in the buffer, then the following throws error: Permission denied, code: 800A0046 on the check of AtEndOfStream.
forRead=1
Set fso = CreateObject("Scripting.FileSystemObject")
Set comObj = fso.OpenTextFile("COM3:9600,N,8,1", for Read)
if not comObj.AtEndOfStream then
msgbox comObj.ReadLine
end if
com.Close
Writing on the other hand works just fine with the following:
forWrite=2
Set fso = CreateObject("Scripting.FileSystemObject")
Set com = fso.OpenTextFile("COM4:9600,N,8,1", forWrite)
com.Write "Hello World"
com.Close
Not sure its relevant but I'm using com0com to connect the two ports (3 & 4)
I should perhaps also add that using the MSCOMM obj in VB6 I can read and write no problem.
Any ideas why the permission denied for the read.
Thanks
modified on Saturday, July 16, 2011 5:42 AM
|
|
|
|
|
Don't cross post. You didn't wait long enough before posting this question yet again.
|
|
|
|
|
Hi Dave - A thousand apologies. I did try to explain that I felt I'd probably posted in the wrong place first. If I could live my life over I'd have posted it here first. I'll hopefully live and learn and try to become a better person (but being the wrong side of 50 I fear it may be too late for me). Please feel free to delete my first post or my second post or both whichever you feel is for the best.
|
|
|
|
|
Can't figure out how to code web browser with advanced tabs. And suggestion?
|
|
|
|
|
What have you tried so far? Where are you stuck?
|
|
|
|
|
I have tried using ToolStrip, but can't seem to get the coding right.
|
|
|
|
|
Well, no one can help you if you are not specific about your problem.
|
|
|
|
|
Nevermind. I found my problem. (: sorry for bothering you.
|
|
|
|
|
That's okay. Care to share your problem and your solution? It might be helpful to others.
|
|
|
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' 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?!?!?
|
|
|
|
|
OK,
So you've found some code on the internet and posted it here but you haven't asked a specific question describing what it is that you want.
Alan.
|
|
|
|
|
What problem are you having with the code? Can you describe an error message? A few hints would be nice.
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
i understand the code but i want develop a chemistry program
|
|
|
|
|
So, do you have a design, specifications, or some idea of what the program should do?
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
in this moment no i hope in your help
|
|
|
|
|
Because we have no clue about your question. Please give us complete details. BTW put your code in Code block in your question which is easy to read.
|
|
|
|
|
Well, if you don't know what the program is supposed to do, I don't think I can figure it out. Let us know what you want it to do and then maybe someone can help figure out how to do it.
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
i hope that someone can help me
|
|
|
|
|
i take this code from the chemistry program chemsketch i waant build a dinamic molecula program
|
|
|
|
|
You have already asked this question in both the ASP.NET and C# forums. Unless you come up with some sensible questions, including an outline design of what you are trying to do, then it's unlikely anyone will be able to help you.
The best things in life are not things.
|
|
|
|
|
|
i play with visual c and visual basic but in thin this moment i played only
|
|
|
|
|
In my software I have a function that creates a word documents, saves it to a folder, and prints out the file. The software is working on every computer, but one employee just got a new computer running Windows 7 Professional 64-bit and now the function isn't working solely on her computer. It still creates the word document fine, but it won't show the print dialog. The function is:
Private Sub CreateRecordDocument(ByVal projectNumber As String)
Dim Report As Document
Dim DocBuilder As DocumentBuilder
Dim PrintDB As New PrintDialog
Dim OriginalPrinter As String
Dim NewPrinter As String
Dim wshNetwork As Object
Dim temporaryFileName As String = ExtractReport(projectNumber)
Dim PSettings As New PrinterSettings
Report = New Document(temporaryFileName, LoadFormat.Doc, "")
DocBuilder = New DocumentBuilder(Report)
ReplaceBookmarks(Report, DocBuilder, projectNumber)
Report.Save(temporaryFileName)
OriginalPrinter = PrintDB.PrinterSettings.PrinterName
If PrintDB.ShowDialog() = Windows.Forms.DialogResult.OK Then
PSettings = PrintDB.PrinterSettings
NewPrinter = PrintDB.PrinterSettings.PrinterName
wshNetwork = Microsoft.VisualBasic.CreateObject("WScript.Network")
wshNetwork.SetDefaultPrinter(NewPrinter)
Report.Print(PSettings)
wshNetwork.setDefaultPrinter(OriginalPrinter)
End If
End Sub
Originally I was thinking it wasn't working because of the CreateObject("WScript.Network") but it still should be showing the print dialog and it's not even doing that. Anybody else ever have a problem with the print dialog on Win7 Professional? Any suggestions on how to get this to work on this computer without affecting how it works on XP Professional computers? Thanks in advance for any help with this. It is much appreciated.
|
|
|
|
|