TỰ HỌC VISUAL BASIC 6.0 _ PHẦN I

Ta sẽsửa code trong Sub CmdLoad_Click lại đểkhi nhét tên vào lstNames, FirstName và SurName mỗi thứchiếm 10 characters. Ðểcác chữtrong Items của lstNames sắp hàng ngay ngắn ta đổi Font của lstNames ra Courier New. Courier New là một loại Font mà chiều ngang của chữ mbằng chữ i, trong khi hầu hết các Fonts khác nhưArial, Times Roman .v.v. là Proportional Spacing, có nghĩa là chữm rộng hơn chữi. Listing mới của Sub CmdLoad_Click trởthành nhưsau: Private SubCmdLoad_Click() Dimi, Pos DimFileName, FileNumber, anItem DimsFirstName As String* 10 ' fixed length string of 10 characters DimsSurName As String* 10 ' fixed length string of 10 characters ' Obtain Folder where this program's EXE file resides FileName = App.Path ' Make sure FileName ends with a backslash IfRight(FileName, 1) <> "\" ThenFileName = FileName & "\" FileName = FileName & "MyList.txt" ' Obtain an available filenumber from the operating system FileNumber = FreeFile ' Open the FileName as an input file , using FileNumber as FileHandle Open FileName ForInput AsFileNumber

pdfChia sẻ: aloso | Lượt xem: 1818 | Lượt tải: 1download
Bạn đang xem nội dung tài liệu TỰ HỌC VISUAL BASIC 6.0 _ PHẦN I, để tải tài liệu về máy bạn click vào nút DOWNLOAD ở trên

Các file đính kèm theo tài liệu này:

  • pdfTỰ HỌC VISUAL BASIC 6.0 _ PHẦN I.pdf
Tài liệu liên quan