Search found 514 matches

by Provoni
Nov 13, 2016 10:03
Forum: Beginners
Topic: Windows GUI
Replies: 145
Views: 32177

Re: Windows GUI

There is another issue where the window is not being updated until the mouse is moved or another user action is taken. Does this perhaps have anything to do with the Windows message system and is there a way to send messages periodically?
by Provoni
Nov 13, 2016 9:59
Forum: Beginners
Topic: Windows GUI
Replies: 145
Views: 32177

Re: Windows GUI

MichaelW wrote:GDI+ can do the conversion, Microsoft example here.
Sorry, no time to code an example.
Thanks and no problem. Haven't been able to look into it myself but the idea is to prevent a .bmp from being created in the first place.
by Provoni
Nov 08, 2016 16:04
Forum: Beginners
Topic: Windows GUI
Replies: 145
Views: 32177

Re: Windows GUI

Provoni, Perhaps what you need is a Windows API window that uses the GFX_NULL driver, example here. Yes, tyvm. Here's an example: #include "fbgfx.bi" using fb screenres(100,100,32,1,GFX_NULL) print "hello forum!" bsave "hello.bmp",0 One step further would be to save it...
by Provoni
Nov 07, 2016 19:25
Forum: Beginners
Topic: Windows GUI
Replies: 145
Views: 32177

Re: Windows GUI

Thanks Josep and MichaelW. My program needs to draw a graph (with FreeBASIC draw functions) and then save it to a .bmp taking in consideration WinGUI. Placing the following code somewhere in the program will do the trick but then the user is left with an extra 800 by 600 that cannot be closed. scree...
by Provoni
Nov 06, 2016 9:48
Forum: Beginners
Topic: Windows GUI
Replies: 145
Views: 32177

Re: Windows GUI

Josep Roca wrote:This sets the background color of the main window to blue.

Code: Select all

SetClassLongPtr hwnd, GCLP_HBRBACKGROUND, CAST(LONG_PTR, CreateSolidBrush(BGR(0, 0, 255)))
Where hwnd is the handle to the window.
Okay, thanks Josep. How to set an image as background of a window?
by Provoni
Nov 05, 2016 16:14
Forum: Beginners
Topic: Windows GUI
Replies: 145
Views: 32177

Re: Windows GUI

Lothar,

Is it possible to set a custom background for my program instead of the Windows gray?
by Provoni
Nov 03, 2016 21:08
Forum: Beginners
Topic: Windows GUI
Replies: 145
Views: 32177

Re: Windows GUI

Thanks Josep,

It works now and by the changing the dimensions to 256, 256 it comes out much better than it does at 16, 16.
by Provoni
Nov 03, 2016 11:44
Forum: Beginners
Topic: Windows GUI
Replies: 145
Views: 32177

Re: Windows GUI

Lothar, Do you know how to keep editbox_settext from resetting the cursor and scroll-button to the top of the window? I do not exactly know what you mean. EditBox_SetText will place a new text into an editbox. Do you want to put the cursor at a defined position? You can do that using the EM_SETSEL ...
by Provoni
Nov 03, 2016 11:44
Forum: Beginners
Topic: Windows GUI
Replies: 145
Views: 32177

Re: Windows GUI

Thanks Josep, can the program get a handle on the icon that was attached to it? The .rc file. DIM hIcon AS HICON = LoadImage(GetModuleHandle(NULL), "OOP_16x16.ico", IMAGE_ICON, 16, 16, LR_SHARED) Josep, I tried the following code in my program but an icon does not show. dim hIcon AS HICON...
by Provoni
Nov 01, 2016 16:39
Forum: Beginners
Topic: Windows GUI
Replies: 145
Views: 32177

Re: Windows GUI

Lothar,

Do you know how to keep editbox_settext from resetting the cursor and scroll-button to the top of the window?
by Provoni
Nov 01, 2016 16:34
Forum: Beginners
Topic: Windows GUI
Replies: 145
Views: 32177

Re: Windows GUI

Thanks Josep, can the program get a handle on the icon that was attached to it? The .rc file.
by Provoni
Nov 01, 2016 13:38
Forum: Beginners
Topic: Threading questions/problems
Replies: 80
Views: 35459

Re: Threading questions/problems

No problem on my PC (double core) when using "loop until share(thread_number).quit=1 ", except obviously that the program blocks and does not exit when entering a character. Just tested that it fails to increment with 1.05.0 win64 but not with 1.05.0 win32. On a quad core running Win7. Pe...
by Provoni
Nov 01, 2016 10:24
Forum: Beginners
Topic: Threading questions/problems
Replies: 80
Views: 35459

Re: Threading questions/problems

Thanks fxm, Could not figure out why your example was working while mine wasn't. I found the problem but don't understand it. The following example now works, but does not work anymore after changing the line "loop until share(thread_number).quit=1" to "loop"? screenres(800,600,3...
by Provoni
Oct 31, 2016 11:14
Forum: Beginners
Topic: Threading questions/problems
Replies: 80
Views: 35459

Re: Threading questions/problems

My program cannot seem to communicate between the main sub and the threads. Here is some example code of the problem, the on screen numbers should be incrementing but are stuck at 1. Can anyone tell me what I am doing wrong and/or provide a simple fix? Please note that I do not like to work with poi...
by Provoni
Oct 31, 2016 9:24
Forum: Beginners
Topic: Windows GUI
Replies: 145
Views: 32177

Re: Windows GUI

Yes, it works that way. But not with the WinGUI function Window_New: Function Window_New(ByRef x As Long, ByVal y As Long, ByVal w As Long, ByVal h As Long, _ ByVal Title As String, _ ByVal Style As ULong = WS_OVERLAPPEDWINDOW Or WS_VISIBLE) As HWND 'Create a new window. Parameter: '- x, y = top lef...