alvingenius
IT Specialist
- Local time
- Today, 18:24
- Joined
- Jul 10, 2016
- Messages
- 169
Hello
I know it sounds weird, but I'm trying to build a form to act as Messagebox; with it, it gives an excellent look instead of the standard message box window
I've tried the formatted messagebox in AttentionSeek db of @isladogs, and it's not giving a look that a specific form gives!
here's a demo of the form and the look I'm expecting vs standard msgbox
So, I'm trying to build a custom function to handle it and for the msgboxstyle I wanna use this cases
and this function should use the same msgbox arguments of "prompt message", "Title", vbOkOnly, vbYesNo, vbInformation, vbCritical
and the user should call this function using "MsgboxFrm" instead of "Msgbox"
So the upper screenshot should be called via this code
I don't know how to proceed further.
Should it be built as a module, or should I use the Form that I made as message box on Form_load event !
how to get the message prompt and the title, and other msgboxstyles
how to detect what button the user clicked? how to pass this information to where I called the function to proceed with the actions related to the user choice (like how msgbox acts)
I wish I get help on this task, and I'm attaching the demo db that has the design of the form and the msgbox examples
I know it sounds weird, but I'm trying to build a form to act as Messagebox; with it, it gives an excellent look instead of the standard message box window
I've tried the formatted messagebox in AttentionSeek db of @isladogs, and it's not giving a look that a specific form gives!
here's a demo of the form and the look I'm expecting vs standard msgbox
So, I'm trying to build a custom function to handle it and for the msgboxstyle I wanna use this cases
Code:
Select Case vbMsgBoxStyle
Case vbOKOnly
frm_Messagebox.btnYesOk.Caption = "OK"
frm_Messagebox.btnNo.Visible = False
Case vbYesNo
frm_Messagebox.btnYesOk.Caption = "Yes"
frm_Messagebox.btnNo.Visible = True
Case vbCritical
' Set the image control to the critical image.
frm_Messagebox.imgCritical.Visible = True
frm_Messagebox.imgInformation.Visible = False
Case vbInformation
' Set the image control to the information image.
frm_Messagebox.imgCritical.Visible = False
frm_Messagebox.imgInformation.Visible = True
End Select
and this function should use the same msgbox arguments of "prompt message", "Title", vbOkOnly, vbYesNo, vbInformation, vbCritical
and the user should call this function using "MsgboxFrm" instead of "Msgbox"
So the upper screenshot should be called via this code
Code:
MsgBoxFrm "Are you sure you want to delete this record?", vbCritical + vbYesNo, "Delete Confirmation"
I don't know how to proceed further.
Should it be built as a module, or should I use the Form that I made as message box on Form_load event !
how to get the message prompt and the title, and other msgboxstyles
how to detect what button the user clicked? how to pass this information to where I called the function to proceed with the actions related to the user choice (like how msgbox acts)
I wish I get help on this task, and I'm attaching the demo db that has the design of the form and the msgbox examples