Announcement
Collapse
No announcement yet.
Tip: Instead of creating whole new program
Collapse
X
-
What, suggesting a little 'tinkering' to a self-professed hobbyist comes off as some kind of 'mandate' or 'command?'
You must have voted for Nixon.
(Just like I did).
MCM
Leave a comment:
-
The Perfect World
Originally posted by Michael Mattias;267427????
Works for me, should be worth a little 'tinkering time' for you.
MCM
The Perfect, albeit small, World.
Leave a comment:
-
>Would using a boiler plate template be easier, or some other method
I've certainly found the 'template files' handy. My "skeleton" program (the template file) does not include building any dialogs but it does include a 'skeleton' window procedure with some of the more common messages to be processed. I mean how many times do I really need to type
Code:FUNCTION WndProc (BYVAL hWnd AS LONG, byval uMSG AS LONG, BYVAL wParam AS LONG, BYVAL lPAram AS LONG) AS LONG (same old LOCAL vars I use all the time: i, hCtrl, szText, etc) SELECT CASE AS LONG wMsg CASE %WM_CREATE CASE %WM_COMMAND SELECT CASE AS LONG LOWRD(wParam) .... FUNCTION = DefWindowProc (hWnd, uMsg, wparam, lparam) END FUNCTION
Works for me, should be worth a little 'tinkering time' for you.
MCM
Leave a comment:
-
Originally posted by Michael Mattias View PostOr did you mean you don't want another *physical* file rather than need to put (type or cut/paste) all your "generic program" stuff into this new program?
Would using a boiler plate template be easier, or some other method? I don't know. I just know the method outlined above is convenient for me. And others may find it so as well (or not).
================================================================
People are what you make them.
A scornful look turns into a complete fool
a man of average intelligence.
A contemptuous indifference turns into an enemy
a woman who, well treated, might have been an angel.
André Maurois
================================================================
Leave a comment:
-
PBWin8+,PBCC4+ IDEs, Template files, File, "New File As..."
???
Or did you mean you don't want another *physical* file rather than need to put (type or cut/paste) all your "generic program" stuff into this new program?
Leave a comment:
-
Tip: Instead of creating whole new program
As many of us do I'm sure, I use PB to do lots of one time, or seldom used, jobs. Instead of writing a whole new .exe each time, what I do is just add a Sub to a commonly used program.
For example I use E-Z Post (extensively modified for my own purposes) a lot (for most of my posts here Where the "Sayings" are appended). So when I have short routine, I just add it to EZ Post under a "Miscellaneous" heading.
'Code:'at top of program %GHL_Lav_Comments_Update = 1239 ' 'In Dialog set up: Local h_PopUp11 As Dword hpp = h_PopUp11 'shorter coding Menu New PopUp To hpp Menu Add PopUp, g_hMenu, "Miscellaneous", hpp, %MF_ENABLED Menu Add String, hpp, "Convert Microlife File", _ %GHL_MicroLife, %MF_ENABLED Menu Add String, hpp, "Remove Extra Lines in File", _ %GHL_Temp_Use, %MF_ENABLED Menu Add String, hpp, "Operating System Version", _ %GHL_OP_Version, %MF_ENABLED Menu Add String, hpp, "MsgBox_To_Clipboard", _ %GHL_MsgBox_To_Clipboard, %MF_ENABLED Menu Add String, hpp, "Update Lavallette Comments File", _ %GHL_Lav_Comments_Update, %MF_ENABLED 'then in the main Callback: ' Case %GHL_Lav_Comments_Update 'or whatever Call %GHL_Update_Lav_Comments 'Sub that updates the Lavallette_Comments.shtml '
And while I'm working on a routine I call the Sub before showing the dialog in PBMain:
'Code:Function PBMain() ' Call GHL_zWorking ' Call GHL_Itunes_Tune_Up:Exit Function ' Call Word_Spelling_Search ' Call GHL_IntelliSense_Folder_Fix Call %GHL_Update_Lav_Comments '<== Rem after satisfied it's working ShowDIALOG1 %HWND_DESKTOP End Function
"Imitation is the sincerest form of television."
Fred Allen (1894-1956)
================================================================Tags: None
Leave a comment: