Displayin File Contents On My Form
Here is my .DAT file. ===========STOCKS.DAT=================== VERIZON,200,12/4/84,18 3/4, 51 1/4 GMAC, 600, 4/16/85, 61 5/8, 47 1/2 VITECH, 300, 8/8/85, 129 1/4, 103 5/8 CORE, 400, 11/16/85, 56 5/8, 50 1/8 RTM, 100, 3/1/86, 52 1/4, 83 7/8 ========================================
When i hit my display button. I get error 62 "Input past end of file" Please help me. I have my code below
============================================= End Sub
Private Sub DisplayStock_Click() ': ':This routine displays the information in the file STOCKS.DAT ':when the user clikcs on a "Display Stocks" command button CSV = "," EmptyStr = "" + " " + " " + " " + " " Dim Stock As String Dim NumShares As Integer, DatePurchased As String, PurchasePrice As String, CurrentPrice As String Dim Info(1000) As String Dim count As Integer Dim buffer As String Dim title As String Dim uscore As String FileNum = FreeFile 'Open "C:Documents and SettingsysakaDesktopStockProjectSTOCKS.DAT" For Input As #FileNum Open App.Path & "STOCKS.DAT" For Input As #FileNum ': count = 0 ': DisplayStock_LB.AddItem title DisplayStock_LB.AddItem uscore While Not EOF(FileNum) Input #FileNum, Stock, NumShares, DatePurchased, PurchasePrice, CurrentPrice buffer = Stock & "," & EmptyStr & NumShares & "," & EmptyStr & EmptyStr & DatePurchased & "," & EmptyStr & EmptyStr & EmptyStr & EmptyStr & PurchasePrice & "," & EmptyStr & EmptyStr & EmptyStr & EmptyStr & EmptyStr & CurrentPrice DisplayStock_LB.AddItem buffer count = count + 1 Wend 'DisplayStock_LB.AddItem " " Close #FileNum ': End Sub
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
EXPORT Contents Of Textbox To A .txt File && IMPORT A .txt File Onto A Form?
I have searched the forums high and low and cannot find something to match my description - maybe it is not general enough...
I am sorry if this is in the wrong section but I am classing this as "Reporting", and I believe although its based around textboxes I MAY still need to write to the database, depending on your answer(s)...
So here goes:
My problem is...
I have a form which I must EXPORT the contents of to a .txt file (alternatively, maybe I could also Export it to a Word .doc file, or maybe give the user a choice? I don't know yet)...
I have a form with the following layout:
(Start of form)
REPORTID: (user fills in a value into txtReportID textbox here)
USERID: (user fills in their UserID into a txtUserID textbox here)
DETAILS: (user fills in details of the report into a big textbox txtDetails here eg. textbox has around 50 lines of space)*
SAVEFILENAME: (textbox txtSaveFileName where user can specify filename to save this report to)**
[also 2 buttons at the bottom of the form - IMPORT and EXPORT]
(End of form)
*NOTE DETAILS: If in the Details textbox the user should use any special formatting eg. Leave a line space and then start typing a new paragraph, I do not want to lose this formatting - which is why I believe I need to export to a .txt or .doc rather than save to a field in the database, but maybe I am wrong?
**NOTE SAVEFILENAME: The database and .txt files will be held on a central server, therefore the user will simply enter a filename (eg. REPORT001.txt) and it will be saved to the default directory on the server.
When the data has been entered, I wish the user to press the EXPORT button, and this will EXPORT the data that the user has entered in the above mentioned fields to a .txt file (or a Word .doc file).
Any user should then later be able to press the IMPORT button, select the previously created textfile REPORT001.txt, and the data held in REPORT001.txt will then be mapped onto the appropriate fields of the form.
Maybe I am getting too complicated with this I am not sure?
Can anyone help me out or guide me in the right direction on how to do this?
Thanks in advance for any suggestions
Display File Contents On A VB6 Form
Hi,
How can I make a form with a powerpoint show embeded in it, like a picture.
I do not want it to open powerpoint or run the slide show in full screen. Is this possible.
Regards, Matt
Why I Can't Save The Contents Of The Form Into Bmp File?
I have some controls on the form, and once the user clicks " SAVE " button on the form, the contents of the form should be saved into a bmp file. it's like this
private sub cmdsave_click()
form1.autoredraw=true
savepicture form1.image, "c: est1.bmp"
end sub
but it doesn't work, it only saves the empty background to the bmp file. Does anybody know what might be wrong?
Thank you very much!
Save Both Form And Its Contents As A .bmp File
Hi,
Can you please tell me how can I save the form and its contents as a .bmp file. The contents of the form are ActiveX controls.
Basically it should work more or less like PrintScreen.
Thanks
Even Impossible says I'm possible
Write Text File Contents To Form W VBA
Hi
using xl if a particular cell has contents i want moved to a web form the code might look like this:
Code:
Sub toweb2()
Set ie = CreateObject("InternetExplorer.Application")
With ie
.Visible = True
.Navigate "http://slmap.hostingweb.us/t.htm"
Do Until .readyState = 4
DoEvents
Loop
.Document.All.Body.Value = Range("a1").Text
End With
End Sub
but let's say i have a text file, C:
otes.txt, and instead of referencing the cell for the text to go to the form, i want to reference the text file instead, as in:
Code:
Sub toweb2()
Set ie = CreateObject("InternetExplorer.Application")
With ie
.Visible = True
.Navigate "http://slmap.hostingweb.us/t.htm"
Do Until .readyState = 4
DoEvents
Loop
.Document.All.Body.Value = File("C:
otes.txt").Text
' or
'
' .Document.All.Body.Value = ' C:
otes.txt
'
' etc
End With
End Sub
i have been trying to figure this out for a few days and can't figure it out. it is probably a very simple bit of code.
thanks
tx
Place Contents Of Text File Into HTML Form Field W/VB
Hi
Lets say i navigate to 'xyz.com', and xyz.com has a form. one of the form fields is named 'notes'
so lets say (w/VB code) after firing up explorer and navigating to the page where the form is I have this line of code:
VB Code:
Set 1a = .document.getelementbyid("notes")1a.Value = ' the text in C:
otes.txt)'
what is the code to write on the other side of '1a.Value =' where the contents of a text file can be sent to the form field?
thanks
tx
Displayin Backwards
i remember something relating to this, but my triangles are being drawn backwards,
Cube(0) = CreateLitVertex(0.33, 0.99, DFC, C011, 0, 0, 0)
Cube(1) = CreateLitVertex(0.99, 0.99, DFC, C111, 0, 0, 0)
Cube(2) = CreateLitVertex(0.33, 0.33, DFC, C001, 0, 0, 0)
Cube(3) = CreateLitVertex(0.99, 0.99, DFC, C111, 0, 0, 0)
Cube(4) = CreateLitVertex(0.33, 0.33, DFC, C001, 0, 0, 0)
Cube(5) = CreateLitVertex(0.99, 0.33, DFC, C101, 0, 0, 0)
then if i increse the X, it'll expand to the left
D3DXMatrixLookAtLH matView, MakeVector(0, 5, 9), MakeVector(0, 0, 0), MakeVector(0, 1, 0)
D3DDevice.SetTransform D3DTS_VIEW, matView
but if i change the View to like 0 4 0 and looking at 0 0 0 i cant see my square ;[
any suggestions?
Displayin Of Data
Private Sub Form_Load()
Dim Connection As New ADODB.Connection
I wan to display data from e as400 server onto e datagrid can any1 help mi?
Dim Records As New ADODB.Recordset
Connection.CursorLocation = adUseClient
Connection.Open "Provider=IBMDA400;" + "Data Source=AS400_test" <- debugger say tis line errorr?
Records.Open "SMODDTATES_SISTFL12T", Connection, adOpenStatic, adLockOptimistic, adCmdTable
Set DataGrid1.DataSource = Records
End Sub
My table name is SMODDTATES_SISTFL12T
Colunm needed is SIBRND, SICODE, SIGRP, SISIST
Displayin Of Data
Private Sub Form_Load()
Dim Connection As New ADODB.Connection
I wan to display data from e as400 server onto e datagrid can any1 help mi?
Dim Records As New ADODB.Recordset
Connection.CursorLocation = adUseClient
Connection.Open "Provider=IBMDA400;" + "Data Source=AS400_test" <- debugger say tis line errorr?
Records.Open "SMODDTATES_SISTFL12T", Connection, adOpenStatic, adLockOptimistic, adCmdTable
Set DataGrid1.DataSource = Records
End Sub
My table name is SMODDTATES_SISTFL12T
Colunm needed is SIBRND, SICODE, SIGRP, SISIST
Displayin Database Values
Ive got all the functions workin of my database program. Only problem is when it loads the database it doesn't show the data...
Heres my function so far
Code:
Public Function Load_Database()
On Error GoTo error
Set ws = DBEngine.Workspaces(0)
'Database Path
Set db = ws.OpenDatabase(App.Path & "WarOfConquest.mdb")
'Select Table
If Combo1.Text = "Table" Then
'Checks to see if a table has been chosen
MsgBox "A database table needs to be choosen", vbCritical, "Database Error"
Exit Function
Else
'Opens database table depending on which 1 is selected
Set rs = db.OpenRecordset(Combo1.Text, dbOpenTable)
End If
Exit Function
error:
MsgBox "Database Cannot be Loaded", vbCritical, "Database Error"
Exit Function
End Function
Displayin Array Values In A Combo Box
How do i get the product id from this array to be displayed in the combo box??
Option Explicit
Dim arrProductinfo(1 To 12) As Productinfo
Private Sub cmdItem_Click()
Dim Productinfo As Integer
Dim ProductID As Integer
Dim ProductName As Integer
Dim ProductDescription As Integer
Dim ProductPrice As Currency
iarrProductinfo(1).ProductID = 1
iarrProductinfo(1).ProductName = "Cd Player One"
iarrProductinfo(1).ProductDescription = "Cd Player with radio"
iarrProductinfo(1).ProductPrice = 79.99
iarrProductinfo(2).ProductID = 2
iarrProductinfo(2).ProductName = "Cd player Two"
iarrProductinfo(2).ProductDescription = "Portable Cd Player"
iarrProductinfo(2).ProductPrice = 69.99
'will continue this done to 12
End Sub[code]
Displayin Previous Forms Combo Box Valuez
Hi frenz!
In form1 i have 2 combo boxes.The user will select any value from the 2 different dropdown combo boxes.
Now,in form2 i want that both these combobox values are displayed in 1 combo box only separated by a '-'.
R u able to get me?
Help!
Thnx!
Combo Boxes Displayin Array? Plus Problem
Im trying to use a combo box to display a few values from the arrray to show in the combo box so the user can select one click a button and the array be shown in a picture box
Form Contents
hi,
I have developed a application using VB 6.0. It takes quite a while to finish so when switch between windows (using Alt+Tab) I am unable to see content on the application form, which is still executing. What could be the problem...
Thanks in advance...
cheers,
Sachin
Advice Sought - Using A DB To Store File Contents Vs Reading Text File Straight Into VB
Hello -
I have an approx 300 line comma separated and hierachically arranged text file and am currently duplicating the comma separated bits into various Access database tables and reading it into VB from there. I'm not too keen on duplicating the info and am looking for a neat way to either parse the original file straight into my VB GUI's memory space or some how tokenise the file. I know that this can be done with lex/yacc and c++ and am wondering what the best VB route to go down would be.
Any advice would be gratefully received!!!
Thanks,
Mairi
Reading Lines From Input File And Output Contents To New File
TO All VB Programmers
can anyone show me how to add header lines to a existing output file by reading it from an input file.
the program goes like this
1. Read through the master file and located the 52 header lines and the line that contains V4_PL1.
2. Once header and line is located, open and print to another output file the line that starts with the header and that start's with V4_PL1 and all the contents below it till it reaches line that contains "Manual" character.
3. Then output file that contains line from V4_PL1 to Manual (inclusive) is closed and created in a directory. (eg. PL1.scr)
4. Close master file.
5. Open master file again to locate and read line that contains the header lines and the subsequent line that contains V5_PL2 till the next line that contains "MANUAL" character.
6. Create a new output file( eg. PL2.scr) and put the contents capture in No. 5 into it and file is closed.
7. This output file creation for each Pull line station (PL) is repeated till end of master file. (eg. PL3, PL4....)
extract of master/input file and output file.
master file
;AutoCAD script generated on 4/27/2004 11:28:07 AM
;Product Name:
LIMITS -1,-1 25,25
ZOOM ALL
LAYER MAKE BORDER
LAYER SET BORDER
COLOR WHITE
RECTANG 0,0 16.5,10.25
RECTANG 14.5,9.25 16.5,10.25
RECTANG 0,0 4,0.5
RECTANG 4,0 9.25,0.5
RECTANG 9.25,0 11.75,0.5
RECTANG 11.75,0 13.5,0.5
RECTANG 13.5,0 15,0.5
RECTANG 15,0 15.75,0.5
RECTANG 15.75,0 16.5,0.5
TEXT 14.78,9.4 0.1 20.00000 DOC CONTROL STAMP
TEXT 0.05,0.15 0.1 0.00000
TEXT J C 6.625,0.3 0.1 0.00000 AREA
TEXT J C 10.5,0.3 0.1 0.00000 PRODUCT FAMILY
TEXT J C 12.625,0.3 0.1 0.00000 PBA NUMBER
TEXT J C 14.25,0.3 0.1 0.00000 DOC. TRACKING #
TEXT J C 15.375,0.3 0.1 0.00000 PAGE
TEXT J C 16.125,0.3 0.1 0.00000 ISSUE
TEXT J C 16.125,0.075 0.100 0 1
COLOR GREEN
TEXT J C 12.625,0.075 0.100 0
TEXT J C 10.500,0.075 0.100 0
TEXT J C 14.25,0.075 0.100 0 N/A
ZOOM EXTENTS
COLOR WHITE
RECTANG 12.25,2.5 13.75,2.75
RECTANG 13.75,2.5 15,2.75
RECTANG 15,2.5 16.25,2.75
RECTANG 12.25,2.75 13.75,3
RECTANG 13.75,2.75 15,3
RECTANG 15,2.75 16.25,3
RECTANG 12.25,3 13.75,3.25
RECTANG 13.75,3 15,3.25
RECTANG 15,3 16.25,3.25
RECTANG 12.25,3.25 13.75,3.65
RECTANG 13.75,3.25 15,3.65
RECTANG 15,3.25 16.25,3.65
TEXT J C 13,3.36 0.1 0.00000 PRODUCT CODE
TEXT J C 14.375,3.36 0.1 0.00000 AA NUMBER
TEXT J C 15.625,3.36 0.1 0.00000 PBA NUMBER
COLOR RED
RECTANG 12.17,2.42 16.33,3.73
COLOR GREEN
TEXT J C 13,3.075 0.100 0 BE
TEXT J C 14.375,3.075 0.100 0 C39561-102
TEXT J C 15.625,3.075 0.100 0
LAYER MAKE V4_PL1
LAYER MAKE V4_PL1_Silk
LAYER SET V4_PL1
COLOR WHITE
LAYER OFF BORDER
LAYER SET V4_PL1
LAYER MAKE V4_PL1
LAYER MAKE V4_PL1_Silk
LAYER SET V4_PL1
COLOR BLUE
; C3C3
CIRCLE 7.00687,7.70815 0.07668
COLOR WHITE
TEXT J C 6.625,0.075 0.100 0 Manual Pull Line Station 1
TEXT J C 15.375,0.075 0.100 0 V4
LAYER ON BORDER
LAYER SET BORDER
LAYER OFF V4_PL1
LAYER OFF V4_PL1
LAYER OFF V4_PL1_Silk
output file
AutoCAD script generated on 4/27/2004 11:28:07 AM
;Product Name:
LIMITS -1,-1 25,25
ZOOM ALL
LAYER MAKE BORDER
LAYER SET BORDER
COLOR WHITE
RECTANG 0,0 16.5,10.25
RECTANG 14.5,9.25 16.5,10.25
RECTANG 0,0 4,0.5
RECTANG 4,0 9.25,0.5
RECTANG 9.25,0 11.75,0.5
RECTANG 11.75,0 13.5,0.5
RECTANG 13.5,0 15,0.5
RECTANG 15,0 15.75,0.5
RECTANG 15.75,0 16.5,0.5
TEXT 14.78,9.4 0.1 20.00000 DOC CONTROL STAMP
TEXT 0.05,0.15 0.1 0.00000
TEXT J C 6.625,0.3 0.1 0.00000 AREA
TEXT J C 10.5,0.3 0.1 0.00000 PRODUCT FAMILY
TEXT J C 12.625,0.3 0.1 0.00000 PBA NUMBER
TEXT J C 14.25,0.3 0.1 0.00000 DOC. TRACKING #
TEXT J C 15.375,0.3 0.1 0.00000 PAGE
TEXT J C 16.125,0.3 0.1 0.00000 ISSUE
TEXT J C 16.125,0.075 0.100 0 1
COLOR GREEN
TEXT J C 12.625,0.075 0.100 0
TEXT J C 10.500,0.075 0.100 0
TEXT J C 14.25,0.075 0.100 0 N/A
ZOOM EXTENTS
COLOR WHITE
RECTANG 12.25,2.5 13.75,2.75
RECTANG 13.75,2.5 15,2.75
RECTANG 15,2.5 16.25,2.75
RECTANG 12.25,2.75 13.75,3
RECTANG 13.75,2.75 15,3
RECTANG 15,2.75 16.25,3
RECTANG 12.25,3 13.75,3.25
RECTANG 13.75,3 15,3.25
RECTANG 15,3 16.25,3.25
RECTANG 12.25,3.25 13.75,3.65
RECTANG 13.75,3.25 15,3.65
RECTANG 15,3.25 16.25,3.65
TEXT J C 13,3.36 0.1 0.00000 PRODUCT CODE
TEXT J C 14.375,3.36 0.1 0.00000 AA NUMBER
TEXT J C 15.625,3.36 0.1 0.00000 PBA NUMBER
COLOR RED
RECTANG 12.17,2.42 16.33,3.73
COLOR GREEN
TEXT J C 13,3.075 0.100 0 BE
TEXT J C 14.375,3.075 0.100 0 C39561-102
TEXT J C 15.625,3.075 0.100 0
LAYER MAKE V4_PL1
LAYER MAKE V4_PL1_Silk
LAYER SET V4_PL1
COLOR WHITE
LAYER OFF BORDER
LAYER SET V4_PL1
LAYER MAKE V4_PL1
LAYER MAKE V4_PL1_Silk
LAYER SET V4_PL1
COLOR BLUE
; C3C3
CIRCLE 7.00687,7.70815 0.07668
COLOR WHITE
TEXT J C 6.625,0.075 0.100 0 Manual Pull Line Station 1
this is the unfinished script which i hope someone can HELP!
QUestion : How can i add the 52 header lines into the script
Dim iPlNum As Integer ' integer to hold the current pull line number
Dim smaster As String ' string to hold the master file name
Dim sOutputdata As String ' string to hold the output data
Dim iFileNum As Integer ' integer to hold the master file number
Dim iOutFile As Integer ' integer to hold the output file number
Dim sRawData As String ' string to hold the raw data read from the master file
Dim sLookFor As String ' string to hold the value we're looking for
Dim bOutput As Boolean ' flag to determine if we're within a pl block
'smaster gets set by your prog.
'this function assumes that soutput and smaster are set already
smaster = "c: estmaster.txt"
sOutfile = "c:PL"
bOutput = False
iPlNum = 1
iFileNum = FreeFile
Open smaster For Input As iFileNum
Do While Not EOF(iFileNum) ' keep doing till end of file
Line Input #iFileNum, sRawData 'get line of data
sLookFor = "V4_PL" & iPlNum 'set the pl we're looking for
sRawData = UCase(sRawData) 'convert to uppercase - just because I find it better for string searches
If Not bOutput Then 'if we're not capturing the data for output already
If InStr(sRawData, sLookFor) > 0 Then 'check and see if the pl number is in the line
bOutput = True 'it is, so start capturing to the output variable
sOutputdata = sRawData & vbCrLf
End If
Else ' we're in output capture mode
If InStr(sRawData, "MANUAL") < 1 Then 'if the line doesn't contain the MANUAL keyword
sOutputdata = sOutputdata & sRawData & vbCrLf 'add it to our output variable
Else ' the line contains the MANUAL keyword
bOutput = False ' stop capturing to the output variable
iOutFile = FreeFile
sOutputdata = sOutputdata & sRawData 'add the last line to the output variable
Open sOutfile & iPlNum & ".scr" For Output As iOutFile 'open the output file
Print #iOutFile, sOutputdata 'save the output data to the file
Close iOutFile 'close the file
sOutputdata = "" 'reset the output data to nothing
iPlNum = iPlNum + 1 'add 1 to the pl number to continue searching
End If
End If
Loop ' do it again
Close iFileNum 'close the file
Thanks a million
After Using (Drive,Dir,File) Controls, How To Display Selected File Contents?
Hi, I have figured out how to take the following controls (Drive,Dir,File), place'em each in form then use DriveListBox to select a drive, from there use DirListBox and select a folder, from there go to FileListBox and select a file from that folder ... finally pressing a command button (cmdDisplayPathName) to display the complete pathname in (picDisplayPathName). All work fine. Here's what I want to do next:
Press another command button (cmdDisplayFileContents) to display the selected files' contents into a textbox (txtDisplayFileContents).
My code so far:
Code:
Private Sub DriveListBox_Change()
'This is the Drive List Box control
DirectoryListBox.Path = DriveListBox.Drive
End Sub
Private Sub DirectoryListBox_Change()
'This is the Directory List Box control
FileListBox.Path = DirectoryListBox.Path
End Sub
Private Sub FileListBox_Click()
'This is the File List Box control
End Sub
Private Sub cmdDisplayPathName_Click()
'When button is pressed, complete path displays
picDisplayPathName.Cls
picDisplayPathName.Print DirectoryListBox.Path;
If Right(DirectoryListBox.Path, 1) <> "" Then
picDisplayPathName.Print "";
End If
picDisplayPathName.Print FileListBox.FileName
End Sub
Private Sub picDisplayPathName_Click()
'Displays the complete pathname of selected file.
End Sub
Private Sub cmdDisplayFileContents_Click()
'When this button is pressed, the selected files' contents display into "txtDisplayFileCont.text"
** This is where I do not know how to code, tried a couple hokey ways, was totally incorrect.
** Need help in this area.
...........
Else
'Error message
MsgBox "Unable to display contents."
End If
End Sub
Private Sub txtDisplayFileContents_Change()
'Displays the contents of selected file.
End Sub
Three Questions
(1) What do I code in the 'cmdDisplayFileContents_Click()' portion in the above code?
(2) Once coded I know displaying a textfile is easy and will show up in textbox (txtDisplayFileContents), but what about other file types? Does a viewer of some sort need to be used to show file contents if not a straight text file? --- If so, how is this coded/implemented?
(3) In using (Drive,Dir,File) to browse around and select a file, I end up with three separate controls on the form ... is there now a shortcut (one control?) somewhere that can do the same thing? If so, what is it?
Thank you for any help and direction(s).
~ Juanita
Reading Lines From Input File And Output Contents To New File
TO All VB Programmers
can anyone show me how to add header lines to a existing output file by reading it from an input file.
the program goes like this
1. Read through the master file and located the 52 header lines and the line that contains V4_PL1.
2. Once header and line is located, open and print to another output file the line that starts with the header and that start's with V4_PL1 and all the contents below it till it reaches line that contains "Manual" character.
3. Then output file that contains line from V4_PL1 to Manual (inclusive) is closed and created in a directory. (eg. PL1.scr)
4. Close master file.
5. Open master file again to locate and read line that contains the header lines and the subsequent line that contains V5_PL2 till the next line that contains "MANUAL" character.
6. Create a new output file( eg. PL2.scr) and put the contents capture in No. 5 into it and file is closed.
7. This output file creation for each Pull line station (PL) is repeated till end of master file. (eg. PL3, PL4....)
extract of master/input file and output file.
master file
;AutoCAD script generated on 4/27/2004 11:28:07 AM
;Product Name:
LIMITS -1,-1 25,25
ZOOM ALL
LAYER MAKE BORDER
LAYER SET BORDER
COLOR WHITE
RECTANG 0,0 16.5,10.25
RECTANG 14.5,9.25 16.5,10.25
RECTANG 0,0 4,0.5
RECTANG 4,0 9.25,0.5
RECTANG 9.25,0 11.75,0.5
RECTANG 11.75,0 13.5,0.5
RECTANG 13.5,0 15,0.5
RECTANG 15,0 15.75,0.5
RECTANG 15.75,0 16.5,0.5
TEXT 14.78,9.4 0.1 20.00000 DOC CONTROL STAMP
TEXT 0.05,0.15 0.1 0.00000
TEXT J C 6.625,0.3 0.1 0.00000 AREA
TEXT J C 10.5,0.3 0.1 0.00000 PRODUCT FAMILY
TEXT J C 12.625,0.3 0.1 0.00000 PBA NUMBER
TEXT J C 14.25,0.3 0.1 0.00000 DOC. TRACKING #
TEXT J C 15.375,0.3 0.1 0.00000 PAGE
TEXT J C 16.125,0.3 0.1 0.00000 ISSUE
TEXT J C 16.125,0.075 0.100 0 1
COLOR GREEN
TEXT J C 12.625,0.075 0.100 0
TEXT J C 10.500,0.075 0.100 0
TEXT J C 14.25,0.075 0.100 0 N/A
ZOOM EXTENTS
COLOR WHITE
RECTANG 12.25,2.5 13.75,2.75
RECTANG 13.75,2.5 15,2.75
RECTANG 15,2.5 16.25,2.75
RECTANG 12.25,2.75 13.75,3
RECTANG 13.75,2.75 15,3
RECTANG 15,2.75 16.25,3
RECTANG 12.25,3 13.75,3.25
RECTANG 13.75,3 15,3.25
RECTANG 15,3 16.25,3.25
RECTANG 12.25,3.25 13.75,3.65
RECTANG 13.75,3.25 15,3.65
RECTANG 15,3.25 16.25,3.65
TEXT J C 13,3.36 0.1 0.00000 PRODUCT CODE
TEXT J C 14.375,3.36 0.1 0.00000 AA NUMBER
TEXT J C 15.625,3.36 0.1 0.00000 PBA NUMBER
COLOR RED
RECTANG 12.17,2.42 16.33,3.73
COLOR GREEN
TEXT J C 13,3.075 0.100 0 BE
TEXT J C 14.375,3.075 0.100 0 C39561-102
TEXT J C 15.625,3.075 0.100 0
LAYER MAKE V4_PL1
LAYER MAKE V4_PL1_Silk
LAYER SET V4_PL1
COLOR WHITE
LAYER OFF BORDER
LAYER SET V4_PL1
LAYER MAKE V4_PL1
LAYER MAKE V4_PL1_Silk
LAYER SET V4_PL1
COLOR BLUE
; C3C3
CIRCLE 7.00687,7.70815 0.07668
COLOR WHITE
TEXT J C 6.625,0.075 0.100 0 Manual Pull Line Station 1
TEXT J C 15.375,0.075 0.100 0 V4
LAYER ON BORDER
LAYER SET BORDER
LAYER OFF V4_PL1
LAYER OFF V4_PL1
LAYER OFF V4_PL1_Silk
output file
AutoCAD script generated on 4/27/2004 11:28:07 AM
;Product Name:
LIMITS -1,-1 25,25
ZOOM ALL
LAYER MAKE BORDER
LAYER SET BORDER
COLOR WHITE
RECTANG 0,0 16.5,10.25
RECTANG 14.5,9.25 16.5,10.25
RECTANG 0,0 4,0.5
RECTANG 4,0 9.25,0.5
RECTANG 9.25,0 11.75,0.5
RECTANG 11.75,0 13.5,0.5
RECTANG 13.5,0 15,0.5
RECTANG 15,0 15.75,0.5
RECTANG 15.75,0 16.5,0.5
TEXT 14.78,9.4 0.1 20.00000 DOC CONTROL STAMP
TEXT 0.05,0.15 0.1 0.00000
TEXT J C 6.625,0.3 0.1 0.00000 AREA
TEXT J C 10.5,0.3 0.1 0.00000 PRODUCT FAMILY
TEXT J C 12.625,0.3 0.1 0.00000 PBA NUMBER
TEXT J C 14.25,0.3 0.1 0.00000 DOC. TRACKING #
TEXT J C 15.375,0.3 0.1 0.00000 PAGE
TEXT J C 16.125,0.3 0.1 0.00000 ISSUE
TEXT J C 16.125,0.075 0.100 0 1
COLOR GREEN
TEXT J C 12.625,0.075 0.100 0
TEXT J C 10.500,0.075 0.100 0
TEXT J C 14.25,0.075 0.100 0 N/A
ZOOM EXTENTS
COLOR WHITE
RECTANG 12.25,2.5 13.75,2.75
RECTANG 13.75,2.5 15,2.75
RECTANG 15,2.5 16.25,2.75
RECTANG 12.25,2.75 13.75,3
RECTANG 13.75,2.75 15,3
RECTANG 15,2.75 16.25,3
RECTANG 12.25,3 13.75,3.25
RECTANG 13.75,3 15,3.25
RECTANG 15,3 16.25,3.25
RECTANG 12.25,3.25 13.75,3.65
RECTANG 13.75,3.25 15,3.65
RECTANG 15,3.25 16.25,3.65
TEXT J C 13,3.36 0.1 0.00000 PRODUCT CODE
TEXT J C 14.375,3.36 0.1 0.00000 AA NUMBER
TEXT J C 15.625,3.36 0.1 0.00000 PBA NUMBER
COLOR RED
RECTANG 12.17,2.42 16.33,3.73
COLOR GREEN
TEXT J C 13,3.075 0.100 0 BE
TEXT J C 14.375,3.075 0.100 0 C39561-102
TEXT J C 15.625,3.075 0.100 0
LAYER MAKE V4_PL1
LAYER MAKE V4_PL1_Silk
LAYER SET V4_PL1
COLOR WHITE
LAYER OFF BORDER
LAYER SET V4_PL1
LAYER MAKE V4_PL1
LAYER MAKE V4_PL1_Silk
LAYER SET V4_PL1
COLOR BLUE
; C3C3
CIRCLE 7.00687,7.70815 0.07668
COLOR WHITE
TEXT J C 6.625,0.075 0.100 0 Manual Pull Line Station 1
this is the unfinished script which i hope someone can HELP!
QUestion : How can i add the 52 header lines into the script
Dim iPlNum As Integer ' integer to hold the current pull line number
Dim smaster As String ' string to hold the master file name
Dim sOutputdata As String ' string to hold the output data
Dim iFileNum As Integer ' integer to hold the master file number
Dim iOutFile As Integer ' integer to hold the output file number
Dim sRawData As String ' string to hold the raw data read from the master file
Dim sLookFor As String ' string to hold the value we're looking for
Dim bOutput As Boolean ' flag to determine if we're within a pl block
'smaster gets set by your prog.
'this function assumes that soutput and smaster are set already
smaster = "c: estmaster.txt"
sOutfile = "c:PL"
bOutput = False
iPlNum = 1
iFileNum = FreeFile
Open smaster For Input As iFileNum
Do While Not EOF(iFileNum) ' keep doing till end of file
Line Input #iFileNum, sRawData 'get line of data
sLookFor = "V4_PL" & iPlNum 'set the pl we're looking for
sRawData = UCase(sRawData) 'convert to uppercase - just because I find it better for string searches
If Not bOutput Then 'if we're not capturing the data for output already
If InStr(sRawData, sLookFor) > 0 Then 'check and see if the pl number is in the line
bOutput = True 'it is, so start capturing to the output variable
sOutputdata = sRawData & vbCrLf
End If
Else ' we're in output capture mode
If InStr(sRawData, "MANUAL") < 1 Then 'if the line doesn't contain the MANUAL keyword
sOutputdata = sOutputdata & sRawData & vbCrLf 'add it to our output variable
Else ' the line contains the MANUAL keyword
bOutput = False ' stop capturing to the output variable
iOutFile = FreeFile
sOutputdata = sOutputdata & sRawData 'add the last line to the output variable
Open sOutfile & iPlNum & ".scr" For Output As iOutFile 'open the output file
Print #iOutFile, sOutputdata 'save the output data to the file
Close iOutFile 'close the file
sOutputdata = "" 'reset the output data to nothing
iPlNum = iPlNum + 1 'add 1 to the pl number to continue searching
End If
End If
Loop ' do it again
Close iFileNum 'close the file
Thanks a million
Printing Contents Of A Form
I have a form in which I have set out a layout of a sort of invoice type thing. I want to be able to print all the labels and shapes, etc.
Is this possible? Or will I have to do it all manually?
Print The Contents Of A Form
hi..
i have few textbox arranged in a form...
just like a bill..!! i want to print the contents of those
textbox...!!! i don't have any idea abt that...
this is the structure...
label1 text1
label2 text2
label3 text3
i want the contents.... to be printed out in the same location...!!
is this possible.... ( may be i am crazyyyyy...)
please help...
Printing Form Contents
I've searched the forums and haven't really found anything that helps me. I have a form that has controls showing and some that are off the form that I have to scroll to see (like a word document that you scroll vertically). Is there anyway I can get it to print the entire form, not just the stuff that's physically showing on it at the moment? It prints landscape and I would also like to know if I can make it automatically continue to print to another page if it doesn't fit on just 1 page.
Another thing, I've never used VB Script but I was wondering if VB6 and VBScript work alike? For instance, if I can't print the entire form in VB6 is there a way I can send the code to IE to show the controls that way it would print the entire page?
How To Clear Form Of Contents
I have 5 checkboxes, I've already set it so if one is unticked then all its data will reset, but I want to have a command button that will clear the form,
In other words the command button will make all checkboxes unticked or reset
Printing The Contents Of A Form
Hi Guys
I would like to print out a form. I dont want to print all the controls just the values in the text boxes and label controls. Does anyone know how to do this.
PrintForm basicly takes a screenshot of the whole form.
Print Form Contents To PDF
I have a form that is mostly labels and textboxes and lines.
On it I also have 4 pictures and two MSHFlexgrids.
At the moment I can print the form to CutePDF writer which comes out to around 67kB.
I want to automatically print the forms image a pdf whenever someone saves the form so they will end up with a document file and a PDF file in the same directory.
I have managed to capture the form's image to a bmp (which is too large) then convert it to a jpg (which is a LOT smaller) then print that to a pdf but at around 200kb I think that that is still too large for a single page. Also to get this size I'm looking at a fairly poor quality output when compared to what CutePDF writer produces.
I'd like to try to write most of the form contents (which is just text) to the pdf as text rather than an image and insert the pictures it would drastically reduce the file size.
This is the PDF writer I have used inside my app.
Can anyone suggest a way of cycling through all my label and textbox controls and writing the contents to the pdf with the same locations as they are on the form.
The command for writing to the PDF file is
PDFPrinter.PDFTextOut "Hello World", 15, 40
The last two numbers are x and y coordinates
Printing Contents Of A Form
hi everyone, i have a form (atached) and it contains an image box that contains a metafile. i want to print the form including the image. i need help on this one. i tried form.printform but it failed. would it also be possible to save a bitmap image of the form?
thanks.
How To Print Contents Of Form
Hii
as i save the details of the form i would like to have a print out of the data, that i am saving and the Titles before them but not the buttons and the combo boxe's, textboxe's, etc.
is it possible
Convert Form Contents To A Jpg Pic
Hi all,
How r u all?
i have a form in it a Picture box and in the picture box there are frames and other picture boxes
how can i copy all what in the main picture box and convert it to a jpg pic
Save Contents Of A VB Form
Hi,
Iam working on an App which extensively uses Vb forms.Basically each form is like a display transaction wherein user enters some data and there is corresponding output.I would like to know is there anyway this output (form display as it is)could be saved to a notepad/word/excel doc ????
Iam really banking on ur replies.
with rgds
Rajasekhar
Printing Form Contents!!
Hi,
i have to print the contents of a form in vb6. The form contains say some labels as well as msflex grid. how can i do this.everything in the form need to be printed. if any one have a solution for this plz help me at the earliest as its really urgent. if u've any code plz include that also.
thanx in advance
ameena.
Read .txt Contents To Form
Assuming the .txt file is named c:TextFile.txt and you have a textbox on your form named Text1:
VB Code:
Dim FileNum As IntegerDim FileContent as string FileNum = FreeFileOpen "c:TextFile.txt" For Input As #FileNumInput #FileNum, FileContentClose #FileNum Text1.Text = FileContent
Scaling Form Contents
My form has the Maximize/minimize properties set. When I actually
maximize the form, the form itself maximizes, but the objects
on the form retain the original size. I do not see a property to
make the objects scale to the form size. Wht do I have to do
to get this to work?
Thanks
Tom
Form Contents To HTML?
Say that you have 4 textboxes on a form.
you want to take the text value of each text box and then input that data into a HTML.
You also need to have the value of Text1.Text, to be the name of the HTML page?
Anyone know how to do this?
How Do I Print The Contents Of A VB6 Form
Hi ,
i am doing a project in VB6 and access for a manufactturing industry, i have accomplished all the major reports in Vb data reports. but now the customer wants graphs to be shown which are not posssible in Vb datareports. so i plan to use the Microsoft charrt control to show the graphs on the forms but the problem is how do i print the graph from the form , if i ask him to use the print screen option then the whole form will be printed i want only the graph to be printed, is it possible, ifyes what kind of code do i have to write to print the graph on a from on a click of a button.
please help
Regards
Suraj Prabhu
Copying Form Contents
Hi all..
I have this particular problem. I have a form with some plotting
done on that. Now, I was wondering if I could copy the whole
drawing/plotting of that form onto a different form & then do some
other plotting on the first form afresh. Is there any way to do this?
I would be thankful for any ideas or suggestions. Thanks in advance.
Regards,
Pavan.
Taking A Jpg Of All The Contents In A Form
Currently i have a program that takes in a array, with std error and outputs the data as graph, and its std error.
i need to output the graph displayed in my form to a JPG or a rich text file.
currently i am using microsoft chart control 6.0 to display this graph
any help would be apperciated
*edit* if i could get the form output directly to a html file that would be even better.
*edit2* a rich text file would also work perfectly, i however can't find the reference libary for using the Word.Application definition
ps, using VB6
Edited by - nolman on 7/23/2004 8:45:16 AM
Resizing The Contents Over The Form
hi.. to all .. i am a new user on this forum..... What problem I am facing is that I have made the form with resolution 1280x800 pixels..... but the user who will be using the software.... is having resolution 800x600..... Now is there any way by which I can make the whole form visible on the lower resloution.... as it is getting out of the monitor scrreen as it is actaully made on high resolution..... please help... thanx in advance....
Printing Contents Of MDI Form
I have an MDI form that is holding several visable forms. I'd like to get a hard copy of these visable forms with them all on the same page.
I believe the MDI form does not have the .PrintForm function. But using PrintForm for each visable form causes me to get a seperate printout for each.
Is there a way to get them all together on one page?
Read .txt Contents To Form
Hi,
Depending on which checkboxes the user clicks then the apprpriate text is written to .txt, now I want the text from the .txt file to read into a label box's form - so e.g. if user clicked on checkbox intranet then text: "You chose Intranet" is written to .txt file - how do i get this text in the .txt file to go to a label box within a form? I tried a case statement with temp$ = "Intranet" but don't work.
Thanks.
Emailing Form Contents
Hello all,
I'd like to email the contents of "frmSomeForm" to any person. I'll be using ShellExecute to open the email client but I'm wondering how I:
Insert the contents of "txtBox1.Text" into the subject line.
Insert the contents of "txtBox2.Text . . . . txtBox(n).Text" into the main body.
Thanks!,
Jeff
File Download Using InternetReadFile Corrupts File Contents
All,
I have an OCX that downloads files from a Server using the following VB code. The application has been developed as an OCX using VB6 SP4 on Windows 2000 SP3. This code works fine on all US and European Locales, however, it does not work well in a Japanese machine running Windows 2000 environment. Text files seem to load ok, however, MS Office documents get corrupted.
Please advise.
Joginder
------------------------------------------------------------------------------------------------------------------------
Dim hFile As Long
Dim Buffer As String * CHUNK_8192
Dim BytesRead As Long
Open Filename For Binary Access Write Lock Read Write As #hFile
Do
Buffer = vbNullString
InternetReadFile hRequest, Buffer, Len(Buffer), BytesRead
If BytesRead > 0 Then
Dim Bytes() As Byte
ReDim Bytes(getByteCount(Buffer)) As Byte
Bytes = StrConv(Buffer, vbFromUnicode)
ReDim Preserve Bytes(BytesRead - 1) As Byte
Put #hFile, , Bytes()
End If
Loop While BytesRead > 0
Close #hFile
Saving/Coping Form Contents
Dear Experts
Can anyone tell me if visual basic enable the user to copy/save the data that appear on the form onto say words doc. or note pad with the use of a commandbutton.
If it can be done, can anyone guide me on how it can be programmed?
Thank you
Reading The Contents Of A Form Label Box?
Guys,
I would like to know if there is a way to read the contents of a label box and copy that information, which can change dynamically into another label box on another sheet. Thanks for any help you all can provide me.
How Can I Use Scroll Bars If My Contents Are Too Big For The Form?
I want to place multiple controls on a form. They are all placed one below another and exceed the form's size. How can I use scroll bars that will allow me to see all the controls? I've tried using an MDI form but didn't really know what to do there. Is there a way to do it? It sounds too simple to be impossible, even without an MDI form.
|