Search found 65 matches

by yabune
Wed Mar 24, 2010 8:18 am
Forum: Linux
Topic: Detect idle time in linux
Replies: 1
Views: 1303

Detect idle time in linux

Hi,

Is it possible to detect computer idle time in linux with PB?

Thanks!
by yabune
Tue Mar 09, 2010 8:29 pm
Forum: Windows
Topic: detect if windows session is locked
Replies: 13
Views: 10627

detect if windows session is locked

Hi,

How can I detect if a windows session is locked?

thanks!
by yabune
Thu Dec 10, 2009 9:08 pm
Forum: Coding Questions
Topic: Find text in EditorGadget
Replies: 2
Views: 672

Re: Find text in EditorGadget

utopiomania wrote:There's an example in this code and many other places here, search the forums.
Thanks!

I did search the forum, but I was searching for this find feature, and the search functionality of the forum filter the "find" word.
by yabune
Thu Dec 10, 2009 7:22 pm
Forum: Coding Questions
Topic: Find text in EditorGadget
Replies: 2
Views: 672

Find text in EditorGadget

Hi,

Is it possible to have a Find function for text (like in Notepad) for an editorgadget?

Would I have to get the text of the editor gadget and use the string functions?

And how can I highlight the found words?

Thanks!
by yabune
Sat Sep 19, 2009 3:43 pm
Forum: Coding Questions
Topic: Unhide window and make it active
Replies: 3
Views: 1036

Re: Unhide window and make it active

Yes, I'm using threads. But I'm not opening the window inside the thread. The thread is running but I'm opening when there's a hotkey pressed, it's an event in the main loop of the application.

I tried Kwaï chang caïne tip and it's working now!
Thanks Kwaï!

I'm using this to show the window ...
by yabune
Fri Sep 18, 2009 2:58 pm
Forum: Coding Questions
Topic: Unhide window and make it active
Replies: 3
Views: 1036

Unhide window and make it active

Hi,

I have an application with only a systray icon, and when I click on the icon, a window should unhide.

I'm using this code to achieve that:

HideWindow(#WINDOW_1, 0)
SetActiveWindow(#WINDOW_1)
SetActiveGadget(#G_1)


Most of the times this works, but sometimes the window shows up minimized ...
by yabune
Tue Sep 15, 2009 2:36 pm
Forum: Coding Questions
Topic: Global hotkey
Replies: 3
Views: 1765

Re: Global hotkey

Here is an example with RegisterHotkey_() : http://www.purebasic.fr/english/viewtopic.php?f=13&t=26781

Thank you :)

Here's what I did:

RegisterHotKey_(#Null, 0, #MOD_CONTROL, #PB_Shortcut_1)

; and in the main loop:
repeat
ev=WaitWindowEvent()
if ev=#WM_HOTKEY
debug "key detected"
endif ...
by yabune
Tue Sep 15, 2009 1:44 pm
Forum: Coding Questions
Topic: Global hotkey
Replies: 3
Views: 1765

Global hotkey

Hi,

What's the best way to register a global hotkey to a functionality of my application?
And how can I catch the event of that key in my application?

I tried to search in the forum, but I'm having some dificulties in having good results in the search function of the new forum.

Thank you!
by yabune
Wed Feb 11, 2009 8:06 pm
Forum: The PureBasic Form Designer
Topic: Visual designer didn't generate all the gadgets
Replies: 3
Views: 5038

I found out that if I move the gadgets that aren't generated to another position they show up in the gadget list. But as soon as I move them to the position I want they disappear from the gadget list.
by yabune
Wed Feb 11, 2009 8:00 pm
Forum: The PureBasic Form Designer
Topic: Visual designer didn't generate all the gadgets
Replies: 3
Views: 5038

Visual designer didn't generate all the gadgets

Hi,

I create a window in visual designer and add some gadgets, but after adding two frame gadgets when I generate the source, some gadgets aren't generated. But they are visible in the visual designer...

Any workaround for this?

Thanks!
by yabune
Tue Oct 07, 2008 12:09 pm
Forum: Coding Questions
Topic: Internal SQLite commands
Replies: 2
Views: 998

Internal SQLite commands

I would like to use the internal SQLite but I'm not sure of the right syntax to create tables.

The SQLite uses the following datatypes: INTEGER, REAL, TEXT and BLOB

But in the help example of purebasic (UseSQLiteDatabase) the datatype used is: VARCHAR

What datatypes shall I use?

One more ...
by yabune
Mon Sep 15, 2008 5:15 pm
Forum: Game Programming
Topic: how to move text continuously inside a window
Replies: 2
Views: 2284

ok, I have a solution:



x = 0
y = 0

If OpenWindow(0, 100, 200, 300, 260, "Marquee")

CreateImage(0, 300, 20)
CreateGadgetList(WindowID(0))
ImageGadget(0, 0, 100, 0, 0, ImageID(0))

last = ElapsedMilliseconds()


Repeat
EventID = WindowEvent()

If EventID = #PB_Event_CloseWindow
Quit = 1 ...
by yabune
Fri Sep 12, 2008 7:46 pm
Forum: Game Programming
Topic: how to move text continuously inside a window
Replies: 2
Views: 2284

how to move text continuously inside a window

hi,

I would like to create a moving marquee inside a window (like we have in html).

Any tips on this?

Thanks!
by yabune
Wed Jul 16, 2008 7:56 pm
Forum: Game Programming
Topic: Display sprite too slow
Replies: 14
Views: 5072

fast answer :)

that helps!!!

thanks!
by yabune
Wed Jul 16, 2008 7:00 pm
Forum: Game Programming
Topic: Display sprite too slow
Replies: 14
Views: 5072

Display sprite too slow

Hi,

I'm trying to create a very simple game, where I move a rectangle with the mouse.

The problem is that the move of the box isn't smooth, it looks like the game is using a lot of cpu...

Here is the code:




If InitSprite() = 0 Or InitKeyboard() = 0 Or InitMouse() = 0
MessageRequester("Error ...