|
Why are you posting this across the site ? Why not go back to whereever this person helped you, and respond to them there, so they get an email notification ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I want to open a text file and change some content.
For example, find a string 'aaa' and replace it with 'bbb'.
How to locate the 'aaa' and change?
Input,write command do not locate the file pointer.
|
|
|
|
|
You can't. Not quite like that. You need to load the entire file, make your changes in memory, then copy the new file over the old one.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi all,
Is there a easy way in .NET to print the contents of a TextBox? Or must you create a PrintDocument?
If a PrintDocument must be used, how do you handle lines that are longer than the page width? Is there a way to find out the maximum number of characters allowed on a line in a PrintDocument?
Any help would be much appreciated. Thanks!
|
|
|
|
|
|
Thanks for the link.
I have been there prior to posting here and have tested their sample, but this does not handle word wrap properly.
Any other suggestions?
|
|
|
|
|
<br />
Dim f as System.IO.StreamWriter = New System.IO.StreamWriter("C:\file.txt")<br />
f.Write(TextBox.Text)<br />
f.Close()<br />
Shell("Notepad.exe /p C:\file.txt", AppWinStyle.NormalFocus)<br />
System.IO.File.Delete("C:\file.txt")<br />
Not the most elegant way, but it works for me.
|
|
|
|
|
I was actually thinking of doing something like this, Thanks.
But is there some command-line arugment to allow the print dialog to show up? I know that the user may not use their default printer, so a print dialog would be really useful.
Any ideas?
|
|
|
|
|
Im now using mscomm in a VB6 project but as I understand this component does not support ports abow com16. If USB BT, IR and serial dongles is used ports easily starts getting numbers abow 16.
What is the fix or solution to this problem?
If there is no solutions for mscomm suggestions to other components with a word about own experience would be great, comersial or free.
re Me
|
|
|
|
|
In VB6, there isn't a fix. You'll have to find a COM-based SerialPort control that supports this. I don't know of any.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
And this has what to do with VB.NET?
Stuff like this belongs in the Lounge, not the programming forums.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Didn't you notice the link to the russian gambling website ? Anyone who uses VB is obviously gambling with their future, therefore it's valid
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I asked him a valid question. What does a BS post, like that, have to do with VB.NET?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave Kreskowiak wrote:
What does a BS post, like that, have to do with VB.NET?
Nothing, but he DOES have a link to a Russian casino type site, from the look of it. Hence my comment.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote:
Nothing, but he DOES have a link to a Russian casino type site, from the look of it. Hence my comment.
And as the forums aren't visited by the google bot, he's attempt at spam linking has failed. Doh!
Michael
CP Blog [^] Development Blog [^]
|
|
|
|
|
there is really which does not have any taste...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Hi all,
my problem is : I have a programm with multiple threads running. These threads should write a status message in a global
rich Text Box located in the main Form.
This textbox is shared and can be accessed by a property wich returns the rich text box. Also the box contains a synclock.
Now from time to time I get a NullReferenceException at System.Windows..Forms.RichTextBox.EditStreamProc
System.Windows..Forms.RichTextBox.UnsafeNativeMethodsCallWindowProc
etc.
I don't get the line where the exception occured.
It would be great if you could help me
Best Regards
immes
|
|
|
|
|
|
Are you sure you are accessing properties/methods of the Textbox using BeginInvoke/Invoke? This[^] article might help you get it right.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hi,
thank you very much for the help, I will try it out...
Best Regards immes
|
|
|
|
|
Dim refDV As DataView = New DataView(DataSet11.Tables("references"))
refDV.RowFilter = "" & ComboBox1.SelectedItem & " = like ('%" & TextBox4.Text & "%')"
DataGrid1.DataSource = refDV
=================================
Above code cause error
"Missing operand before '=' operator"
Why that happen. I want to perform selection using 'like' operator as in sql statement and want to include control inside the filtering.
Could someone help plz.
|
|
|
|
|
Get rid of the '=' operator.
WM.
What about weapons of mass-construction?
|
|
|
|
|
The error like this again
"Missing operand before 'like' operator"
those message is really i cant get it.
|
|
|
|
|
refDV.RowFilter = "" & ComboBox1.SelectedItem & " = ('%" & TextBox4.Text & "%')"
Maybe this will work.
WM.
What about weapons of mass-construction?
|
|
|
|