as in title FileDialog work returning full file path
but using txt as string not fill string with file , file is .bas or .txt
so what i am doing wrong ?
Code: Select all
SELECT CASE wmID
Case 102
fName = OpnFile 'Open Files
MessageBox GetActiveWindow(), fName,"Open,You Clicked on",MB_ICONASTERISK
'SendMessage hEdit,WM_SETTEXT,0, cast(LPARAM,strptr(fName))
'load file....
'hfile = FreeFile
If Open( fname For Binary Access Read As #hfile ) <> 0 Then
MessageBox GetActiveWindow(), "OK","Open for binary",MB_ICONASTERISK
'If LOF(hfile) > 0 Then
txt = String(LOF(hfile), 0) ' this not work ? txt is a string
MessageBox GetActiveWindow(), txt,"Len of File",MB_ICONASTERISK
If Get( #hfile, ,txt ) <> 0 Then
SendMessage hEdit,WM_SETTEXT,0, cast(LPARAM,strptr(txt))
MessageBox GetActiveWindow(), "OK","Get File",MB_ICONASTERISK
End if
' End If
Close #hfile
End if