|
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
|
|
|
|
|
|
Hi
i have to implement a neural network but unfortunately i have no experince or idea how to implement or start implementing a artificial neural network. if anyone could please guide me how to start implementing or show an example of implementing any simple artificial neural network or any evolutionary algorithm it will be a great help.
|
|
|
|
|
This is a topic that is WAY too big for a forum environment. There are entire ciriculums in Universities dedicated to the subject. There are many ways to implement a neural network, but which method is best depends on what you're doing with it and what you want it to do.
You're best approach would be to pick up a couple books on the subject and start reading. There is ALOT of foundation material you need to understand first.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi all,
i've got a sub which requires copies a memory location who wants a buffer ptr of type integer (i think it comes from C++ code where buffer pointers are manages as integer). Now i don't know how to manage it in VB.NET couse i could not use a syntax like cam.CopyImageBuffer(&p, p.Size) [where p is an IntPtr] there's a way to handle these case?
Syntax is:
CopyImageBuffer(BufferPtr as Integer,BufferSize as Integer)
Thanks, Daniele.
|
|
|
|
|
hi all!!! =D
i need to know, how, can i send command parameter to an opened file!!!
following this part of code:
Private Sub mnuclass2jadfile_Click()
cdlFiles.Filter = "Files (*.class) |*.class"
cdlFiles.DefaultExt = "class"
cdlFiles.DialogTitle = "Open File"
cdlFiles.Flags = cdlOFNFileMustExist + cdlOFNPathMustExist
'On Error GoTo No_Open
cdlFiles.ShowOpen
Open cdlFiles.FileName For Input As #1
supposing i want send this command to opened file:
ShellExecute Me.hwnd, "Open", "jad.exe", " jad *.class > \jad", "\jad", SW_SHOWNORMAL
any suggestions!?
tnx.
|
|
|
|
|
psyq wrote:
Open cdlFiles.FileName For Input As #1
I asasume this opens a file for reading ? A file that is opened to read, is not actually run, so there's nowhere to pass the command line to. Use ShellExecute ( as you did ), for this.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi
Can anybody help me. how to print Grid Control values with heading and Report Header.
Thanks in advance
|
|
|
|
|
is there is way to extract the line number causing the error
Like Stack Trace displays the proper error massage with the line Number.
I have tried ERL() but its not working
Can anybody help ?
as early as possible
Thanx in advance
Hema Chaudhry
|
|
|
|
|
Why would you need to? The line the error occur on is just about never the real cause of a problem anyway. Also, the line the error was thrown on wouldn't be available in Release code anyway.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Actually I am looging all the activities with error in a log file
so that if a application have some errors By checking this log file I can debug that later.
So tha's why i want to extract the line Number of the error with source . Source can be easily get by ex.source . But how to extract the line number.
|
|
|
|