Browse

Replies: 4 Views: 1,700 Started: Aug 29, 2005, 1:34 PM
Browse · Aug 29, 2005, 1:34 PM
#11591
Edi kako si naporavio ono za upload kad kliknes na dugme browse da se otvori onaj dialog za open i kad izaberes file sa diska da tu putanju stavi u onaj textbox pored za upload. Reci mi hitno treba mi to za upload :thumbsup:
Post #2 · Aug 29, 2005, 6:22 PM
#11594
Baci ovo u jedan modul:

Funkcija wrote:
Public Declare Function GetOpenFileName Lib "comdlg32.dll" Alias "GetOpenFileNameA" (pOpenfilename As OPENFILENAME) As Long
Public Type OPENFILENAME
lStructSize As Long
hwndOwner As Long
hInstance As Long
lpstrFilter As String
lpstrCustomFilter As String
nMaxCustFilter As Long
nFilterIndex As Long
lpstrFile As String
nMaxFile As Long
lpstrFileTitle As String
nMaxFileTitle As Long
lpstrInitialDir As String
lpstrTitle As String
flags As Long
nFileOffset As Integer
nFileExtension As Integer
lpstrDefExt As String
lCustData As Long
lpfnHook As Long
lpTemplateName As String
End Type


Onda napravi GUMB i nazovi ga "LOAD", udje u njega i u njegov code upisi:

Private Sub Command1_Click() wrote:

Dim OFName As OPENFILENAME
OFName.lStructSize = Len(OFName)
'Set the parent window
OFName.hwndOwner = Me.hWnd
'Set the application's instance
OFName.hInstance = App.hInstance
'Select a filter
OFName.lpstrFilter = "Bitmap files (*.bmp)" + Chr$(0) + "*.bmp" + Chr$(0) + "Jpg files (*.jpg)" + Chr$(0) + "*.jpg" + Chr$(0) + "All Files (*.*)" + Chr$(0) + "*.*" + Chr$(0)
'create a buffer for the file
OFName.lpstrFile = Space$(254)
'set the maximum length of a returned file
OFName.nMaxFile = 255
'Create a buffer for the file title
OFName.lpstrFileTitle = Space$(254)
'Set the maximum length of a returned file title
OFName.nMaxFileTitle = 255
'Set the initial directory
OFName.lpstrInitialDir = App.Path 'DEFAULT FOLDER KOJI PONUDI
'Set the title
OFName.lpstrTitle = "Open Picture - GetPixel Color" 'IME PROZORCICA
'No flags
OFName.flags = 0

'Show the 'Open File'-dialog
If GetOpenFileName(OFName) Then
On Error Resume Next
MsgBox Trim$(OFName.lpstrFile)
End If
Post #3 · Aug 29, 2005, 7:57 PM
#11600
A joj bre kralju nepitam te za VB to znam. Nego ono na file manageru treba mi za site.Znaci javascript ako si u njemu to uradio he he :thumbsup:

Ajd pomagaj plz
Post #4 · Aug 29, 2005, 10:53 PM
#11608
<form action="http://www.com/neka_skripta.php"
enctype="multipart/form-data" method="post">
<p>
Type some text (if you like):

<input type="text" name="textline" size="30">
</p>
<p>
Please specify a file, or a set of files:

<input type="file" name="datafile" size="40">
</p>
<p>
<input type="submit" value="Send">
</p>
</form>
Post #5 · Aug 30, 2005, 3:15 PM
#11613
The man knows, the man knows :D

Sign in to reply

Replies are available for existing members only! For now 😅

Sign in