Do not let a program start twice (variables should not be the same as other programs ):
// Create mutexHANDLE hMutexWF = CreateMutex (NULL, FALSE, "WFBsNavRunOnlyOneInstance ");If (hMutexWF = NULL | ERROR_ALREADY_EXISTS =: GetLastError () // restrict Double Start{If (hMutexWF! = NULL){CloseHandle (hMutexWF );}Return false;}C ++ builder cannot be stretched:Set the Form attribute BorderStyle to bsSingle or bs
, ENABLED, property_on);Set_item_property (itemid, navigable, property_on);If the item is neither a display item or a button then also set:Set_item_property (itemid, queryable, property_on);Set_item_property (itemid, insert_allowed, property_on);Set_item_property (itemid, updateable, property_on);REQUIREDApp_item_property.set_property (itemid, required,property_on);is equivalent to:Set_item_property (itemid, REQUIRED, property_on);If the item is a currently hidden, no action is taken.Transferred
1. Declare the handler function and the message map in the form's header file. h, for example:[CPP]View PlainCopy
Class TForm1: Public tform
{
...
void __fastcall handledropfiles (tmessage Owner;
...
Begin_message_map
Message_handler (Wm_dropfiles,tmessage,handledropfiles)
End_message_map (Tform)
};
2. In the form's implementation file. CPP, add the codeIn the Formcreate event response:[CPP]View PlainCopy
void __fastcall tform1::formcreate
C ++ builder calls the dynamic link library written by vc
// Start the com LibraryWSADATA Data_WSA;Int nWSAStartup = WSAStartup (MAKEWORD (1, 1), Data_WSA );If (nWSAStartup! = 0){Return;}
// Load the dynamic link libraryAnsiString str = strPath + (AnsiString) "\ Net. dll ";HINSTANCE handle = LoadLibrary (str. c_str ());If (handle = NULL){Return;}
// Open the
I wrote a software in C ++ Builder 5.0 and chose the Release method for compiling. However, it cannot run in windows. The following prompt is displayed:
Running the program depends on VCL50.BPL. It turns out that BCB has not been installed in Windows2000, so this file is not in the system directory. The solution is to remove "Build with runtime Packages" from the select Option-> packages page during compilation ".Copy the program to Windows2000 aga
Bootstrap Form Verification formValidation implements form dynamic verification, and validation Form Verification
Add input dynamically and add new verification methods dynamically!
Init status:
Click "+:
After verification:
Knowledge point:
1 first go to the official website download: http://formvalidation.io/
2. I
Recently in a project implementation process, because the customer is the domestic business leader, business forms are not really determined, has been constantly improving. So the business form of the program has been diverted by customers, has been following the business changes, to be very good support for the entire project and the realization of the real sense of the business form and the whole project
1 Application Scenarios
It is often necessary to create a form dynamically, or to add a new data template, which makes common Java solutions difficult because of the need to create tables dynamically at run time and to maintain table fields and even tables relationships dynamically.
2 Implementation Tools
Hibernate + Spring + Groovy +freemarker
Hibernate is very simple. responsible for creating database tables This prevents us from writing complex
Dynamic form: beanutil
There is a project at apache.org: Common-beanutil, which is a very good tool library for operating JavaBean. It can copy-copy bean attributes, or generate a bird's nest bean. In a dynamic form, I need to generate the table DDL and the JavaBean corresponding to each table f
The dynamic SQL times error is performed today in FORM Builder with execute immediate ' SQL Staments '.It is found that the dynamic SQL is executed with the FORMS_DDL function in the form, and this function implies commit;Detailed descriptions are as follows:First, Forms_ddl
Introduction of dynamic form
Although Actionform is powerful, it is sometimes troublesome to use. For each user input interface (JSP page), you have to create a actionform subclass to correspond to this page. Of course, we can use nested attributes to some extent to remedy this problem. However, when creating new user input interface, it is unavoidable to establish new Actionform subclass.
A technique for
box, password box, hidden field, multi-line text box, check box, single choice, drop-down selection box, and file upload box;
3. Form button.
2. Form Design
2.1 static forms
All form items in the form have been fixed in advance, for example, how many form items are the
validation logic for the form. This method not only achieves data verification but also achieves data buffering. In the validate method, it verifies the validity of the form submitted by the user. When the form verification fails, it will automatically return to the user input page, at this time, all user input values are saved in ActionForm. When a page is retu
In the previous section (1) (2), we analyzed the dynamic implementation of form fields. That is to say, the form field or each space displayed on the page is not an html Tag. It loops through the Retrieved Data and judges dynamically generated forms. The advantage of this design is that you can directly modify the table in the
].DataType = ftBlob) then begin with TDBImage.Create(Self) do begin Parent := TabSheet3; Left := 126; Top := Y - 4; Y := Y + 204; Height := 200; Width := 200; DataSource := DataSource1; DataField := ClientDataSet1.FieldDefs[i].Name; end end;
In the example where you have selected the picture, firstnme, lastname, phoneno, hiredate, and sex fields, result 3 of the Code is shown.
Figure 3. Dynamic Data Control Preview
Note that there is
ActionMessage("error.valudate.inputnumber"));// errors.add("error1",new// ActionMessage("error.valudate.inputnumber"));}if (this.isZero(cf.getNum2())) {// errors.add("error2", new ActionMessage("error.valudate.number"));errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("error.valudate.number"));}
Use
When using dynamic form for simplified development and using struts framework for development,
Dynamic Preface: Many Web designers may have faced the problem of designing a form for users to input, the user entered the content into the database, but the user input is not the type of content (numeric field but input text) Situation or the user input content does not meet the requirements of the System Manager, but can not remind the user where the error in order to allow users to fill out the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.