Hi MiLoo!
I was surprised that you were come from Shantou,me too!
胶己人!
Search found 10 matches
- Sun Jan 30, 2011 1:18 pm
- Forum: Off Topic
- Topic: Hello everybody, I'm from China
- Replies: 25
- Views: 11009
- Wed Dec 01, 2010 3:31 am
- Forum: Windows
- Topic: How to call "URLDownloadToFile " function by PB?
- Replies: 3
- Views: 2930
How to call "URLDownloadToFile " function by PB?
My code did not work!
Prototype.l URLDownloadToFile(pCaller.i,*szURL.c,*szFileName.c,dwReserved.l,*fun)
url.s = "http://www.google.com/"
filename.s = "index.htm"
*szURL.c = @url
*szFileName.c = @filename
If OpenLibrary(0,"urlmon.dll")
Debug CallFunction(0,"URLDownloadToFile",#Null,*szURL.c ...
Prototype.l URLDownloadToFile(pCaller.i,*szURL.c,*szFileName.c,dwReserved.l,*fun)
url.s = "http://www.google.com/"
filename.s = "index.htm"
*szURL.c = @url
*szFileName.c = @filename
If OpenLibrary(0,"urlmon.dll")
Debug CallFunction(0,"URLDownloadToFile",#Null,*szURL.c ...
- Tue Oct 12, 2010 2:08 am
- Forum: Coding Questions
- Topic: Window icon in source code
- Replies: 6
- Views: 1271
Re: Window icon in source code
You can create your ico file by using this program:Axialis IconWorkshop.
And then find Resources help from the PureBasic.CHM file or open this url : http://www.purearea.net/pb/english/manu ... piler.html
Sorry for my English.
And then find Resources help from the PureBasic.CHM file or open this url : http://www.purearea.net/pb/english/manu ... piler.html
Sorry for my English.
- Mon Oct 11, 2010 11:28 am
- Forum: Coding Questions
- Topic: Window icon in source code
- Replies: 6
- Views: 1271
Re: Window icon in source code
Hi.
By setting the compiler's resource options you can include as many Resource scripts as you want.The resources will be compiled and included with the executable.
By setting the compiler's resource options you can include as many Resource scripts as you want.The resources will be compiled and included with the executable.
- Tue Aug 24, 2010 3:12 pm
- Forum: Coding Questions
- Topic: exec()
- Replies: 16
- Views: 3320
Re: exec()
sorry... i didnt mean script but a programming language
i want an exec function
PBcode$ = ;code + # LF + code
exec(pbcode$)
should work dynamically
I hope this code can help you!
Prototype CallHandler()
Declare gogo()
WinH = OpenWindow(0,50,50,320,200,"MainWindow",#PB_Window_SystemMenu ...
i want an exec function
PBcode$ = ;code + # LF + code
exec(pbcode$)
should work dynamically
I hope this code can help you!
Prototype CallHandler()
Declare gogo()
WinH = OpenWindow(0,50,50,320,200,"MainWindow",#PB_Window_SystemMenu ...
- Fri Aug 20, 2010 4:56 pm
- Forum: Coding Questions
- Topic: WindowFromPoint_()?
- Replies: 12
- Views: 2897
Re: WindowFromPoint_()?
I don't see use of global variable "pe.Processentry32" in your code and you are still having memory leak because there is missing "CloseHandle_(Pth)". :wink:
You can always use this to get exe name of your own application:
Debug GetFilePart(ProgramFilename())
Thank you,cas!
I forget to close ...
You can always use this to get exe name of your own application:
Debug GetFilePart(ProgramFilename())
Thank you,cas!
I forget to close ...
- Fri Aug 20, 2010 2:57 pm
- Forum: Coding Questions
- Topic: WindowFromPoint_()?
- Replies: 12
- Views: 2897
Re: WindowFromPoint_()?
You forgot one thing:
The calling application must set the dwSize member of PROCESSENTRY32 to the size, in bytes, of the structure.
Procedure.s GetWinName(shandle.l)
pe.Processentry32
pe\dwSize = SizeOf(Processentry32) ; <-------------------HERE
oPid.l
GetWindowThreadProcessId_(shandle ...
The calling application must set the dwSize member of PROCESSENTRY32 to the size, in bytes, of the structure.
Procedure.s GetWinName(shandle.l)
pe.Processentry32
pe\dwSize = SizeOf(Processentry32) ; <-------------------HERE
oPid.l
GetWindowThreadProcessId_(shandle ...
- Fri Aug 20, 2010 1:58 pm
- Forum: Coding Questions
- Topic: WindowFromPoint_()?
- Replies: 12
- Views: 2897
Re: WindowFromPoint_()?
It's a long story, but PB does not support passing structures as parameters by value, only by reference. WindowFromPoint_() is one of the rare functions that need a structure by value. We can work around this by pretending the structure is a single quad, since both a quad and a POINT is 8 bytes:
m ...
m ...
- Thu Aug 19, 2010 12:18 am
- Forum: Coding Questions
- Topic: WindowFromPoint_()?
- Replies: 12
- Views: 2897
Re: WindowFromPoint_()?
Thank you for all of your replies.
Now I will try to use it in my code!
Now I will try to use it in my code!
- Wed Aug 18, 2010 7:42 pm
- Forum: Coding Questions
- Topic: WindowFromPoint_()?
- Replies: 12
- Views: 2897
WindowFromPoint_()?
Hi.
I'v got a problem when using the WindowsAPI "WindowFromPoint_(m)".Why the code below alway returns zero?And how can I use the "WindowFromPoint_()" function?
I'v got a problem when using the WindowsAPI "WindowFromPoint_(m)".Why the code below alway returns zero?And how can I use the "WindowFromPoint_()" function?
Code: Select all
m.point
m\x = 100
m\y = 100
Debug WindowFromPoint_(m)