|
Unless there specific cells you wanted to compare, you would use a loop within a loop to compare a block of cells between two sheets. This example will compare the values between A1:J10:
Dim row, col As Integer
Dim cellID As String
For row = 1 to 10
For col = 1 to 10
cellID = Chr(64+row) & col.ToString("##")
If sourceWorksheetObject.Range(cellID).Value <> _
compareWorksheetObject.Range(cellID).Value Then
' Cells are not equal, do something about it...
Else
' Cells ARE equal
End If
Next
Next
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
ListView, Datagrid
Why invent the wheel, when you can invent software.
|
|
|
|
|
There are two ways to do this. If you want to use a DatGrid, you'll have to open the .XLS file using ADO.NET and the Excel data provider. You'll treat this just like a database. The other method involves adding a reference to either the Microsoft Excel Object Library or the Microsoft Office Object Library. You would then place this control on your form and manipulate it just like you would if you were using VBA inside Excel. You could tell your instance of Excel to load the file and display it, then the user would have all the functionality of Excel inside your app.
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am bussy with a project that requires me to monitor a workstation, the problem is that I cann't tell if it is locked.
Does anyone know how to tell if a workstation is locked or not.
Must work on NT4,W2K and WXP
Why invent the wheel, when you can invent software.
|
|
|
|
|
You can't tell if the workstation is locked using remote calls, unless you have a small server process that can send this kind of data to your monitoring app. You would ask your server process if the workstation is locked or not. As of yet, I haven't been able to determine exactly how the server app would know this...
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I would like to create a Data Traffic Analyzer in VB.Is it possible to generate a graphical interface necessary for this.Please help.
|
|
|
|
|
You might want to define what a Data Traffic Analyzer is... I take it it's like a network monitor, traffic capture, and packet analyzer?
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I just wanted to add password security for my application. But i want to use an existing algorithm like blowfish or best suggestion. I just want a push in the right direction for this implementation.
|
|
|
|
|
Look at www.planet-source-code.com and search for blowfish. Lots of examples
Why invent the wheel, when you can invent software.
|
|
|
|
|
I am trying to read a vector image file *.ai. How can you convert the file to a set of coordinates (Biezer curves etc). Or is there another file format which lends itself to this task.
I have converted to a raster image but in order to maintain detail it involves creating a very large file.
|
|
|
|
|
You would have to either find a 3rd party rendering control that knows about .AI image files or would haev to write one yourself. Basically, you'd start out with a blank bitmap in memory of the dimensions requested, then start parsing up the .AI file and executing the drawing commands on bitmap image scaling the coordinates to the bitmap image size.
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi
i have a datagrid filled from a DB and i want to know the number of rows..
how may i know it?
|
|
|
|
|
The number of rows on the datagrid will match the number of records in the dataview it's bound to. So the number of rows should be:
Dim numRows As Integer
Dim dt As DataTable ' This is the table returned from the database
Dim dv As New DataView(dt) ' Creates a new DataView for the table
DataGird1.DataSource = dv ' bind the grid to the dataview
DataGrid.DataBind()
numRows = dv.Count()
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Send email is easy enough. But my question now is how to send a user html-email if his/her email program is html format enabled, or send alternative plain text email if otherwise.
Thanks guys,
|
|
|
|
|
Your app would have to ask the user which format he wants. When you compose the message body, the HTML version of the message will just be the source for the HTML page. Just assign the entire source to a sing string and pass it to the message body property. Same is true for a plain text version. Your app just has to be able to generate which ever version the user wants.
You can't send BOTH formats in the same message because the user will see the body of the message twice in the same message.
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
That is an option I would rather not use.
One friend suggests me do the following
"when you send an email with both formats in it (as I often do), the recipient's email client decides which one to display.
Usually it will be the HTML version if it's a graphical program, but any
good email client will let the user override that decision. So really, the
sender shouldn't have to know which format to send; it's up to the recipient
(as long as the sender sends both)."
But he uses perl to do everything. I wonder if I can do the same thing in .net. There must be a way. A lot of software has this capacity. Just wonder what is the way to do it
|
|
|
|
|
You going to have to ask him what the procedure is because I always send one or the other based on user preference. I've never sent both formats and don't know what the catch is so the client can differentiate between the two.
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
If you send a MIME formated message, it contains both the HTML version and a plain text version. Look at the CDO stuff at MSDN for an overview of multipart messages.
|
|
|
|
|
|
What's with the two forms? Why can't you put this stuff on one form. It would probably make your life a little easier by not coding for two forms...
Anyway, your code doesn't do any seperate checking of the fields, so it can't possibly count each one as an error. This should fix it:
Private Sub mnuFileCheck_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuFileCheck.Click
Dim frmOneInstance As New frmOne() 'instance of form to mark this form against
Dim intErrorCount As Integer = 0 'to keep an error count
If lblSID.Text <> frmOneInstance.lblID.Text Then
intErrorCount += 1
End If
If lblSName.Text <> frmOneInstance.lblName.Text Then
intErrorCount += 1
End If
If intErrorCount > 0 Then
MessageBox.Show("Error count total: " & intErrorCount, "Result", MessageBoxButtons.OK, MessageBoxIcon.Information)
Else
MessageBox.Show("All Correct!", "Result", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
End Sub
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i need to pass the address of a vb subroutine (function) to my c++ DLL. this will enable my c++ DLL to call functions in the VB application.
my C++ function accepts the address as a long. I can't figure out how to determine the address of my VB subroutine?
my VB function name is voidFunc
I tried using AddressOf voidFunc, but vb complains that this is improper use of the AdressOf operator.
any ideas how i can get the address of a vb subroutine?
thanks
|
|
|
|
|
nothing wrong with AddressOf
but voidFunc must exist in a standard module..not a form or class module.
|
|
|
|
|
ok this worked great. I added voidFunc to a standard module, and my c++ DLL was able to call the function easily. very nice. thank you very much.
btw. credit to this article for helping me on this:
http://www.flipcode.com/articles/article_vbdlls.shtml
|
|
|
|
|
I've setup a CrystalReport viewer on the form. All is working but I can't scroll with UP,DOWN keys.
pls help me.
|
|
|
|
|
I just change some registery setting
HKEY_CLASSES_ROOT\Directory\Shell to enable select a folder and right click to launch my application with the select folder path as parameter
myapplication.exe %l
it works fine with one folder selected, however when selecting multiple folders and rightclick to launch the application two applications are launching. what can i do?
Shin
|
|
|
|