|
-
Aug 8th, 2000, 04:14 PM
#1
Thread Starter
Junior Member
simple how to get a commondialog to print an image to a picture box a txt file is easy but what about a .gif or .ico file.
-
Aug 8th, 2000, 04:32 PM
#2
transcendental analytic
Use LoadPicture function
Picture1.picture=Loadpicture(Commondialog1.Filename)
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Aug 8th, 2000, 04:32 PM
#3
Frenzied Member
no problem
Code:
Set Picture1.Picture = LoadPicture(commondialog1.FileName)
-
Aug 8th, 2000, 04:48 PM
#4
Just incase you're interesed, you can save the Picture again by using the SavePicture method.
Code:
SavePicture Picture1.Picture, "C:\MyPicture.bmp"
-
Aug 8th, 2000, 06:42 PM
#5
Thread Starter
Junior Member
Originally posted by Megatron
Just incase you're interesed, you can save the Picture again by using the SavePicture method.
Code:
SavePicture Picture1.Picture, "C:\MyPicture.bmp"
Thank you Thank you Thank you. Yes i needed that.
-
Aug 9th, 2000, 11:43 AM
#6
Thread Starter
Junior Member
Originally posted by adam3000
Originally posted by Megatron
Just incase you're interesed, you can save the Picture again by using the SavePicture method.
Code:
SavePicture Picture1.Picture, "C:\MyPicture.bmp"
Thank you Thank you Thank you. Yes i needed that.
Any ideas on how to do the same thing with text
save it to a spot on a file of some kind?
-
Aug 9th, 2000, 12:47 PM
#7
To save a Text File
Code:
Open "C:\MyFile.txt" For Output As #1
Print #1, Text1
Close #1
To load a Text File
Code:
Open "C:\MyFile.txt" For Input As #1
Text1 = Input(LOF(1), 1)
Close #1
-
Aug 13th, 2000, 05:04 PM
#8
Thread Starter
Junior Member
Originally posted by Megatron
To save a Text File
Code:
Open "C:\MyFile.txt" For Output As #1
Print #1, Text1
Close #1
To load a Text File
Code:
Open "C:\MyFile.txt" For Input As #1
Text1 = Input(LOF(1), 1)
Close #1
Is there a way to save the text from a specific text box into a specific spot on an html or asp page?
-
Aug 15th, 2000, 08:31 AM
#9
transcendental analytic
Yep, you could open in binary
Code:
Open Filehtml for binary as #1
Buffer=space(lof(1)-yourposition+1)
Get #1,yourposition,Buffer
Put #1,yourposition,Text1
Put #1,Buffer
close 1
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Aug 16th, 2000, 04:26 PM
#10
Thread Starter
Junior Member
Originally posted by kedaman
Yep, you could open in binary
Code:
Open Filehtml for binary as #1
Buffer=space(lof(1)-yourposition+1)
Get #1,yourposition,Buffer
Put #1,yourposition,Text1
Put #1,Buffer
close 1
How does this work. how is the position specified in the html or asp page?
-
Aug 16th, 2000, 05:45 PM
#11
transcendental analytic
What it does is open your file, filename specified in filehtml string. Buffers the rest of the file that starts from yourposition, puts the text in textbox text1 at yourposition and then put the rest of the buffer after the text. (Exactly as you wanted it to do?)
hmm, replace
Put #1,Buffer
with
Put #1,,Buffer
YOu specify the position in bytes, the location in the file
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Aug 16th, 2000, 07:17 PM
#12
Thread Starter
Junior Member
Originally posted by kedaman
What it does is open your file, filename specified in filehtml string. Buffers the rest of the file that starts from yourposition, puts the text in textbox text1 at yourposition and then put the rest of the buffer after the text. (Exactly as you wanted it to do?)
hmm, replace
Put #1,Buffer
with
Put #1,,Buffer
YOu specify the position in bytes, the location in the file
Thank you, Ill give it a try.
-
Aug 16th, 2000, 07:32 PM
#13
Thread Starter
Junior Member
Originally posted by adam3000
Originally posted by kedaman
What it does is open your file, filename specified in filehtml string. Buffers the rest of the file that starts from yourposition, puts the text in textbox text1 at yourposition and then put the rest of the buffer after the text. (Exactly as you wanted it to do?)
hmm, replace
Put #1,Buffer
with
Put #1,,Buffer
YOu specify the position in bytes, the location in the file
Thank you, Ill give it a try.
Anyone got any idea how to read a possition on an html page in bytes?????????????????///////
-
Aug 17th, 2000, 09:43 AM
#14
transcendental analytic
Anyone got any idea how to read a possition on an html page in bytes?
I thought that was what you had to specify, in your html page, do you have any particular text on which you can use for a reference point?
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Aug 17th, 2000, 10:21 AM
#15
Thread Starter
Junior Member
Originally posted by kedaman
Anyone got any idea how to read a possition on an html page in bytes?
I thought that was what you had to specify, in your html page, do you have any particular text on which you can use for a reference point?
Ok lets say i use a particular text on which to use as a reference point how would you write that?
-
Aug 17th, 2000, 03:50 PM
#16
transcendental analytic
Well, assuming you just have one Reference point:
Code:
Open Filehtml for binary as #1
Buffer=space(lof(1))
Get #1,,Buffer
Parts=Split(Buffer,RefText)
Put #1,len(Part(0))+1,RefText & Text1 & Part(1)
For N=2 to ubound(Parts)
Put #1,,Parts(N)
Next N
close 1
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Aug 17th, 2000, 09:49 PM
#17
Thread Starter
Junior Member
Originally posted by kedaman
Well, assuming you just have one Reference point:
Code:
Open Filehtml for binary as #1
Buffer=space(lof(1))
Get #1,,Buffer
Parts=Split(Buffer,RefText)
Put #1,len(Part(0))+1,RefText & Text1 & Part(1)
For N=2 to ubound(Parts)
Put #1,,Parts(N)
Next N
close 1
Open "H:\wwwroot\softwaretest2.asp" For Binary As #1
Buffer = Space(LOF(1))
Get #1, , Buffer
Parts = Split(Buffer, thistext)
Put #1, Len(Part(0)) + 1, thistext & txtName1.Text & Part(1)
For N = 2 To UBound(Parts)
Put #1, , Parts(N)
Next N
Close 1
Like that?
-
Aug 18th, 2000, 02:28 AM
#18
transcendental analytic
yep, if you have the correct variables, have you tested it?
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Aug 18th, 2000, 10:32 AM
#19
Thread Starter
Junior Member
Originally posted by kedaman
yep, if you have the correct variables, have you tested it?
So I have to Dim Buffer, Parts, thistext(As String) and Part
It says method or data member not found for txtName1.text but that does exist on that form. Thats wiered its telling me my only options for that are Count, Item, LBound, and UBound. Ill try Item. But it still sayes argument not optional. hmmmm.
-
Aug 18th, 2000, 11:05 AM
#20
Thread Starter
Junior Member
Originally posted by adam3000
Originally posted by kedaman
yep, if you have the correct variables, have you tested it?
So I have to Dim Buffer, Parts, thistext(As String) and Part
It says method or data member not found for txtName1.text but that does exist on that form. Thats wiered its telling me my only options for that are Count, Item, LBound, and UBound. Ill try Item. But it still sayes argument not optional. hmmmm.
hmm interesting that ubound pops up as an expected aray
-
Aug 18th, 2000, 11:10 AM
#21
Thread Starter
Junior Member
Originally posted by adam3000
Originally posted by adam3000
Originally posted by kedaman
yep, if you have the correct variables, have you tested it?
So I have to Dim Buffer, Parts, thistext(As String) and Part
It says method or data member not found for txtName1.text but that does exist on that form. Thats wiered its telling me my only options for that are Count, Item, LBound, and UBound. Ill try Item. But it still sayes argument not optional. hmmmm.
hmm interesting that ubound pops up as an expected aray
Can i use just one item in a multidimentional array like this???
-
Aug 18th, 2000, 12:16 PM
#22
transcendental analytic
You could press reply instead of quote when you reply something that's if you don't want to have those quotes there.
Parts should be a variant containing the array. Thistext can be for instance a textbox or just a string,
Code:
Dim Parts, Buffer as string,n as integer
Open "H:\wwwroot\softwaretest2.asp" For Binary As #1
Buffer = Space(LOF(1))
Get #1, , Buffer
Parts = Split(Buffer, thistext)
Put #1, Len(Parts(0)) + 1, thistext & txtName1.Text & Parts(1)
For N = 2 To UBound(Parts)
Put #1, , Parts(N)
Next N
Close 1
Ubound works with multidimensional arrays too, you just specify the dimension index in the second argument.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Aug 18th, 2000, 04:07 PM
#23
Thread Starter
Junior Member
hehe hi
got this http://www.xitinc.com/softwaretest2.asp
guess i messed up somewhere i only get boxes instead of text this is the code i used:
Dim Parts, Buffer As String, n As Integer
Open "H:\wwwroot\softwaretest2.asp" For Binary As #1
Buffer = Space(LOF(1))
Get #1, , Buffer
Parts = Split(Buffer, "thistext")
Put #1, Len(Parts(0)) + 1, "thistext" & txtName1.Count & Parts(1)
For n = 2 To UBound(Parts)
Put #1, , Parts(n)
Next n
Close 1
-
Aug 18th, 2000, 04:17 PM
#24
Thread Starter
Junior Member
i used txtName1.Count instead of txtName1.text because the it sayes method or data memeber not found.
-
Aug 18th, 2000, 07:38 PM
#25
transcendental analytic
.count? So you have a control array? No you should put the string you wanted at the spot on your html:
Any ideas on how to do the same thing with text
save it to a spot on a file of some kind?
Or is it the count of controls you want to have there?
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Aug 19th, 2000, 07:44 PM
#26
transcendental analytic
you could just store the position you got earlier, + the keyfrase and then write again as you want to update
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|