3ENGINE

programación y otros cachivaches

Categoría: English

English, Tecnologia

How to insert an InputBox in C#


Although seem lie, in the C# language not exist a dialog box for ask a data. If you don’t want create your own dialog box and don’t need personalize it, you can use the sentence Inputbox that you can find in Microsoft.VisualBasic assembly.
This sentence show a modal dialog with a label, text box, a button accept and other button for cancel.

The definition of sentence InputBox is as follow:

  • Prompt: Dialog message
  • Title: Optional. Dialog title.
  • DefaultResponse: Optional. answer by default.
  • xPos: Optional. Coordinate X, centered by default.
  • yPos: Optional. Coordinate Y, centered by default.

Steps for insert an InputBox in C#:

1. Insert a reference to Microsoft.VisualBasic assembly:

How to insert an InputBox in C# - 1

How to insert an InputBox in C# - 2

2. Insert the sentence:

Note: if the user cancels the dialog then the statement returns an empty string

Result:

How to insert an InputBox in C# - 3




English, Tecnologia

How to retrieve email sent from outlook


You can retrieve a email missing of the outbox if the person to which the mail is addressed has not read.

1. You go to the outbox and search the message to recover. Open it and select “Other action > recover message…”:

retrieve email sent from outlook

2. If successful, you will receive a message like this:

retrieve email sent from outlook




English, Tecnologia

How to fix the WordPress error “Fatal error: Allowed memory size”


If WordPress show a message error “Fatal error: Allowed memory size”, for example to add a picture or installing a new plugin in your wordpress account. This is because you are exceeded memory limit reserved to PHP and you need increase it. I propose different solutions.

Wordpress error "Fatal error: Allowed memory size"

Solution at WordPress error “Fatal error: Allowed memory size”

Login via FTP client (Filezilla for example) to your hosting account and try to solve the problem
with one of the following solutions:

  1. Edit wp-config.php file, the file is in the blog root folder and add at the end define(‘wp_memory_limit’,’XXM’); where XXM is the amount of memory you need:

    If you don’t solve the problem, try with define(‘WP_MAX_MEMORY_LIMIT’, ‘XXM’)
  2. Edit .htaccess file, this file is in the blog root folder (probably hidden)
    and add the code line php_value memory_limit XXM:
  3. Try to increase a memory specified in the default-constants.php file,
    this file find it in wp-includes folder. Edit line 9 where in the example
    is define(‘WP_MEMORY_LIMIT’, ’48M’); and especified increasing the memory you need:

    If your wordpress install is multisite, then modify line 7 where in the example is define(‘WP_MEMORY_LIMIT’, ’64M’);