Search found 7902 matches
- Thu Apr 25, 2024 12:20 am
- Forum: Coding Questions
- Topic: Vector shadow emulation.
- Replies: 3
- Views: 117
Re: Vector shadow emulation.
Fiddled with this for a while until it didn't look too bad to me, see what you think. It could probably be improved: OpenWindow(0,0,0,800,600,"",#PB_Window_ScreenCentered|#PB_Window_SystemMenu) CanvasGadget(0,0,0,1024,800) StartVectorDrawing(CanvasVectorOutput(0)) AddPathBox(190,30,470,430...
- Wed Apr 24, 2024 5:36 pm
- Forum: Coding Questions
- Topic: Screen capture issue
- Replies: 8
- Views: 162
Re: Screen capture issue
Try with this at the top of your code:
And then apply the flag to your BitBllt command:
If you don't use the CAPTUREBLT flag layered windows won't get included.
Code: Select all
#CAPTUREBLT = $40000000
Code: Select all
bitBlt = BitBlt_(trgDC, 0, 0, ScreenWidth, ScreenHeight, srcDC, 0, 0, #SRCCOPY|#CAPTUREBLT)
- Sat Apr 13, 2024 6:21 pm
- Forum: Coding Questions
- Topic: How to Scroll (Editor_Input = EditorGadget) to Line x ?
- Replies: 5
- Views: 328
Re: How to Scroll (Editor_Input = EditorGadget) to Line x ?
For windows: OpenWindow(0,0,0,640,480,"",#PB_Window_ScreenCentered|#PB_Window_SystemMenu) EditorGadget(0,0,0,640,480) For a = 0 To 100 AddGadgetItem(0, a, "Line "+Str(a)) Next SendMessage_(GadgetID(0), #EM_LINESCROLL, 0, 31) SetGadgetState(0,31) Repeat:Until WaitWindowEvent()=#PB...
- Wed Apr 10, 2024 11:03 pm
- Forum: Coding Questions
- Topic: Vector Drawing
- Replies: 6
- Views: 393
Re: Vector Drawing
Simple example: Declare procCanvas0() OpenWindow(0,0,0,800,600,"Click to start a line, move cursor and click to set end point and draw", #PB_Window_ScreenCentered|#PB_Window_SystemMenu) CanvasGadget(0,0,0,800,600) BindGadgetEvent(0, @procCanvas0()) Repeat:Until WaitWindowEvent() = #PB_Even...
- Tue Apr 09, 2024 7:27 am
- Forum: Coding Questions
- Topic: Pushbutton Test Toggling
- Replies: 8
- Views: 308
Re: Pushbutton Test Toggling
EditorGadget(9001, 590, 530, 420, 230) With this line you reserve space in the executable for 9000 gadgets you're not using. Much better is: Global gEdit = EditorGadget(#PB_Any, 590, 530, 420, 230) where you don't waste any space in the executable at all. Static (hardcoded) gadget numbers have the ...
- Mon Apr 08, 2024 11:51 pm
- Forum: Coding Questions
- Topic: What variable type is "?" for CatchImage?
- Replies: 7
- Views: 344
Re: What variable type is "?" for CatchImage?
It's a pointer, nothing more or less. Nothing to spend a lot of time analyzing.
- Mon Apr 08, 2024 11:49 pm
- Forum: Coding Questions
- Topic: Pushbutton Test Toggling
- Replies: 8
- Views: 308
Re: Pushbutton Test Toggling
When you assign a large static gadget number to a gadget you reserve room for (gadgetnumber-1) gadgets. In your case up to 11 thousand. Consider using low static numbers or better still, #PB_Any. This way you don't waste scads and scads of space in the executable.
- Wed Apr 03, 2024 8:43 pm
- Forum: Coding Questions
- Topic: Beginner searching for his learning path
- Replies: 16
- Views: 858
Re: Beginner searching for his learning path
Feel free to message me with any questions you might have and I'll usually answer pretty quick. I remember my own early days with programming PB and questions answered by seasoned users were the most helpful. I'd stay away from oop for now though, you have to walk before you can run.
- Tue Apr 02, 2024 2:13 pm
- Forum: Coding Questions
- Topic: Question to Transparence
- Replies: 10
- Views: 309
Re: Question to Transparence
The Canvas Gadget itself is not transparent so you couldn't use it to achieve transparency through to the desktop.
- Tue Apr 02, 2024 12:30 am
- Forum: Coding Questions
- Topic: Question to Transparence
- Replies: 10
- Views: 309
Re: Question to Transparence
Define Tcolor.l Declare TransparentCallback(x, y, sourcecolor.l, targetcolor.l) LoadImage(0, #PB_Compiler_Home + "examples\sources\data\geebee2.bmp") StartDrawing(ImageOutput(0)) Tcolor = Point(0,0) StopDrawing() CreateImage(1, ImageWidth(0), ImageHeight(0), 32, #PB_Image_Transparent) Sta...
- Tue Mar 26, 2024 5:38 pm
- Forum: General Discussion
- Topic: PHPBB Problem?
- Replies: 2
- Views: 281
PHPBB Problem?
Here is a link I placed on one of my posts: http://lloydsplace.com/quickupload.zip When I click this link it goes nowhere. But if I copy the text of the link and paste it in the address bar of the browser, it works. One more weird thing: If I change the link to https:// (which my site does not suppo...
- Thu Mar 21, 2024 4:22 pm
- Forum: Coding Questions
- Topic: I need native image drawn on a ButtonGadget
- Replies: 11
- Views: 605
- Thu Mar 21, 2024 2:27 am
- Forum: Tricks 'n' Tips
- Topic: Color Button using API [Windows]
- Replies: 4
- Views: 595
Re: Color Button using API [Windows]
Nice clean concise code, RASHAD! Great work as always. Putting it in my library.
- Fri Mar 01, 2024 11:47 pm
- Forum: Coding Questions
- Topic: Solve 1 Equation with 2 Unknowns
- Replies: 23
- Views: 823
Re: Solve 1 Equation with 2 Unknowns
The real solution for me is the one that lets me eat 25 cookies.
- Sat Jan 13, 2024 3:58 pm
- Forum: Coding Questions
- Topic: Webview example stopped working with B2 [solved]
- Replies: 1
- Views: 279
Webview example stopped working with B2 [solved]
This code, posted in Announcements, runs fine with B1 but with B2 there are many linker errors. Am I doing something wrong? Html$ = ~"<button id=\"increment\">Tap me</button>\n"+ ~"<div>You tapped <span id=\"count\">0</span> time(s).</div>\n"+ ~"<button i...