|
I am using a richtextbox in my project, and want to be able to drag files into it.
While I can get a file and get it to load, the file object is also inserted into the control.
There appears to be no handled property on the DragEventArgs of the DragDrop event for the richtextbox.
I've been back and forth through the docs and nothing I've tried seems to work.
|
|
|
|
|
Also noticed something else re: richtextbox.
Tried setting up a reverse find. Seems that no matter what I did, the find always started at the end.
I used instance.Find(theText, startPos, RichTextBoxFinds.Reverse)
And while it would find theText, it would always find the same text, last one in the box. I could put a starting position between 2 known locations of theText, and it would make no difference.
In the end, I put the text into a string, then did an InstrRev to get the location, then set the SelectionStart and SelectionLength accordingly, and it works.
But it should work using the .find!
|
|
|
|
|
I seem to be having trouble with the batch build.
While I can get the item in the build menu, it remains grayed out.
I set the solution properties to multiple configurations, but it doesn't stick, and I can't get it to build both the release and debug versions at the same time. I can change configurations and do each one individually, but no batch.
|
|
|
|
|
I think you're misunderstanding what Batch Build does.
You cannot pick the same project to be built twice. Batch Build only lets you pick which projects in your solution you can build and using which configuration (Debug, Release, CPU, custom). You cannot tell it to build the same project twice, once Debug, once Release.
|
|
|
|
|
Oh? I know I'd been able to do this with VS 6.
Was it taken out in VS 2008 or before?
When I did batch build on VS 6, a window would come up with release and debug with checkboxes to include in the build.
This window was similar to the configuration manager in VS 2008, but release and debug had separate lines whereas the one in VS 2008 has only 1 with the dropdown for debug, release and whatever else might be added.
|
|
|
|
|
llandyw wrote: Was it taken out in VS 2008 or before?
I went back to 2003 and still couldn't do it.
llandyw wrote: When I did batch build on VS 6, a window would come up with release and debug with checkboxes to include in the build.
I used to do it all the time in VC6. Frankly, now I don't even bother with Release until I'm ready to go to UAT and ship it.
|
|
|
|
|
Must have last been available in VS 98 (6).
Unfortunately, that one doesn't work on Windows 7. Maybe I should try loading it into the VPC. Anyway, sure would be nice if it allowed debug/release at the same time in batch.
|
|
|
|
|
hey experts,
i m sending multiple emails from my code in bulk, i just want to check which mail succeeded and which mail fails, i searched a lot but i m not getting any idea, can anybody help me with that. Or may be help in creating a email sending monitor
waiting for positive replyRegards
Narendra Singh
(Jindal Tech Ventures)
|
|
|
|
|
Please do not repost the same question; I already answered this in the C# forum.
OK, my answer got lost for some reason (mistake on my part). Generally speaking mail systems do not do this, as they follow the physical mail model. You post a letter but you can only be certain it gets delivered if you get a response from the person who receives it. It is not very efficient for a mail system to send you a message every time it delivers an email, and many messages may go to accounts that nobody reads; but there is no way for the mail system to know that. You can tag messages with a request for a read receipt, but that still relies on the recipient agreeing to send you one - I never do.txtspeak is the realm of 9 year old children, not developers. Christian Graus
modified on Tuesday, March 9, 2010 8:15 AM
|
|
|
|
|
|
Weird or not? I'm usually quite careful to use the Preview, and reread my answer after pressing the Post button. I definitely wrote an answer, I can only assume that I was distracted and pressed Cancel for some reason. txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
The best solution that I can think of, is to embed a link an image URL into your email, so that the image is downloaded from a website. The URL in the email would be something like
http:
So basically what you are doing is referencing the Image.aspx page with the parameters of i=logo (parameter i = logo) and a unique Id for the Email/Receipient.
What the Image.aspx does is record in a database that the Receipient has opened the email and downloaded the image, thus the email address is valid and been read. Then the page responds with an image.Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
|
|
Hi all,
I want to know how to make service commands.
Thanks
|
|
|
|
|
1. Please don't cross post. It just confuses everyone.
2. Service Commands? Are you talking about making a windows service, or executing commands against a known service such as the FTP Service Commands?
|
|
|
|
|
i want to make application interact with clinet via sms, like mobile communications companeis and its customer service technice
|
|
|
|
|
There is a wealth of info out there on coding for SMS.
The first page of results on Google[^] has lots of good articles including one here on CodeProject. You just have to look for the right thing.
|
|
|
|
|
Experts,
I have some vb6 code that does exactly what i want it to do (yippee) however the program i am developing in is vb.net.
Now orignally i thought that most of the code would be fairly easy to convert however some of it isn't being liked.
This is the main code that i need help with
open App.path & "\files\high scores.txt" for input as #1
a=1
While not EOF(1)
Input #1, names(a), scores(a)
a=a+1
end while
close #1
vb.net doesn't like open app path and for input as #1as well as input #1 and close #1
If someone could help me that would be great.
Many thanks
Dan
|
|
|
|
|
Just an update here is what i have done in vb.net
dim objReader as new system.IO.StreamReader(FILE_NAME)
Do while not EOF(1)
list1.text = names(a) & objReader.readline()
a=a+1
loop
objReader.close
call highscores
For some reason when i try to run the code it doesn't like the dow while loop and says bad file name or number?
If anybody can help me that would be really cool
Dan
|
|
|
|
|
If you are using StreamReader then you can do this (taken straight from the documentation for StreamReader):
' Create an instance of StreamReader to read from a file.
Dim sr As StreamReader = New StreamReader("TestFile.txt")
Dim line As String
' Read and display the lines from the file until the end
' of the file is reached.
Do
line = sr.ReadLine()
Console.WriteLine(Line)
Loop Until line Is Nothing
sr.Close()
You don't need to worry about file numbers in VB.NET.
|
|
|
|
|
From what I can gather, basically what you are trying to do is to read a list of players and their high scores from a text file, and populate arrays named names and scores. In .Net you need to import System.IO and use a StreamReader to read from the file. An important consideration obviously, is the set up of the original text file. i.e - is it a comma delimted file ?, is each record on a new line ? etc. I threw this together, working on a few assumptions. 1. The text file is stored in the same folder as the application executable. 2. The text file consists of a new line for each player, and each player property is separated by a comma.
names = New List(Of String)
scores = New List(Of Integer)
Dim strFilename As String = Application.StartupPath & "\highscores.txt"
Dim srScores As New StreamReader(strFilename)
While Not srScores.EndOfStream
Dim strRead As String = srSave.ReadLine
ListBox1.Items.Add(strRead)
Dim strSplit() As String = Split(strRead, ",")
names.Add(strSplit(0))
scores.Add(strSplit(1))
End While
srScores.Close()
I also assumed names and scores were lists rather than arrays. You would obviously need to consider error handling as a major issue which I have completely ignored.
Hope this helps.
|
|
|
|
|
Cheers Zimvbcoder.
This is indeed very helpful
However i have a few questions
names = New List(Of String) ' vb doesn't like the new list of string?
scores = New List(Of Integer)
Dim strFilename As String = Application.StartupPath & "\highscores.txt"
Dim srScores As New StreamReader(strFilename)
While Not srScores.EndOfStream
Dim strRead As String = srSave.ReadLine
ListBox1.Items.Add(strRead)
Dim strSplit() As String = Split(strRead, ",")
names.Add(strSplit(0)) ' doesnt like names.add?
scores.Add(strSplit(1))
End While
srScores.Close()
Also srSave isn't doing anything?
I am very grateful for you replying to my post.
Many thanks
Dan
|
|
|
|
|
For List(Of ) you need to import System.Collections.Generic .
As for srSave , I think you made a typo. It should be. Dim strRead As String = srScores.ReadLine()
|
|
|
|
|
Thanks the man from U.N.C.L.E
so are you saying that the following code would become
name = New list(of system.collection.generic) ?
This comes up saying do i want to change what i have written to
system.collection.IEnumerable
system.collection.IEnumerator
system.collection.Generic.list(ofT)
system.collection.queue
system.collection.generic.IList(ofT)
Many thanks
Dan
|
|
|
|