Search found 251 matches

by GreenGiant
Mon Sep 19, 2005 11:06 pm
Forum: Coding Questions
Topic: Moving a gadget like in the designer?
Replies: 6
Views: 2143

I don't know if it's any use, but I think if you look *here* there is some visual designer code you can download.
by GreenGiant
Thu Sep 15, 2005 9:13 pm
Forum: Coding Questions
Topic: Coloring StatusBar Items
Replies: 2
Views: 1681

I've modified Nico's code a bit to show how to colour the background. I've not coloured individual items in this, but I think it should be easy enough to work out from this. Hope it helps. Global hBrush1
Global hBrush2
Global Hstatus

;THESE ARE THE TWO BACKGROUND COLOURS
hBrush1 = CreateSolidBrush ...
by GreenGiant
Sun Sep 11, 2005 3:43 pm
Forum: Coding Questions
Topic: Pass values (longs) between two PB programs.
Replies: 15
Views: 4686

I'm not an expert, but I understood that RegisterWindowMessage should always be used.
Say for example that you are sending a pointer to a string between two programs using #WM_User+17 (directly, not broadcasting it). Suppose another program is broadcasting a pointer to a function and is also using ...
by GreenGiant
Sat Sep 10, 2005 8:47 pm
Forum: Coding Questions
Topic: Handling menus through API
Replies: 4
Views: 1739

There's a help file you can download that covers most of the api commands, which seems pretty good. I think its the one *here* (if I'm right then the help file is in English)
by GreenGiant
Sat Sep 10, 2005 8:24 pm
Forum: Coding Questions
Topic: Pass values (longs) between two PB programs.
Replies: 15
Views: 4686

I'd also reccomend using user-defined messages. But if you are going to use them, don't forget to use RegisterWindowMessage_() to avoid trouble.
by GreenGiant
Sat Sep 03, 2005 11:17 pm
Forum: Coding Questions
Topic: CreatePolygonRgn_() and windows xp
Replies: 4
Views: 2308

No, zero doesn't work for me. You'll need #Winding (2) or #Alternate (1). Not sure what the distinction is to be honest.
by GreenGiant
Sat Sep 03, 2005 10:09 pm
Forum: Coding Questions
Topic: CreatePolygonRgn_() and windows xp
Replies: 4
Views: 2308

Seems to work fine for me. Using the code OpenWindow(0,0,0,400,400,#PB_Window_SystemMenu|#PB_Window_ScreenCentered,"Test")

Dim Array.Point(3)

Array(0)\x=12
Array(0)\y=12
Array(1)\x=100
Array(1)\y=31
Array(2)\x=120
Array(2)\y=150
Array(3)\x=43
Array(3)\y=230

hRgn=CreatePolygonRgn_(@Array(),4 ...
by GreenGiant
Sat Sep 03, 2005 11:59 am
Forum: Coding Questions
Topic: Icons in submenues?
Replies: 16
Views: 5196

Thanks fweil, didn't spot that. I can't really take credit for it being nice code though, I used Sparkie's from above and then modified it.
by GreenGiant
Sat Sep 03, 2005 11:12 am
Forum: Coding Questions
Topic: Icons in submenues?
Replies: 16
Views: 5196

Try this code

; --> get default menu check-mark bitmap size
menuImageWidth = GetSystemMetrics_(#SM_CXMENUCHECK)
menuImageHeight = GetSystemMetrics_(#SM_CYMENUCHECK)
Global menuImageWidth, menuImageHeight

Procedure menuImage(subMenu, iID, ico)
; --> Extract an icon
ExtractIconEx_("shell32 ...
by GreenGiant
Fri Jul 01, 2005 9:10 am
Forum: Coding Questions
Topic: how do i change the window style using windows api!??!
Replies: 4
Views: 1750

Ok then, more of a challenge :) This code's a bit messy (the minimising bit) but I was in a hurry. You should just be able to force the window to redraw. RunProgram("calc")
Delay(1000)

hWnd=FindWindow_(0,"Calculator")
style=GetWindowLong_(hWnd,#GWL_STYLE)
style=style!#WS_SYSMENU
SetWindowLong_(hWnd ...
by GreenGiant
Thu Jun 30, 2005 12:04 pm
Forum: Coding Questions
Topic: how do i change the window style using windows api!??!
Replies: 4
Views: 1750

Try running this

Code: Select all

OpenWindow(0,0,0,400,400,#PB_Window_ScreenCentered,"Title")

Delay(3000)
No close/minimise buttons in the corner :)
by GreenGiant
Tue Jun 21, 2005 7:36 pm
Forum: Announcement
Topic: PureBasic 3.93 Beta 2 for MacOS X available
Replies: 23
Views: 8350

Yeah, I never got all this anti-Mac stuff. I used a PC right up until a few months ago and now I'm using a Mac. All I can say is that they seem pretty damn good to me. Don't get me wrong, PCs are good too, and cheaper, but I really enjoy using OSX. Little things like pressing F9 and all the open ...
by GreenGiant
Fri Jun 17, 2005 10:23 am
Forum: Feature Requests and Wishlists
Topic: [Implemented] Drag n Drop
Replies: 12
Views: 3076

I agree, this would be something nice, especially if it was cross-platform.
by GreenGiant
Wed Jun 15, 2005 10:00 am
Forum: Feature Requests and Wishlists
Topic: Handles and IDs
Replies: 2
Views: 1298

Here's a nice tip I picked up from Sparkie.

Gadget_Constant = GetDlgCtrlID_(Gadget_hWnd) is an api command that inputs the api handle to a gadget and then outputs the PB corresponding constant.

Doesn't really solve your problem but is basically the getPBNumber(#number) command.
by GreenGiant
Tue Jun 14, 2005 6:53 pm
Forum: General Discussion
Topic: DLL for BMP -> TIFF
Replies: 1
Views: 1160

I thought I'd seen a tip for this. El_Choni gave some code for saving as tiff *here* Although I think there is a dependency for non-XP that would need to be included.