Thats One Nice DLL List you got going there...
I Don't like Using all that "DarkSide_???_???", So I've Shortened it Into Several Functions.
No ClipBoard Use Now, The Functions Simply Return The Value:
IE: File$ = GetRequestedFile()
I've Also Altered Some Others to Make it Easier to UnderStand, (For Me Anyway)
IE: OpenFileSelector(Title$,Path$,Ext$,ExtString$) or ShowMessageBox(Title$,Contents$,Style)
Sync On : Sync Rate 0
Set Display Mode 1024,768,32
Do
Text 10,10,"1 = Save File"
Text 10,20,"2 = Open File"
Text 10,30,"3 = Select Path"
Text 10,40,"GetRequestedFullPath() = "+GetRequestedFullPath()
Text 10,50,"GetRequestedPath() = "+GetRequestedPath()
Text 10,60,"GetRequestedFile() = "+GetRequestedFile()
Text 10,70,"GetRequestedExtention() = "+GetRequestedExtention()
If Inkey$() = "1" Then SaveFileSelector("Save a File...","C:Documents And Settings","","")
If Inkey$() = "2" Then OpenFileSelector("Load a File...","C:Documents And Settings","","")
If Inkey$() = "3" Then ShowPathSelector()
Sync : Loop
` Windows Color Selector ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Function SelectColor() : ` This will show the windows colour selector and let you select a colour.
DarkSide_Color_Requester
n = GetColor()
EndFunction n
` ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Function GetColor() : ` This command will return the selected colours true 24bit colour value.
n = DarkSide_Get_Color_Requester_24Bit()
EndFunction n
` ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Function GetRedColor() : ` These commands will get the R G B colour values from your selected colour.
n = DarkSide_Get_Color_Requester_Red()
EndFunction n
Function GetGreenColor() :
n = DarkSide_Get_Color_Requester_Green()
EndFunction n
Function GetBlueColor() :
n = DarkSide_Get_Color_Requester_Blue()
EndFunction n
` ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Function IncColor() : ` Inc the brightness of your selected colour by 1
DarkSide_Color_Requester_Inc_RGB
EndFunction
Function DecColor() : ` Dec the brightness of your selected colour by 1
DarkSide_Color_Requester_Dec_RGB
EndFunction
` ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
` Desktop Commands ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Function DesktopWidth() : ` Returns the Width in Pixels of your Desktop
n = DarkSide_Get_Desktop_Width()
EndFunction n
Function DesktopHeight() : ` Returns the Height in Pixels of your Desktop
n = DarkSide_Get_Desktop_Height()
EndFunction n
Function DesktopDepth() : ` Returns the colour depth of your desktop.
n = DarkSide_Get_Desktop_Depth()
EndFunction n
Function DesktopFreq() : ` Returns the Hz frequency of your monitor (ONLY WORKS ON SOME GFX CARDS)!!!
n = DarkSide_Get_Desktop_Frequency()
EndFunction n
Function DesktopTimer() : ` Returns the system timer (JUST ANOTHER VERSION OF THE DBPRO timer() COMMAND).
n = DarkSide_Get_Desktop_Timer()
EndFunction n
Function DesktopMouseX() : ` Returns the real x mouse position on your desktop.
n = DarkSide_Get_Desktop_MouseX()
EndFunction n
Function DesktopMouseY() : ` Returns the real y mouse position on your desktop.
n = DarkSide_Get_Desktop_MouseY()
EndFunction n
Function DesktopName() : ` Returns the name of your desktop
Old$ = Get ClipBoard$()
DarkSide_Get_Desktop_Name
n$ = Get ClipBoard$()
Write To ClipBoard Old$
EndFunction n$
Function GetOSName() : ` Returns the name of your OS
Old$ = Get ClipBoard$()
DarkSide_Get_Desktop_OS
n$ = Get ClipBoard$()
Write To ClipBoard Old$
EndFunction n$
Function ClipBoardLenth() : ` Returns the length of any text string in the clipboard.
n = DarkSide_Get_Desktop_Clipboard_Length()
EndFunction n
` ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
` Font Selector ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Function SelectFont() : ` This command will make the Font Requester appear on the screen.
DarkSide_Font_Requester
n$ = GetFontName()
EndFunction n$
` ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Function GetFontName() : ` Returns the name of the Selected Font
Old$ = Get ClipBoard$()
DarkSide_Get_Font_Requester_Font_Name
n$ = Get ClipBoard$()
Write To ClipBoard Old$
EndFunction n$
Function GetFontSize() : ` Returns the size of your selected font.
n = DarkSide_Get_Font_Requester_Font_Size()
EndFunction n
Function GetFontStyle() : ` Returns the style code from the requester, there are several combinations, but darkbasic pro will only support a few. ie:- 512=Italic, 256=Bold or 768=BoldItalic
n = DarkSide_Get_Font_Requester_Font_Style()
EndFunction n
` ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Function GetFontColor() : ` Returns the Selected Font Color
n = RGB(GetFontRed(),GetFontGreen(),GetFontBlue())
EndFunction n
Function GetFontRed() : ` These commands return the R G B colour values from the Requester.
n = DarkSide_Get_Font_Requester_Font_Red()
EndFunction n
Function GetFontGreen() :
n=DarkSide_Get_Font_Requester_Font_Green()
EndFunction n
Function GetFontBlue() :
n=DarkSide_Get_Font_Requester_Font_Blue()
EndFunction n
` ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
` Message Box Commands ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Function ShowMessageBox(Title$,Contents$,Style) : ` (A is a simple [Ok] box, Where as C will make a [Yes] [No] [Cancel] box)
DarkSide_Set_Message_Box_Title Title$
DarkSide_Set_Message_Box_Text Contents$
If Style = 1 Then DarkSide_Message_Box_A
If Style = 2 Then DarkSide_Message_Box_B
If Style = 3 Then DarkSide_Message_Box_C
EndFunction
Function GetMessageBoxResult() : ` Returns a result number for the button you pressed, (1=yes 2=no and 0=Cancel)
n = DarkSide_Get_Message_Box_Result()
EndFunction n
` ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
` Open, Save, Path Selectors ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Function ShowPathSelector() : ` This will show the windows path selector.
DarkSide_Path_Requester
EndFunction
Function SaveFileSelector(Title$,Path$,Ext$,ExtString$) : ` This will show the windows save file selector.
DarkSide_Set_File_Requester_Title Title$
DarkSide_Set_File_Requester_Path Path$
DarkSide_Set_File_Requester_Extension Ext$
DarkSide_Set_File_Requester_Extension_Pattern ExtString$
DarkSide_Save_File_Requester
EndFunction
Function OpenFileSelector(Title$,Path$,Ext$,ExtString$) : ` This will show the windows open file selector.
DarkSide_Set_File_Requester_Title Title$
DarkSide_Set_File_Requester_Path Path$
DarkSide_Set_File_Requester_Extension Ext$
DarkSide_Set_File_Requester_Extension_Pattern ExtString$
DarkSide_Open_File_Requester
EndFunction
` ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Function GetRequestedFullPath()
Old$ = Get ClipBoard$()
DarkSide_Return_File_Requester_Full
n$ = Get ClipBoard$()
Write To ClipBoard Old$
EndFunction n$
Function GetRequestedPath()
Old$ = Get ClipBoard$()
DarkSide_Return_File_Requester_path
n$ = Get ClipBoard$()
Write To ClipBoard Old$
EndFunction n$
Function GetRequestedFile()
Old$ = Get ClipBoard$()
DarkSide_Return_File_Requester_File
n$ = Get ClipBoard$()
Write To ClipBoard Old$
EndFunction n$
Function GetRequestedExtention()
Old$ = Get ClipBoard$()
DarkSide_Return_File_Requester_Extension
n$ = Get ClipBoard$()
Write To ClipBoard Old$
EndFunction n$
` ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I Don't know if its just me, But the Folder Selector Seems to Crash DBPro