|
You could trap the cursor, but as soon as it crosses the border of your form the image changes. You basically have no control over the cursor image during a drag'n'drop operation unless you implement the interfaces in that article.
You don't have to code all this yourself. I went through it and found that, in one of the downloads in the last (?) article in the set, there is a compiled .DLL you can just add to your project. You'll have to go through the article to find out how to use it. It's not that hard to use.
|
|
|
|
|
Hello all,
I have a small vb program that converts xml file into csv format. My problem is the save part. When I choose a different folder to save to, it saves the ‘csv file’ to the same folder I chose the ‘xml file’ from. And there is nothing in the folder that I had chosen to save to. I’ve tried a few things with the FileStream and adding SaveFileDialog with no success. Any suggestions would be appreciated.
Private Sub Save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Save.Click
Dim xdoc As XmlDocument = New XmlDocument
Dim xnode As XmlNode
Dim outwriter As StreamWriter
Dim outfile As FileStream = New FileStream((txtFile.Text + ".csv"), FileMode.Create)
Dim SaveFileDialog1 As SaveFileDialog = New SaveFileDialog()
SaveFileDialog1.Filter = "csv.files(*.csv)|*.csv|All files (*.*)|*.*"
SaveFileDialog1.FileName = txtFile.Text
SaveFileDialog1.RestoreDirectory = True
If SaveFileDialog1.ShowDialog() = DialogResult.OK Then
xdoc.Load(txtFile.Text)
xnode = xdoc.DocumentElement
outwriter = New StreamWriter(outfile)
getsubnode(xnode, outwriter)
outwriter.Close()
outfile.Close()
End If
End Sub
|
|
|
|
|
Why are you not doing anything with the SaveFileDialog other than showing it?
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
You're not using the filename specified by the SaveFileDialog. You're using the filename specified by a textbox with a csv extension added to it.
The problem lays in this line:
outwriter = New StreamWriter(outfile)
|
|
|
|
|
can i ask a code for round robin using visual basic? tnx for ur help
|
|
|
|
|
mikel19 wrote: can i ask
Sure you can ask. It's unlikely you will get anything. You have not specified what it is that you think that "round robin" is and you have not told us what you have tried to do for yourself.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
Round Robin Scheduling? Your question is pretty vague. Most people are not going to try and guess what you are talking about. Please be more clear as to what you are trying to accomplish and what you have done so far.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
I'm using Visual Studio 2008 and Sql Server 2008 Express R2. My device is 'SCANTECH ID SK-50, Window CE 6.0'. I already install all the 3 cab file(sqlce.dev.ENU.wce5.armv4i.CAB, sqlce.repl.wce5.armv4i.CAB, sqlce.wce5.armv4i.CAB ) into the device. When i run the program come out this problem 'Can't find PInvoke DLL 'sqlceme35.dll' . However, I'm do this in other handle device that is using Window CE 5.0. It's no problem. I have do a lot research but still cant solve this problem. How can I solve this? Any expert can help me?
|
|
|
|
|
how to create reprot using dataset in vb.net?
|
|
|
|
|
Have a read of this Generate a Crystal Reports report without a database[^]
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
Thanks about your answer,,, Now i asked to you. Which is faster, load data from xml or dataset?
|
|
|
|
|
There is no answer to this. It depends on the amount of data you're talking about and where it's coming from.
|
|
|
|
|
Ok thanks,,,,,
|
|
|
|
|
what is the secret of visual basic how to be a good programmer what are the basics of programming and how we can find or project code and bye.
|
|
|
|
|
doumbouya wrote: what is the secret of visual basic
There's no such thing.
doumbouya wrote: how to be a good programmer
Practice. Lots and lots of practice and reading and practice and reading, repeat ad nauseum.
doumbouya wrote: what are the basics of programming
There is no way in Hell you're going to get this question answered in a few forums posts. Pick up some beginners books on VB.NET and see the answer to your second question.
doumbouya wrote: how we can find or project code
Have you ever heard of "Google"?
|
|
|
|
|
Well said on all points
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
There is a secret
Visual Basic code documents itself elegantly.
1) Used accurate descriptive variable names
2) Put comments on the right side of code statements
3) Comments should explain WHY your doing something
4) Use very short variable names in complex calculations
REMEMBER to code so other programmers can understand your code easily...
TheKevlar
|
|
|
|
|
and you're telling ME this why??
I've been using various flavors of BASIC for the last, oh, 36 years. There's no secret to it.
...and those items you listed apply to ALL higher-level languages.
|
|
|
|
|
doumbouya wrote: secret of visual basic
There is no "secret". Like everything else you get good at something by practice, study, practice, reading books, practice, taking classes, practice, reading articles and more practice. Did I mention that you have to practice?
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
42
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Yep, it's the secret to just about everything...
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Reading, understanding and practice can make you a good programmer in any programming language VB.Net Or otherwise.
|
|
|
|
|
While accessing DB using VB6 component, the xml returned contains no curly braces for Guids.
It was working well in windows 2000.
The new environment is windows 2008 and the code segment that uses is
Set st = New ADODB.Stream
15 cm.ActiveConnection = sAdoConnect
16 cm.Properties("Output Stream") = st
17 cm.Properties("Output Encoding") = "Unicode"
18 If Len(sXMLRoot) > 0 Then cm.Properties("xml root") = sXMLRoot
20 st.Open
21 cm.Execute , , adExecuteStream
22 Set cm.ActiveConnection = Nothing
24 GetCommandResultsXML = st.ReadText
Can any one suggest is there any patch or registry update is there?
|
|
|
|
|
There is no patch or "registry update".
It's simple really. Since VB6 doesn't have a GUID type, you're using strings as GUIDs. You'll have to write the code that handles the case of stripping the curly braces off of data that you write to the database and add's them back when you read the data from the database.
Why?? Because only ADO 2.x and below put the braces in. Everything else today, including the database itself does NOT store a GUID with curly braces. When you finally rewrite this app in .NET, you're going to have to write a seperate application that migrates the data to actual GUID fields and handle converting your string GUIDs in the database to actual GUIDs.
|
|
|
|
|
In VB6.0, I find the grid can load pictures and text from a list of database ACCESS2000, the example you have this?
|
|
|
|