lolafuertes 145 Master Poster

That question is really generic, so i'll try to answer in a generic way.

As you can expect, the answer is 'That depends on what the click does'

  • If the button click adds one to a counter, the undo can subtract one from the same counter. In this case, once undone, the undo option should be disabled.

  • If the button click deletes a file, then the undo must recreate the file and fill it with the original content.

In general, in order to be able to do an undo, you need to persist the current status, before doing the action by the click, in order to be able to restore it from the result, if an undo is required. When the undo is done, then you must 'destroy' the containter that holded the status, because you cannot use it to 'repeat' the undo.

You will be aware that if more tan one undo is required, then you'll need to persist the status several times, being able to know the exact order of creation.

Hope this helps

TnTinMN commented: nice description +6
adam_k commented: Agree +8
lolafuertes 145 Master Poster

When calling the class where the form is to be used, pass the form as parameter ByRef.

Hope this helps

xHellghostx commented: Thank you.. I made it work +0
lolafuertes 145 Master Poster

I am confused ...

the image is already uploaded and saved on the folder

i have a fieldo n my db img and the data type of it is image...

According to your words, you have 2 images.
Wich image do you want to upload, the one in the folder or the one in the DB?

lolafuertes 145 Master Poster

Maybe we can help if you put your code and also the db structure. Otherwise ...Is difficult to imagine what is going wrong, if any thing is wrong.

lolafuertes 145 Master Poster

In my opinion, the curent behaviour is because you launch an async action (new thread) and then do not wait for completion on current.

After launching the DownloadFileAsync, you must do a

while (wc.IsBusy){ Application.Doevents();} 

to wait for completion in the current thread, then you can finish. (see this)

Hope this helps

Ketsuekiame commented: Ah yes, I missed this. Effectively the op will start the download and then it will exit. +8
Gerardo_2 commented: Excelente, gracias!! +0
lolafuertes 145 Master Poster

Wich is the confusing result?

lolafuertes 145 Master Poster

Probably because the default is to declare the Modifier property of the controls in a form as Private. Change it to Public to access to its properties from another form.

Then to create the new form Form2 and show it, you need to pass the Form1 be reference to the Form2 like:

Dim f2 as new Form2(byref Form1)
f2.Show()       

and in the Form2, you shoud change the

Public Sub New()
    InitializeComponent()
End Sub

to

Dim F1 as Form1
Public Sub New(ByRef TheF1 as Form1)
    InitializeComponent()
    F1 = TheF1
End Sub

Then, later, on Form2 you can use:

F1.tsComboBox.Name

Hope this helps

lolafuertes 145 Master Poster

You can use some thing like this untested code:

Dim selectedValue As String = ""
If not tsComboBox.SelectedItem is Nothing then
    selectedValue = CStr(tsComboBox.SelectedItem)
End If

MsgBox("The selected value is '" & selectedValue & "'")

Hope this helps

lolafuertes 145 Master Poster

An overflow can occur when the recipient field is not larger enough for the data to be inserted.

I.E.: if the initial field in the DB is defined to be 1 carácter long but the current intial.text contains 2 characters, an overflow will occur.

Hope this helps

lolafuertes 145 Master Poster

IMO, the easiest way is playing with the security tab of the properties of the folder, only allowing to acces there to the users you really authorize to it.

Also, if you need it, you can add users to the computer on the Users link in the Control Panel, to allow them to see your folder.

Hope this helps

lolafuertes 145 Master Poster

Freeing memory is based on two points:
* Do not start what you do not need
* If it is an option, try to limit the memory usage of the running applications and services by configuring them, if they have this option.

Windows uses virtual memory addressing. Based on that, every process automatically reserves up to 4 GB of memory (in 32 bit processor or compatibility mode) 2 of them for code and the other 2 for data.

Of course, you do not have all the phisical memory for that, so the OS uses a method of paging memory in blocks of 4 KB, and reservers as many pages are currently used, reserving more or less dinamically while the process is running.

For each process, including the kernel, there are some pages that must be allocated in phisical memory, while others can be on virtual.

Virtual memory is easely extended by using one(or more)file called swap file, that will hold a copy of the really reserved pages, while in memory exist only those really needed at the current point of the process. When a page is not needed anynmore in the phisical memory is copied back to the disk, and when a page, that does not exist in the phisical memory, is needed, it is read from the disk.

Thus the current memory usage and the commited memory can have distinct values.

But using disk as memory is near 1 million times slower than phisical memory.

In order …

lolafuertes 145 Master Poster

Did you search on this page?
Hope this helps

lolafuertes 145 Master Poster

For help, please read here

lolafuertes 145 Master Poster

Glad to hear.
Please mark a s solved. Tx.

lolafuertes 145 Master Poster

The response from Beggierdev mostly will solve your problem.

In case that does not, the message

The error is: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.

means that you are trying to insert or update a record in the database. Te record being updated or inserted is not well formed by one (or more) of the reasons exposed:
a) almost one field in the record is null but the definition in the DB requires to be not null
b) the field(s) forming the primary key value of the record will create a duplicate key entry in the DB, amd this is not allowed
c) almost one field in the record has some content the must exist in a related table (foreing key restriction) but does not.

I'll suggest to check the values being inserted or updated in the DB to find where the problema is.

Hope this helps

lolafuertes 145 Master Poster

An example by Darin Dimitrov on StackOverflow:

Dim result = MessageBox.Show("message", "caption", MessageBoxButtons.YesNoCancel)
If result = DialogResult.Cancel Then
    MessageBox.Show("Cancel pressed")
ElseIf result = DialogResult.No Then
    MessageBox.Show("No pressed")
ElseIf result = DialogResult.Yes Then
    MessageBox.Show("Yes pressed")
End If

Hope this helps

Begginnerdev commented: Exact same code! =D +6
lolafuertes 145 Master Poster

The Audio class does not supports volumen manipulation.
See on this link for a Nuget Audio Package.

Hope this helps

lolafuertes 145 Master Poster

Every time you need to acces to a listview ítem, the virtual retriever is called, as many times as needed, to obtain the virtual ítems collection for the purpose of the current action being done.
See this info from the library.

Hope this helps

lolafuertes 145 Master Poster

I am not really experienced with WIA but...

I understood that the problema arises when connecting the second time. I this is true, then connecting only once may do the trick.

Did you tryed to connect to the scanners only once, at main program level, then pass (by ref) the device infos for the loop?

Hope this helps

lolafuertes 145 Master Poster

Here a short video on how you can do it

Hope this helps

lolafuertes 145 Master Poster

Please read this

Hope this helps

lolafuertes 145 Master Poster

You can not bind more tan one datasource to your grid. If the data is only to be shown (not added nor modified) you can create a view, joining the 2 datatables by a relevant criteria.

To help you more, we will need more info about your tables and the technology behind.

lolafuertes 145 Master Poster

Are you using ADO, OLEDB or DAO?
Are you using an ODBC source?
Wich is the Access versión?
Can you put your connection string?

lolafuertes 145 Master Poster

On the computer '192.168.1.24' should exist a shared folder published as 'LandTransfer'.
When you share the folder, go to the advanced share options, and set the share permission to full for every.

If the computer '192.168.1.24' belongs to an Active Directory Domain, and yours also, to the same domain, then on the '192.168.1.24' computer you must give permissions to domain users to the folder to modify (not to the share). Otherwise, if both computers are stand-alone (not acive directory integrated) you must create a network unit( S: or what else is free) , pointin to the share in '192.168.1.24' and supply the user credentials using the computername\username and the passwor for an existing user in the '192.168.1.24' computer. In this case, you must change your connection string to "S:/Database/LTMS.mdb".
Alsu you'll need to give local modify permissions to the folder for the username credential you used. (see this KB)

@begginerdev: An Access db can be acessed from many users at same time. See this article.

hope this helps

lolafuertes 145 Master Poster

To preserve the old DB, do not include the DB it self in the setup, or when publishing, and also you can create a setup to include the db if it does not exists. (Please see the installshield help on dependencies).

Hope this helps

lolafuertes 145 Master Poster

Maybe inserting values directly is a tricky way.
Please, read this article. I am sure it will help you.

lolafuertes 145 Master Poster

This KB may help you

lolafuertes 145 Master Poster

Just continuing with the very good Reverend Jim suggestions, also, in the case the file has the readonly flag set, remove it using the line command ( cmd.exe), then navigating to the folder where the database is located an using the
attrib -r dbfile.acc
Instead, if the database is being accessed through a shared folder, ensure that the sharing permissions are set to everyone full access.

Hope this helps.

lolafuertes 145 Master Poster

Please, can you clarify what is supposed to return the ldap(PUROK,10)?

maybe the sentence SELECT PUROK FROM TBLPUROK ORDER BY PUROK ASC does the trick.

Hope this helps

lolafuertes 145 Master Poster

Just to clarify,

Do you need to "update" an existing record in a table in your MySql database, or you need to insert a new record with this info?

Has the record a unique identifier (or primary key)? How is the design ot the MySql table and relations (if any)?

Did you already wrote some thing related to this? (if yes, please post here)

Thaks in advance for your feedback.

lolafuertes 145 Master Poster

Tx.
Please, if this solved your issue, mark this thread as solved.
Tx in advance.

lolafuertes 145 Master Poster

Usually you should contact your bank an they will give you all you need.

To integrate PayPal, visit the PayPal site.

Hope this helps

lolafuertes 145 Master Poster

Maybe helpful to start on the thread "read-csvtxt-file-into-datagridview"

Hope this helps

lolafuertes 145 Master Poster

Maybe you'll start here with this c++ example and here with c++, c# and XNA.

Hope this helps

lolafuertes 145 Master Poster

That depends on the manufacturer of the memory.

Try the Wbemtest.exe and verify the query results. (see here for a guide by example)

Hope this helps

lolafuertes 145 Master Poster

Instead of using the numeric index for the fields, you can use the field name to get a particular field. So instead of adding all the fields, you should determine, one by one, wich of them are to be added as subitems in the ListView.

I'll suggest to entirely move the presentation of the ListView into an independent procedure that can be called from any 'thrower'. In your case, callit from the radio button checked change event, when the checked state is true.

Hope this helps

lolafuertes 145 Master Poster

Your INSERT statement looks like:

Dim sql As String = "INSERT INTO [BuyNewTender] ([ProjectTenderingNO] ,[TenderingNo] ,[ProjectName] ,[Clientname] ,[PurchasePrice] ,[BuyDate] ,[TenderClosingDate] ,[DocumentDetail] ,[Notes]) VALUES() (@ProjectTenderingNO,@TenderingNo ,@ProjectName ,@Clientname ,@PurchasePrice  ,@BuyDate ,@TenderClosingDate  ,@DocumentDetail] ,@Notes)"

SQL executes this sentence by evaluating first

INSERT INTO [BuyNewTender] ([ProjectTenderingNO] ,[TenderingNo] ,[ProjectName] ,[Clientname] ,[PurchasePrice] ,[BuyDate] ,[TenderClosingDate] ,[DocumentDetail] ,[Notes]) VALUES()

wich results in an empty set of values, then evaluates the

(@ProjectTenderingNO,@TenderingNo ,@ProjectName ,@Clientname ,@PurchasePrice  ,@BuyDate ,@TenderClosingDate  ,@DocumentDetail] ,@Notes)

wich results in an evaluation of values in the memory of SQL server not needed any more and discarded.

There is no Exception because the sintax is mostly 'valid'.

I'll suggest to remove the () in the line 148. Also the ] in line 156.

Hope this helps

Reverend Jim commented: Good to see you back.. We missed you. +11
lolafuertes 145 Master Poster

You will need to have a static value that will represent the last systemuptime since you suspended the computer, not from the very first start.

Hope this helps

lolafuertes 145 Master Poster

I hope you don't expect that some one will write the code for you, but i'll try to enlight on how to proceed.

Basically you'll need to add 2 other buttons in the design of your form:

Button2 -> Stop
Button3 -> Reset

If you double click on the buttons, this will generate the click event for you.

On button1_click , replace the current code by: let the da assignement and do the timer start.

On button2_Click do only the timer stop.

On button3_click if the timer is enabled let the da assignement.

Hope this helps.

lolafuertes 145 Master Poster

The problem arises because the PickedWord is null in this context.

Be aware that C# is capital aware so the playHangman class for the main program and the PlayHangman class gor the game management are not the same.

So when in the playhangman class you wrote

  1. PlayHangman playHangman = new PlayHangman();
  2. Word PickedWord = pickedWord;

probably you'll need

97.                        PlayHangman playHangman = new PlayHangman();
98.                        playHangman.PickedWord = pickedWord;

I also will suggest not to reuse the class name as a variable name because may be confusing.

Hope this helps.

lolafuertes 145 Master Poster

Pleas, post here your report definition to see what happens.

lolafuertes 145 Master Poster

To use the Explorer is a must?
Explorer uses the Indexing Service to speedup the searches, or literlally opens any text file to read the contents searching whatever you put in the serach field.

Maybe you need to use the old DDE (Dynamic Data Exchange). To be used from a .NET, maybe you can use this library as an starting point.

If you prefer to use the Indexer Service, here you can find some interesting info.

Hope this helps

lolafuertes 145 Master Poster

I think this link can help you

Because on the tnsNames.ora file you already have an XE entry, maybe you only need to declare the connection string as
"Data Source=XE,UserID=user_test,Password=sonia;"

Hope this helps.

lolafuertes 145 Master Poster

Maybe you can use this article for your pourpose.

Then, in order to launch the command you can use this code.

Hope this helps

lolafuertes 145 Master Poster

Use a LINQ->Any having the appropiate comparasion function. For an example see here

Begginnerdev commented: Thank you for your help! +5
lolafuertes 145 Master Poster

Please, read this walkthroug from msdn

lolafuertes 145 Master Poster

Thepending on the computer language the C:\Users folder can change. IE in Spanish is C:\Usuarios.

You should use the special folders naming in order to obtain the right name of the folder.

Hope this helps

lolafuertes 145 Master Poster

There are some tools that already do that like ultraVNC(free), TeamViewer, remotePc, etc.

Tha base for all them is to create a service that will be installed and run in the machine to be viewed. This service will capture all the screen changes, keyboard keys pressed, mouse movements, sound, and any related relevant info, every time they occur. Usually, shoud have a listener function and a server function. The listener will receive the request to send the info to one remote computer and will trigger a first screen capture to send it, then the server will start to send all the intercepted changes, until the listener receives an stop sending, or does not receives an aknowledge for several amount of time.

On the viewer machine you should have an application that allows you to communicate with the service in the viewed machine, an will send the request to the listener, then start receiving the info from the viewed machine and will send an aknowledge frecuently enough for the viewed machine be aware of the viewer one. Finnaly will send an stop sending to diconnect from the viewed machine.

Is important to have in mind all the diferences between distinct OS and their corresponding versions, and remember all the security concerns.

There are some protocols you can take as an example like RDP. You can also obtain info and examples of ultraVNC here.

Hope this helps.

lolafuertes 145 Master Poster

To get help, first see the 'Read This Before Posting' thread by ReverendJim.

lolafuertes 145 Master Poster

Yes, you can.

Is it a requirement to use the name of the variable stored in database?

In order to mantain the name of the variable at run time, I would suggest to use a list of type Dictionary having the name of the variable as the key, and the variable it self as value.
In order to be a homogenius dictionary, I would suggest to cast all the variables to Object if not all of them are of the same type (ie: string)

Example:

Dictionary<string, string> MyListOfVariables;
//
foreach(string newVariableName in DataBaseListOfVariablesNames)
{
    string n = "";
    MyListOfVariables.Add(newVariableName, n));
}

Hope this helps.