Any error? what is the expected result? can you pot something else that helps us to help you?
bluehangook629 commented: Good stuff +3
lolafuertes 145 Master Poster
Any error? what is the expected result? can you pot something else that helps us to help you?
Glad to hear you solved it.
Please, be so kind to mark the thread as solved.
As the System.Windows.Forms.LinkLabelLinkClickedEventArgs contains the LinkLabel.Link you can use it to do your work. Yu'll need only one Sub like:
Private Sub LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs)
Listbox1.Items.Add(e.Link.Text)
variable = e.Link.Text
End Sub
Then, on the click event of each link label defined, change it to point to this sub.
Hope this helps.
Did you used the SQL Server Configutration Manager on the server and verifyed the Protocols? Usually you need to enable TCP/IP and Named Pipes (Shared Memory is by default).
Also, in the client, you need to enable them and set the order to Shared Memory, TCP/IP and Named Pipes.
Please let us know
Hope this helps
With only one filed, you only can add the text explaining the rule, IE:
"Classes:1-9;Books:1;Weeks:1"
"Classes:10-12;Books:2;Weeks:2"
Here, I used the ; sign to separate concepts, I used the : sign to separate Identifiers from their values and used the - sign to separate the bounds.
You can create the filed content easely by concatenating the right words, separators and values.
You can 'decript' the field using the string Split() function 3 times. The first using the ; as separator to get the Keywords and the values, each in a separate string (3 strings in this case).
The second, for each KeywordAndValue string obtained, you can use the Split() function with the : as separator to obtain 2 strings: the Keyword and the Value
The third, for those kywords that have bounded values, you can use the Split() function again with the - as separator, to obtain the lower and upper values.
Hope this helps
If your is not a SSD and If there is a phisical error on disk, like a depression or surge, you can reformat it, but each time the disk header goes over the wrong area, it expands the problem.
Usually, if W7 was preinstalled, you should have a partition with the 'reinstallation' and 'diagnostics'.
Usually, after the preinstallation has finished, you created a DVD or some thing alike, with all this stuff.
With the diagnostics, there should be one that can verify your disk for hard errors. Also you can fully test your memory and video cards.
If this is the case, the only solution is to replace the disk.
Oh, I assumed that after all the trys, you also tryed to start in safe mode without networking and, even in this situation, you are not able to load the OS.
Also assumend that, after all the boot interruptions, a chec disk was performed.
Well, hope this helps
Glad to hear that. So please, be so kind to close this thead.
No dout to start a new one if you have some additional questions.
Well done. This is a good point to close this thread and start a new one.
Then try
Conn.Open()
before executing the command.
Hope this helps
Please, change the following
Catch ex As Exception
lblError.Text = "File could not be uploaded. " & ex.Message
End Try
And what is the ex.Message value?
Before Conn.Close, you need to do a
cmd.ExecuteNonQuery
Hope this helps
You can access. No problem.
As said by dimsums, go to Control Panel, and, in the Folder Options, select to show every thing, even it says that maybe dangerous. Reset all folders and set this as default. Accept it.
Then go to the C:\ and yu'll see the folders. If you can not, refresh the c: folder contents. If you still not, then restart the computer.
If still not, you must change a kay in the registry to show the superhidden files following those steps:
1)Start
2)Run
3)Regedit
4) Goto Registry Key: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced
Data Type: REG_DWORD [Dword Value]
Value Name: ShowSuperHidden
5) Modify/Create the Value Name [ShowSuperHidden] according to the Value Data listed below.
Value Data: [0 = ShowSuperHidden Disabled / 1 = ShowSuperHidden Enabled]
6) Exit Registry and Reboot
Now you'll see a lot of unknown files and folders with strange names, starting with double $, etc. Do not pick on them or you'll crash your system.
Verify the contents of the folders found by Nero, and if you still convinced, delete them.
Set back every step you did to see the folders. And restart the computer, of course :)
Hope this helps
Steps on VS2010:
Method A)
1)Select your project
2)Right click and select the option Add
3)Select the option Existing Item
4)On the lower right corner Select the option All Files (*.*)
5)Using the left pane, nevigate to the place where the image or icon is located
6)On the right pane, select the image you want to include and click on the Add button located in the lower right corner.
7)The image is copied into the source folder of your project.
8)On the Solution Explorer select the image and right click. Select the Properties option.
9)On the properties pane, find the Build Action. Change it to Embedded Resource.
10) Save your project
Method B)
1) Select your project.
2) On the VS2010 Menu, select Project, then the las one (yourprojectname properties)
3) Select the resources tab
4) On the top of this form, Click on Add Resource
5) Select the Add existing file
6) Continue with the steeps 4 to 7 of method A)
7) Select the image in the Resources tab, and see the properties pane
8) Find the persistance option and change it to Embedded in .resx
9) Save your project.
Hope this helps
Add the image as new item in your project. Use the *.* filter to locate it, and insert.
on your project, select the image prperties and change the build action to embedded resource.
Hope this helps
Also, the Found.0001 and Found.0002 are usually hidden folders created by check disk utility when some problems found on it. Mostly when the disk is on any kind of FATS formatted.
I'll suggest to verify this point and change the format to NTFS using the CONVERT utility (see here for help)
Hope this helps
If you see the epson printer in the Control Panel -> Printers then you can open it an see the queue of pending (is any) document to be printed, and those being printed (if any).
If all this happens then the printer is configured as an standard printer using spooler.
Once opened, On the Printer menu, select the properties.
usually on the first (general) tab, there is a button to print a test page. Give it a try and a test page should be printed.
If not, Goto the Ports tab an verify to which port is connected; should be one of the ports COM1: to COM4:.
If this is true, go to the Control Panel - Devica Manager and verify that the Ports COM are there, and that the printer is there, both witout a warning nor a stop.
I don't think you'll need the POS.NET to solve this issue.
Hope this helps
Is your printer configured as an standard printer using the spooler to be managed?
If yes, is it the default printer?
If not, you must select it as default printer before calling the Print().
Please see here how to define the printer to be used.
Hope this helps
I will suggest to insert
sqlStatement = New SqlCommand()
before
sqlStatement.CommandType = CommandType.StoredProcedure
This will empty the previous contents if any.
Hope this helps
In resumee, you can do some thing like this untested code:
Imports System.IO
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If RadioButton2.Checked = True Then
Dim name As String = My.Computer.Name
Dim path As String = My.Computer.FileSystem.CurrentDirectory & "\MACLIST.txt"
My.Computer.FileSystem.WriteAllText(path, "______________________________________" & vbNewLine & vbNewLine, True)
My.Computer.FileSystem.WriteAllText(path, "USER: " & TextBox2.Text.Trim & vbNewLine & vbNewLine, True)
My.Computer.FileSystem.WriteAllText(path, "______________________________________" & vbNewLine & vbNewLine, True)
My.Computer.FileSystem.WriteAllText(path, "COMPUTER: " & name & vbNewLine, True)
'
' Here put the wireless if any
'
Dim wirelessStrings() as String = GetWireless()
If Not wirelessStrings Is Nothing then
ForEach s as String in wirelessStrings
My.Computer.FileSystem.WriteAllText(path1,s & vbNewLine, True)
Next
End If
My.Computer.FileSystem.WriteAllText(path, "______________________________________" & vbNewLine & vbNewLine, True)
ElseIf RadioButton1.Checked = True Then
TextBox1.Enabled = True
If String.IsNullOrEmpty(TextBox1.Text.Trim()) Or TextBox1.Text.Contains(".") Then
MsgBox("Please enter a valid output file name")
Else
Dim name1 As String = My.Computer.Name
Dim path1 As String = My.Computer.FileSystem.CurrentDirectory & "\" & TextBox1.Text.Trim & ".txt"
My.Computer.FileSystem.WriteAllText(path1, "______________________________________" & vbNewLine & vbNewLine, True)
My.Computer.FileSystem.WriteAllText(path1, "USER: " & TextBox2.Text.Trim & vbNewLine & vbNewLine, True)
My.Computer.FileSystem.WriteAllText(path1, "______________________________________" & vbNewLine & vbNewLine, True)
My.Computer.FileSystem.WriteAllText(path1, "COMPUTER: " & name1 & vbNewLine, True)
'
' Here put the wireless if any
'
Dim wirelessStrings() as String = GetWireless()
If Not wirelessStrings Is Nothing then
ForEach s as String in wirelessStrings
My.Computer.FileSystem.WriteAllText(path1,s & vbNewLine, True)
Next
End If
My.Computer.FileSystem.WriteAllText(path1, "______________________________________" & vbNewLine & vbNewLine, True)
End If
End If
TextBox1.Enabled = True
Button2.Select()
End Sub
Private Function GetWireless() as string()
Dim ReturnInfo() …
I would sugest:
First, install an antivirus, antispam, antiads and verify if you have any in your system.
Second, when you are sure your system is clear, change the password to a strong one (ie. 16 digits containing uppr and lower case letters, some digits and a couple of special signs)
Third, you can try (as in some TV series) to searach the source of the logins into your gmail account. And act according.
Hope this helps
The IndexOf function from the string class will do the trick.
Please read here on how to use it.
Example:
If TheCurrenLineread.ToLower.IndexOf("wireless") <> -1 then
' found
Else
' Not found
End If
Hope this helps
Not from my knowledge. The proces start determines if the target is an executable. If not tryes to search for the default program associated with the extension and launches it like if you double click on the file.
If you want to interact with Excel, you'll need to use the Excel interop object model.
You can read http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel(v=office.11).aspx for more info. And here for howtos.
Hope this helps
I can't tell you wy, but is very simple the how.
For example, you send some one a mail from your account. This people forwards your email address to the spammer without cleanig it, so your email account appears in the body.
The spammer uses your account in the FROM clause of a SMTP message.
No matter if you have Linux or Firefox or both. Anyway, there are antivirus programs for Linux, and I suggest to use them.
I suggest to read about SMPT here.
Hope this helps
Just the 192,168.x.x are class C free net addresses to be used in the intranet. No ISP can sell them.
Usually, the ISP sells you an IP address range, with a certain number of valid addresses in it, by means of a mask.
Any way, the IP you bough will mean the full range of addresses, according to the mask your ISP assigned to you.
The main IP, itself, will be the gateway for the first subnet.
Hope this helps
Because teh getmac command it self has no way to filter the contents, I will suggest not to set the output to the same output file you are writing.
Instead, you can send the output, in overryde mode (only one > sign), to another file name like 'tempmac.txt'.
Then, using the ReadAll function, you can read all the contents ina a variable in your program.
Using the string split function, will separate the variable into lines using the Control Char crlf as separator.
Then you can cicle over the returned lines and consider only those starting with wireless.
Hope this helps
Maybe this article can help you to understant the data table object in Visual Studio.
Hope this helps
Can you be so kind to show your current code?
In the stored procedure source, you can remove the line that drops the temp table. This is done automatically by SQL.
When you say 'I try to import this sttored procedure' into VS2010 I do not understand what do you try.
The stored procedures can't be imported into a DS. They must be used as a stand alone SQLCommand.
The sintax for the SQL Command can be:
Dim sqlCmd as SQLCommand = new SQLCommand("EXECUTE MyStoredProcedure")
Then it can be used in a select for a data adapter to fill a table, or for a data reader.
In order to try to help you, please post the piece of code where you try to use the stored procedure.
Hope this helps
The best way is to reset the LiveBox to the default values. Then you can see the default values in this french page.
Hope this helps
Did you tryed to join all the values in a string, then use it to fill the list view subitem?
IE:
string thetextToShowInTheCell="";
foeach(string valueToshow in ListOfStringValuesToShowInTheCell){
if (thetextToShowInTheCell.Length>0) thetextToShowInTheCell+=", ";
thetextToShowInTheCell += valueToshow; }
Hope this helps
Well, If you did'nt that, who did?
Some one wrotes this function, expecting to be implemented in the future, and, in the meanwhile, and to remember that some process is to be done here, the author wrote the sentence to throw a not implemented exception.
If you do'nt need this function, just comment it, else, remove the sentence and fill in.
Hope this helps
Lets imagine that a user control has a property called connectors
This property can be a list of conector.
A conector is an object that has an ID, a property Connected with a value of true or false and, if true has a ConnectedTo object of type conector.
Once graphically via drag/drop you 'connect' from connector A of element1 to connector B of element2 you only need to add new conector object in the list of element1 with the id of the source conector, the connected value to true an the destination conector of the element2 selected by the drag/drop.
Once that, if a signal is to be output from the element1, you only will need to search in the list of connectors the connected ones, and send the 'signal' to the referenced element.
A good way to do that is suscribing the element2 input signal yo the output signal of the element1 via events and delegates.
Just a hint.
Well done so far. But... There is always ...
Obviously, you still need to create the temporary table before, but it will need to have all the destination fileds like:
CREATE TABLE #Total(
InID nvarchar(10)
, InDate datetime
, OrderId nvarchar(15)
, Shipper nvarchar(20)
, Carrier nvarchar(20)
, Qty int
, User nvarchar(20)
)
I suggested to create a cursor to cicle over every record in the tblIn, but you did'nt.
To create a cursor please read here
I would suggest the following cursor:
DECLARE tblIn_Cursor CURSOR FORWARD_ONLY FOR
SELECT tblIn.InId as InId, tblIn.InDate as InDate, tblIn.OrderID as OrderId, C1.Companyame as Shipper, C2.ComapnyName as carrier, tblUser.Fname + ' ' + tblUser.Lname As User
FROM tblIn
INNER JOIN tblCompany C1 on C1.CompanyID = tblIn.ShipperID
INNER JOIN tblCompany C2 on C2.ComapnyID = tblIn.CarrierID
INNER JOIN tblUser on tblUser.EmpId = tblIn.EmpId;
Also you will need to declare a few variables and adjust the types according (here only a suggestion):
DECLARE @InId nvarchar(10);
DECLARE @InDate datetime;
DECLARE @OrderId nvarchar(15);
DECLARE @Shipper nvarchar(20);
DECLARE @Carrier nvarchar(20);
DECLARE @User nvarchar(20);
Also you will need:
DECALRE @CountOfTblInventoryDetail int;
DECLARE @CountOfTblWrongRa int;
DECLARE @SumOfTblinBulk int;
Then you can open the cursor and fetch the next record
OPEN tblIn_Cursor;
FETCH NEXT FROM tblInCursor INTO @InId, @InDate, @OrderId, @shipper, @Carrier, @User
Then you will need a WHILE loop like:
WHILE @@FETCH_STATUS = 0 BEGIN
.
.
.
END
Then, to close the cursor and free the resources you will …
Talking about SQL Tunning or SQL Optimization, your query is almost inadecuate because the comparasion values in the select subqueries are calculated once (with the first record) then used for the other records, resulting in null values.
Your calculation involves counting or summing data from tables depending on the current value of the tblIn record.
To do so, I will recommend to create an stored procedure that will create a temp table, then fill it in with the necessary records and return the content from this table.
In order to fill the temp table, you can use a cursor to navigate the tblIn inner joined to tblCompany twice with alias C1 and C2 to obtain the shipper and the carier, and to tblUser to obtain the user full name, and, for each recor retrieved,
* Create/clear the temp variables CountOfInventoryDetail, CountOfWrongRa and SumOfInBulk
* do the select from the tblInventory detail and store the count in a variable CountOfInventoryDetail,
* do the select from the tblWrongRA and store the result in a variable CountOfWrongRa
* do the select from the tblInBulk and store the result in a variable SumOfInBulk
Then insert into the temp table the required values, including the sum of the 3 temp variables. Be aware that some of them can result in null, so try to use of the ISNULL function to return a 0 in case of null.
Once retrieved all records, close the cursor and do …
To create a custom control you need to add a new user control into your project.
This user control can have a GUI that defines how is show in your form. You must add there textboxes, buttons, graphics, tabs or whatever you want in.
Then you will need to define interfaces, events, methods, functions and/or properties that will define how this control will interact with the rest of the world, or change his presentation or behaviour.
Once this is defined, you can use it in any form as any other predefined control.
Read here and here to know a little bit more over this.
Hope this helps
Private Function QuarantineeFileName() As String Throw New NotImplementedException End Function
You are just throwing an unhandled exception.
What is expected to do the QuarantineeFileName function?
Which unhandled exception?
Did you verifyed that have write permissions to the quarantine folder?
As far as I know, not all the infections can be cleaned.
The mechanism other AV use to reecognize a file as being infected, and to be able to remove the infection is out of my knowledge.
How to obtain a Guid?
Using the System.Guid.NewGuid().ToString() you can ogtain a value (like 9245fe4a-d402-451c-b9ed-9c1a04247482) that can be used as the file name.
Example:
Dim QurantineeFileName as String = System.Guid.NewGuid().ToString()
Dim QuarantineeInfoFileName = QuarantineeFileName & ".log"
Dim QuarantineFilder as System.IO.DirectoryInfo = New System.IO.DirectoryInfo ("C:\Quarantine")
If QuarantineFolder.Exists = false Then
Try
QuarantineFolder.Create
Catch ex as Exception
msgBox("Error creating the quarantine directory: " & ex.Message)
'
' Maybe you want to wait for a Cancel or Retry
'
End try
End If
Dim OriginalFile as System.IO.FileInfo = New System.IO.Fileinfo(TextBox1.Text)
Dim DestinationFile as System.IO.FileInfo = New System.IO.Fileinfo(QurantineeFileName)
Dim DestinationInfoFile as System.IO.FileInfo = New System.IO.Fileinfo(QuarantineeInfoFileName)
'
'
'
Do While DestinationFile.Exists or DestinationInfoFile.Exists
QurantineeFileName = System.Guid.NewGuid().ToString()
QuarantineeInfoFileName = QuarantineeFileName & ".log"
DestinationFile = New System.IO.Fileinfo(QurantineeFileName)
DestinationInfoFile = New System.IO.Fileinfo(QuarantineeInfoFileName)
Loop
Did you checked your disk for integrity? (CHKDSK /R) Probably youll need to run it whith Admin privileges.
Then if the disk appears OK, try to repair the system from the original DVD.
Hope this helps
Answering the question of the quarantined files i would suggest the following:
Always copy the original file to the destination location, then Delete the original file. Never Move.
In order to recover the original file name i would suggest that when copying the original to the destination folder, change the name to a random Guid. Then create a file with the same random Guid + extensioon log (or some thing you define), and write there the info about the original file. This way you will always have pairs of files, the original and the info.
Hope this helps.
Sorry, I am saying that many files can have the same hash value.
Also I am saying that is not possible to replace the hash value of a file with aonther.
As the hash value is the result of a calculation, you can not replace the result of the calculation to 'clean' the original file.
In order to see a simple example, If you have a hash value of 4, wich is the result of adding all the original positive numbers values together, what one is the right original file structure?
Possible answers:
Original has a lenght of 1 with value of 4. (this is easy)
Original has a lenght of 2 with the following possible pairs: 0 + 4 or 1 + 3 or 2 + 2 or 3 + 1 or 4 + 0
Original has lenght of 3 values with : 0 + 0 + 4 or 0 + 1 + 3 or .... 4 + 0 + 0
...
Original has 2Mbytes length: Fill in all the possible values here by your self :( .
With the value of 4, and the examples here, if the result of the calculation is to be 3 istead of 4, wich of the original file values is the right one to be modified? You can only apply the clean process (according to this algotrithm) if the file is 1 byte in length.
As the MD5 hash calculation is …
The MD5 hash returns a 128 bits value (16 bytes lenght and340282366920938463463374607431768211456 distinct results are possible).
But... more than one source for the hash can have the same hash value, and there is no way to know the source for that result.
To know more about the collision results in MD5 please visit the Wikipedia page.
IMO, you should research for another approach to the 'repair' function.
Sorry.
Do you use binary readers to read the file and the guide signatures?
Are always both o the same length?
Do you have a CompareSignatures function to retrieve if the guide signature is the
file signature?
Do you have a ReplaceSignature function?
How do you remove from memory a file already loaded to change their signature?
Just a comment on your delete all process. Lets do an example:
You have 3 Items in the ListBox.
The first Item is the 0, the second is 1 and the third is 2.
You select the first Item 0, kill the file and remove the item from the ListBox.
Actually you'll have 2 Itmes, 0 and 1, then you select the next (+1) SelectedIndex. This will be the 1. and kill the file an remove from the listbox.
Actually you'll have 1 Itmes, 0, then you select the next (+1) SelectedIndex. This will be the 2, probaly throwing an exception.
I would suggest to cicle the SelectecIndex from Items.Count-1 to 0 step -1 to avoid this error.
Hope this helps
Please, post what you have coded so far here.
According to your code, the mywaithandles(0) may have no handle info at all.
I would suggest to sligly change your code to this untested example:
<MTAThread()> Public Sub file_search()
Dim DD() As String = Directory.GetDirectories(Searcher_path)
Dim mywaithandles() As AutoResetEvent = Nothing
Dim currentHandleIdx as Integer = -1
For i As Integer = 0 To DD.Length - 1
If is_emty(DD(i))=false Then
If mywaithandles Is Nothing Then
ReDim mywaithandles(0)
Else
ReDim Preserve mywaithandles(mywaithandles.Length)
End If
currentHandleIdx = mywaithandles.Length -1
mywaithandles(currentHandleIdx) = New AutoResetEvent(False)
Dim th_info As Threadinfo = New Threadinfo(DD(i), mywaithandles(currentHandleIdx))
ThreadPool.QueueUserWorkItem(AddressOf searcher_thread, th_info)
End If
Next
If Not mywaithandles Is Nothing then WaitHandle.WaitAll(mywaithandles)
end sub
Hope this helps
Just as a hint, for each row in your Excel sheet, you can write an insert statement like:
"IF NOT EXISTS (SELECT TOP 1 RegistrationNo FROM MyTable WHERE RegistrationNo = " & CurrentRowRegistrationNumber & ") INSERT INTO Mytable VALUES (..."
And for the NULL value , just set the literal NULL in the VALUES right place or change the data table to define the missing fileds in the Excel as nort required (accepting null).
Hope this helps
Without seeing your code is difficult to say what is the origin of the problem.
Instead of disposing the DGV, try disposing the Second form and creating a new one before showing in dialog mode.
Hope this helps.