Search found 50 matches

by Ichibane
Sun Dec 08, 2019 7:37 am
Forum: freeBASIC code examples
Topic: Generating folder/files
Replies: 10
Views: 6304

Re: Generating folder/files

added generating of txt file with the url that will be placed in index of the website Dim as string FName Dim as string MName Dim as string LName Dim as string Div Dim as string Rate Dim as string SRank Dim as string SQual Dim as string Smm Dim as string Syy Dim as string ERank Dim as string EQual D...
by Ichibane
Sun Dec 08, 2019 4:25 am
Forum: freeBASIC code examples
Topic: Generating folder/files
Replies: 10
Views: 6304

Re: Generating folder/files

Here is the latest codes regarding the last codes that you've posted Dim as string FName Dim as string MName Dim as string LName Dim as string Div Dim as string Rate Dim as string SRank Dim as string SQual Dim as string Smm Dim as string Syy Dim as string ERank Dim as string EQual Dim as string Emm ...
by Ichibane
Sat Dec 07, 2019 5:52 pm
Forum: freeBASIC code examples
Topic: Generating folder/files
Replies: 10
Views: 6304

Generating folder/files

Declare Function FolderExists(Byref name_folder As String) As Integer Dim as string FName Dim as string MName Dim as string LName Dim as string Div Dim as string Rate Dim as string SRank Dim as string SQual Dim as string Smm Dim as string Syy Dim as string ERank Dim as string EQual Dim as string Em...
by Ichibane
Wed Aug 28, 2019 6:48 am
Forum: freeBASIC code examples
Topic: MyCad
Replies: 2
Views: 2836

Re: MyCad

I added drawing circle and also the drawing can be tracked http://fbcadcam.com/fbcadcamph/folders/mark2/images/mycad.png ScreenRes 600,600,,2 Window (0,0)-(599,599) Dim As Integer boxwidth,boxheight,boxspacing,boxpadding Dim As String boxname(10) Dim As Integer mx,my,mb,mw,mres Dim As BOOLEAN mr Dim...
by Ichibane
Tue Jul 30, 2019 7:26 am
Forum: freeBASIC code examples
Topic: Windows GUI
Replies: 2
Views: 2802

Re: Windows GUI

Just finished translating the windows9.chm file from russian to english but the image text are still on russian. Download Link: http://fbcadcam.com/fbcadcamph/folders/mark2/window9_en.chm Screenshots: http://fbcadcam.com/fbcadcamph/folders/mark2/images/Windows9Chm_en1.png http://fbcadcam.com/fbcadca...
by Ichibane
Mon Jul 29, 2019 10:36 am
Forum: freeBASIC code examples
Topic: Windows GUI
Replies: 2
Views: 2802

Re: Windows GUI

Translated almost half of the help file

Image
by Ichibane
Sat Jul 27, 2019 7:19 am
Forum: freeBASIC code examples
Topic: Windows GUI
Replies: 2
Views: 2802

Windows GUI

Currently working on translating the Windows9.chm file because it is in russian. I'm trying to learn this GUI and translating this help file can make it easier to understand the usage of it's functions. Link: https://www.freebasic.net/forum/viewtopic.php?f=2&t=27743 Screenshot: http://fbcadcam.com/f...
by Ichibane
Wed Jul 17, 2019 5:49 am
Forum: Training Q&A
Topic: GTK Filemenu
Replies: 0
Views: 6636

GTK Filemenu

#Define __USE_GTK3__ #include once "gtk/gtk.bi" #LIBPATH "../../lib" #Define NULL 0 Dim As GtkWidget Ptr win Dim As GtkWidget Ptr vbox Dim As GtkWidget Ptr menubar Dim As GtkWidget Ptr fileMenu Dim As GtkWidget Ptr fileMi Dim As GtkWidget Ptr quitMi gtk_init(NULL, NULL) win = gtk_window_new(GTK_WIN...
by Ichibane
Tue Jul 02, 2019 10:07 am
Forum: Training Q&A
Topic: making some stuff
Replies: 13
Views: 5570

Re: making some stuff

'this program will create a button and when clicked it will print hello world 'when I click the button the program will make robie hello world #include once "fmod.bi" Dim As Integer x,y,p3,b,p5 Dim As boolean mouseisinbutton Dim As Integer game_sound '48 khz FSOUND_Init(48000, 8, 0) game_sound = FS...
by Ichibane
Tue Jul 02, 2019 9:26 am
Forum: Training Q&A
Topic: making some stuff
Replies: 13
Views: 5570

Re: making some stuff

'this program will create a button and when clicked it will print hello world Dim As Integer x,y,p3,p4,p5 Dim As boolean mouseisinbutton ScreenRes (400,400) Line(0,0)-(100,30),14,b Draw String (16,9),"mybutton" Do GetMouse(x,y,p3,p4,p5) mouseisinbutton = FALSE If x >= 0 And x <=100 Then If y >=0 An...
by Ichibane
Thu Jun 27, 2019 10:14 am
Forum: Community Discussion
Topic: Prime number contest
Replies: 66
Views: 19792

Re: Prime number contest

Tiebreaker Dim As Integer temp,array(1 To 10) = {948374, 709543, 49508, 2222299, 19209, 267367, 1289378, 20938709, 49037, 287} For x As Integer = 1 To 10 temp = array(x) For i As Integer = x To 10 If temp > array(i) Then temp = array(i) Swap array(x),array(i) EndIf Next Print array(x) Next Sleep Scr...
by Ichibane
Thu Jun 27, 2019 8:51 am
Forum: Community Discussion
Topic: Prime number contest
Replies: 66
Views: 19792

Re: Prime number contest

Dim As Integer x,i,n,ctr,array(1 To 10) Do ctr=0 Input "Enter a positive integer between 2 and 1000000? ",n If n>=2 And n<=1000000 Then For x = n+1 To 1000000 For i = 2 To x If x Mod i = 0 Then Exit For EndIf Next If i=x And x Mod 10 = 3 Then ctr+=1 array(ctr) = x Print x EndIf If ctr=10 Then Exit ...
by Ichibane
Thu Jun 27, 2019 6:52 am
Forum: Community Discussion
Topic: Prime number contest
Replies: 66
Views: 19792

Re: Prime number contest

Dim As Integer x,n,i,ctr Do ctr=0 Input "Enter a positive integer between 2 and 1000000? ",n If n>=2 And n<=1000000 Then Print "The next 10 prime numbers are:" For x=n+1 To 1000000 For i = 2 To x If x Mod i = 0 Then Exit For EndIf Next If x=i Then Print x: ctr+=1 If ctr=10 Then Exit For Next Else P...
by Ichibane
Mon Jun 24, 2019 8:49 am
Forum: Community Discussion
Topic: Prime number contest
Replies: 66
Views: 19792

Re: Prime number contest

Dim As Integer n,i,ctr Dim As Integer array(1 To 99) Input "Enter a positive Integer between 2 And 10000: ",n For i = 2 To n If n Mod i = 0 Then Exit For EndIf Next If n>=2 And n<=10000 Then If i=n Then Print n;" Is Prime" Else Print n;" Is Composite" Print n;" = "; For i As Integer = 2 To n While ...
by Ichibane
Mon Jun 24, 2019 6:02 am
Forum: Community Discussion
Topic: Prime number contest
Replies: 66
Views: 19792

Re: Prime number contest

Code: Select all

Dim As Integer x=2,i,ctr=1

While ctr<=100
	For i = 2 To x
		If x Mod i = 0 Then Exit For 
	Next
	If i=x Then 
		Print ctr;".",x
		ctr+=1
	EndIf
	x+=1
Wend

Sleep
Screenshot:

Image
by Ichibane
Mon Jun 24, 2019 3:17 am
Forum: Community Discussion
Topic: Prime number contest
Replies: 66
Views: 19792

Re: Prime number contest

Mark Glenn P. Nopra

Code: Select all

For i As Integer = 1 To 10 :Print "Hello World" :Next:Sleep
by Ichibane
Tue Jun 04, 2019 9:30 am
Forum: Training Q&A
Topic: gtk tutorals
Replies: 69
Views: 19992

Re: gtk tutorals

This is the code for creating menubar #Define __USE_GTK3__ #include once "gtk/gtk.bi" #LIBPATH "../lib" #Define NULL 0 Dim win As GtkWidget Ptr Dim vbox As GtkWidget Ptr Dim menubar As GtkWidget Ptr Dim fileMenu As GtkWidget Ptr Dim sep As GtkWidget Ptr Dim fileMi As GtkWidget Ptr Dim quitMi As GtkW...
by Ichibane
Mon Jun 03, 2019 5:02 am
Forum: Training Q&A
Topic: gtk tutorals
Replies: 69
Views: 19992

Re: gtk tutorals

Nice. This is a good example for those who doesn't know much about using GTK. This could be a great idea and compile on how to generate different components using GTK :)
by Ichibane
Thu May 30, 2019 6:50 am
Forum: Training Q&A
Topic: gtk tutorals
Replies: 69
Views: 19992

Re: gtk tutorals

I draw a face using circles with the new source code and now i can see where I'm drawing it. cool

Image
by Ichibane
Wed May 29, 2019 6:55 am
Forum: Training Q&A
Topic: gtk tutorals
Replies: 69
Views: 19992

Re: gtk tutorals

Looking forward on how to attain drawing in that canvass sir. Nice work.

Image
by Ichibane
Tue May 28, 2019 4:24 am
Forum: Training Q&A
Topic: GTK Api (Code Auto completion)
Replies: 1
Views: 2503

GTK Api (Code Auto completion)

As you can see, fbedit doesn't have an auto-completion feature (it's where you press ctrl+space then you'll see bunch of predefined codes) using gtk so here I manage to add gtk.api by gathering codes in gtk folder of freebasic (gtk3.bi specifically) and create a new file called gtk.api (which i put ...
by Ichibane
Fri May 24, 2019 9:31 am
Forum: Training Q&A
Topic: gtk tutorals
Replies: 69
Views: 19992

Re: gtk tutorals

Wow this looks nice sir but whenever it is resized, the drawing stretch too like pixelated.
by Ichibane
Tue May 21, 2019 5:45 am
Forum: Training Q&A
Topic: gtk tutorals
Replies: 69
Views: 19992

Re: gtk tutorals

Now it makes sense passing variables in an g_signal_connect because I also thought that passing two parameters would do but now I understand by using UDT. Thank you for the explanation on how to fix those errors though it doesn't affect the performance of the program but it's annoying seeing those e...
by Ichibane
Mon May 20, 2019 6:35 am
Forum: Training Q&A
Topic: gtk tutorals
Replies: 69
Views: 19992

Re: gtk tutorals

I modify some parts of the code. http://fbcadcam.com/fbcadcamph/folders/mark2/images/Calculator.png #Define __USE_GTK3__ #include once "gtk/gtk.bi" #LIBPATH "../lib" #Define NULL 0 Type number_buttons As Integer numbtn As GtkWidget Ptr obj As String Ptr global_number As Integer Ptr global_max_number...
by Ichibane
Fri May 17, 2019 8:06 am
Forum: Training Q&A
Topic: gtk tutorals
Replies: 69
Views: 19992

Re: gtk tutorals

Is there any way to fixed the size of gtk form in order not to resize it anymore? gtk_widget_set_size_request(GTK_WINDOW(win), 400, 300) 'fix size of window gtk_window_set_resizable(GTK_WINDOW(win), FALSE) 'disabling resizing of window Source: https://stackoverflow.com/questions/4772804/how-to-set-...