|
I have inherited the maintenance of a VB6 program that uses two DLLs, for which I don't have the source, and would very much like to convert this app, for which I do have the source, to VB.NET.
Please tell me how to get around the two DLLs problem.
Regards,
Alf Stockton
-- modified at 11:51 Wednesday 28th September, 2005
|
|
|
|
|
You'll most likely use them in VB.NET the same way the VB6 code uses them. If your code is using Declare statements, you'll do the same thing in VB.NET. If your .DLL's are COM-based, you'll be setting references to them, just like in VB6.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Are you suggesting that the Dlls do not need to be rebuilt and can just be called as they currently are ?
As a matter of interest the one is the driver for a mag stripe card reader and the other is the driver for a thermal printer.
Regards,
Alf Stockton
|
|
|
|
|
StrayGrey wrote:
Are you suggesting that the Dlls do not need to be rebuilt and can just be called as they currently are ?
Yep. Whatever way your VB6 code is accessing the .DLL functions now, the VB.NET code will be using the same methods.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How to save change from sql db table (as we take Differential Backup of db) in script form. And run script through C#.Net or VB.Net coding.
|Muhamad Waqas Butt|
waqasb4all@yahoo.com
www.sktech.freewebspace.com
|
|
|
|
|
You can't run a script generated by SQL Server, since it's SQL commands. But, you can probably use the SQL Server Data Management Objects to tell the SQL Server to run the script for you.
I don't know how to do it mysefl because I've never used them, but you can find the documentation for SQL DMO and samples here[^] on MSDN.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
When I attempt to write the string "true" out to an excel spreadsheet from a VBA user form, "true" is spelled in all caps "TRUE." Any help would be much appreciated. Thanks in advance.
D
|
|
|
|
|
Probably because it's being interpreted as a binary value. Put a ' character before the "t" in "true", like this: someCellReference.Value = "'true". This tells Excel that the value should be interpreted as a string.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi everybody,
I have develped one prgram and created executable file which displayes some .dat file on the form. now i want if sombady right clicks on the .dat file on explorer it should open with my prgram exe . can anybody give me some guide line for this
thanks in advance.
regards
Ciacia
|
|
|
|
|
|
I Will try this thanks a lot......
|
|
|
|
|
I get "FormatETC Exception" always with this code, what s problem?
Sub InsertImageIntoRtb(ByVal rtb As RichTextBox, ByVal img As Image)<br />
Clipboard.SetDataObject(img)<br />
Dim myFormat As DataFormats.Format = DataFormats.GetFormat(DataFormats.Bitmap)<br />
If txtDipNot.CanPaste(myFormat) Then<br />
txtDipNot.Paste(myFormat)<br />
Else<br />
MessageBox.Show("this format is not supported by.")<br />
End If<br />
End Sub
|
|
|
|
|
in a project i used richtextbox, i saved richtextbox, but i cannot see images on rrf file. I tried all possibilities.
RichTextBox1.SaveFile("", RichTextBoxStreamType.PlainText)<br />
RichTextBox1.SaveFile("", RichTextBoxStreamType.RichNoOleObjs)<br />
RichTextBox1.SaveFile("", RichTextBoxStreamType.RichText)<br />
RichTextBox1.SaveFile("", RichTextBoxStreamType.TextTextOleObjs)<br />
RichTextBox1.SaveFile("", RichTextBoxStreamType.UnicodePlainText)
I think 4th is true way, but it doesnt working.
And another question, I have to do something to this file so that Word pad cannot open this file, how could i do this. I intend to this file only can be opened by my program.
|
|
|
|
|
Don't cross post. It's considered rude.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hai
Iam a beginner . When i try to update the table with new values i get the following exception.
Dynamic SQL generation is not supported against a SelectCommand that does not return any base table information.Can any one help me in solving this problem
Priya
|
|
|
|
|
I'm interested in turning this type of string -
blah, A&Z this "some word", another word, "Joe Jones"
into "searchable" tokens, e.g.
blah
A&Z
this
some word
another
word
Joe Jones
The main delimiters would be whitespace and/or comma's, with quotes allowing for multiple words in a token.
Does anyone know how this might be done?
-- modified at 15:45 Tuesday 27th September, 2005
|
|
|
|
|
hi
have you test the String.Split method? or you need something more than it?
|
|
|
|
|
Yes, he does. He wants to ensure that quoted items are not split if they contain the split character.
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious
|
|
|
|
|
I think the simplest parsing algorithm for this scenario is:
1) Split on blank spaces to get an initial array quickly.
2) Create a second ArrayList so you don't have to worry about Redims.
3) Enumerate the intial array, test each item for both " and nulls - the person may have entered two blanks by accident. Copy "standalone" strings into the ArrayList. When you encounter a ", start reconcatenation of the original string until you reach the element that contains the closing ". Add the reconstituted string to the ArrayList...
etc. until you have an ArrayList where each element represents an original search term.
|
|
|
|
|
Hello!
Look at the 'Split' property of strings..
When you split the string with 'whitespace' it returns an array of strings that are splitted apart by whitespace. e.g
if str is your string then
dim s() as string=str.Split(" ")
now s(0) will contain "Blah"
s(1) will contain "A&Z"
and so on...
Hope this will solve your problem
_mubashir
|
|
|
|
|
I can think of at least two ways, though not sure of the efficiency ratings of them:
First solution:
1. Use RegEx to get collection of words paired by " (double quotes), then remove the words from the string (i.e. replace with empty string). This is possible using RegEx AFAIK.
2. Now you have blah, A&Z this , another word, left, replace comma with space (or vice versa).
Split the string using space character and get all arrays that are not empty.
Second solution:
Create a parser to loop through the characters in the string.
Everytime you encounter a comma or blank space save the characters you have read as a string, with the exception when you encounter " (double quotes) then continue until you find another double quotes (use a boolean variable for this).
Hope that helps,
Ed
|
|
|
|
|
I really appreciate all of the help and it gave me some good ideas which I was able to apply and solve my problem.
For me, the key was removing the "phrases" from the string and placing them in their own array.
First I counted the number of double quotes and divided by 2. That gave me the number of "phrases" I had in the string.
Then I split the string using doublequotes as the delimiter, but I did this one at a time and then removed the "phrase" from the original string, placed it in an array and then split the string again.
Dim doublequote As String = Chr(34)
If InStr(Keyword, doublequote) Then
For i = 0 To intQuoteCount - 1
Dim arrFilename() As String
arrFilename = Split(Keyword, doublequote)
strRemainder0 = arrFilename(0).Trim
strRemainder1 = arrFilename(1).Trim
strPhrase(i) = strRemainder1
Keyword = Replace(Keyword, strRemainder1, "")
strTmp = doublequote & doublequote
Keyword = Replace(Keyword, strTmp, "")
Next i
Keyword = Replace(Keyword, doublequote, "")
End If
Then I split the string using " " as the delimiter. That put all of the words that were left in another array, KeywordsForSearch. Then I expanded that array by the number of elements I had in the strPhrase array and then added the elements from the strPhrase array to the KeywordsForSearch array.
'
Keyword = Replace(Keyword, ",", " ")
' Just in case there are some single quotes in the search string
Keyword = Replace(Keyword, "'", "''")
' In case there are double spaces in the string
Keyword = Replace(Keyword, " ", " ")
'Read in the search words to be searched
KeywordsForSearch = Split(Trim(Keyword), " ")
Keyword = Replace(Keyword, "''", "'")
Dim strKeyWord As String
Dim intArrayCount As Integer = UBound(KeywordsForSearch)
intArrayCount = intArrayCount + intQuoteCount
ReDim Preserve KeywordsForSearch(intArrayCount)
i = 0
intArrayCount = intArrayCount - 1
For i = 0 To intQuoteCount - 1
KeywordsForSearch(intArrayCount) = strPhrase(i)
intArrayCount = intArrayCount + 1
Next i
I'm sure this is not the most elegant solution and someone with more logical thought processes could probably clean this up considerably, but it does work.
Perhaps someone else might want to take this idea and improve on it.
|
|
|
|
|
hi
plz tell me how can i create a copy of existing database using SQLDMO at run time.
plz help me. looking forward ur reply.
thankx
|
|
|
|
|
Basically you create a new database using SQLDMO. Then there is a Transfer object and you set the TransferAllObjects property to True, and run the transfer. It does exactly the same thing as the DTS Wizard.
There are examples of how to perform both the create and the transfer on MSDN. You need to review the MSDN carefully to see that you have the proper service packs installed for whatever version of SQL Server you are working with. The Transfer can fail under certain circumstances but still return successful.
Details are all on MSDN ...
|
|
|
|
|
hi dear programmers and developers.
i wanna use scanner and optical pen in windows form and i dont know and i haven't proper activex to use them.please describe and help me complete about this problem.
i have alittle time for solve this problem .
please help me
thanks and i am await for your faithfull help!!
miracle.ml@gmail.com
paradise_best@yahoo.com
|
|
|
|