|
Hi everybody,
I made an application which copy file's to a webfolder. Now I want to made a modification, that when I do a right mouse click on a file, or files or a directory in explorer, the user have the posibility to start the program and copy the file, files or entire folder to a webfolder (send to..). But how can I get the path/name of the selected file,files or folder?
For start I tried to figure out how I get the result of echo %cd% into a variable, but till now no success.
Thanks so far,
Jurgen
|
|
|
|
|
hi
I am working on small assignment which is about files,I want to save some information and I also want to read that information,And for future reference so user can search information, So i have tried with this code but it's not working well ,Well it is working but it's shows all information at one time if user click btnOpen but i dont want that
Private Sub btnAdd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAdd.Click<br />
Dim Response As DialogResult<br />
Dim NumberLine As Integer<br />
Try<br />
FileOpen(1, "c:\test.txt", OpenMode.Append, OpenAccess.Write)<br />
MyLine = (cboProcess.Text + txtWeight.Text + " " + DateTime.Now.ToString)<br />
PrintLine(1, MyLine)<br />
FileClose(1)<br />
MsgBox("File saved", MsgBoxStyle.Information)<br />
Catch IOExcept As IO.FileNotFoundException<br />
MessageBox.Show("file not found", "Default reset")<br />
Catch IoExcept As IO.DirectoryNotFoundException<br />
MessageBox.Show("directory not found ", "Default reset")<br />
Finally<br />
FileClose(1)<br />
End Try<br />
End Sub<br />
<br />
Private Sub btnOpen_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnOpen.Click<br />
FileOpen(1, "c:\test.txt", OpenMode.Input, OpenAccess.Read)<br />
txtInk.Text = InputString(1, CInt(LOF(1)))<br />
FileClose(1)<br />
End Sub
I want to display search result line by line,And i also tried in btnAdd click event this code for line by line and open line by line ,But this code is not working at all
FileOpen(1, "c:\test.txt", OpenMode.Append)<br />
For I = 1 To NumberLine<br />
MyLine = cboProcess.Text + txtWeight.Text<br />
PrintLine(1, MyLine)<br />
Next I<br />
FileClose(1)<br />
and for btnOpen click event
FileOpen(1, "c:\test.txt", OpenMode.Input)<br />
Do Until EOF(1)<br />
MyLine = LineInput(1)<br />
Loop<br />
FileClose(1)
wating for help
|
|
|
|
|
If you want to show a line at a time, try reading the text using a method that returns a string array, then you can show the lines one at a time.
File.ReadAllLines returns a string[], I thought.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hello
can anybody help me telling how to convert xy coordinate to the latitude and longitude.
could anybody give me the code or explaination for that.
|
|
|
|
|
|
u have given me so many links which link should i go. pls help me out otherwise i will loose my job.
help me iam confused
|
|
|
|
|
rahul1983 wrote: pls help me out otherwise i will loose my job.
Really? Do you think you are in the right job if you are so close to losing it?
So far you haven't provided enough information to answer your query. In order to translate from an XY grid to Lat/Long (i.e. coordinates on a sphere) you need to know what projection the grid is using. Once you know that you can work out how to translate between the two.
|
|
|
|
|
Colin Angus Mackay wrote: Really? Do you think you are in the right job if you are so close to losing it?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Well, he's got to think about that sort of thing. No point doing a job he's unsuitable for. It isn't fair on him or his company.
|
|
|
|
|
So true! I just enjoyed the part where he grovels and tells us his job (life, whatever, ...) depended on us handing over an answer.
Kind of makes you wonder how he got this job in the first place...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
rahul1983 wrote: pls help me out otherwise i will loose my job.
I'm sorry to be harsh, but, how is it the problem of anyone on this board that you've got yourself a job you can't do, and have waited until the last minute to ask for help ? A better approach would be to ask early, and to ask with some detail as to what you're doing, what you've tried, and where you're stuck. Then, we'll try to help all we can, regardless of your job situation.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
i want to recive a character via a serial port and serial port and send a numeric value of type byte
i want the code in vb6 plz
|
|
|
|
|
opmfa1850 wrote: i want the code in vb6 plz
Since you put it that way....here[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
how to code for serial port
|
|
|
|
|
Hi - hope this the right place for VB 2005 problem...
I've written a COM dll in VB 2005. I'm using the objects without problem on the machine I compile on. Using them in excel, everything great.
However, when I try to use the dll on another machine no joy at all. I have registered OK (copied from the registry on the compliation machine), the GUID's etc check out fine.
When I reference the dll (actually the .tbl file) in XL it seems to be OK. I can see the objects in the XL VB IDE, they look cool. I can step through code but when I get to an instantiation (like Set X = new MyObj) VB throws an error "ActiveX component can't be created"
??
I've checked registry, installed VB 2005 on the non-compilation machine. No joy.
After a couple of days on this need some help? Any ideas?? Could this be as assembly problem?
Distributing a dll in c++ was never this painful (once it ciomplied ... )!
cheers for the input
gazza
|
|
|
|
|
Did you register the assembly using RegAsm or did you just try to copy the keys yourself?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
thks
I tried using RegAsm with 2 variants on the command line
RegAsm mydll.dll
and with the /tbl option
RegAsm mydll.dll /tbl:Mydll.tbl
I haven't got the error messages to hand but didn't work.
On the key question, I exported them to a .reg file on the compiling machine and re-imported on the new machine. The key *looks* to be OK.
there is a chapter on assemblies in Balena that I have started to go through but nothing useful yet.
thks for your reply.
|
|
|
|
|
Well, the other problem could be that your library code isn't decorated with COM attributes properly or completely.
You really DON'T want to just export the registry key and import it on another machine, there's definitly more than one key that has to be created!
Also, when you use RegAsm, if you don't use the CodeBase switch, you MUST either put your .DLL in the same folder as the .EXE client app that's using your COM objects, or you must install it into the GAC, but your assembly has to have a strong name to do that. If you don't, you can get the error that you're talking about.
If you use the CodeBase switch, you can register the .DLL where you want to put it, so long as it doesn't move after the registration is done.
C:\My Folder> REGASM MyComAssembly.dll /tbl:MyComAssembly.tlb /CodeBase
When I'm creating an assembly I want to expose to COM, this[^] is the step-by-step sheet I follow.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
thks
I am running .NET 2.0.50727
1. was using RegAsm ver 1.?? previously. Now using ver 2.0.50727.42 and I can register - I have done this now as indicated with the /tbl & /codebase as indicated on 2 machines with success.
Recall I am trying to use the objects in excel(.exe) through the VBA interface.
I find:
1. If I regsiter in an arbitrary directory on a client machine some interesting effects. When i try and instantiate I get "run-time error '-2147024894 (8007002)' File or assembly name "MyClass", or one of its dependencies, was not found"
2. If I regsiter in the excel.exe directory on a client machine, i try and instantiate I get
"run-time error '-2146234105 (80131107)' The format of the file "MyClass" is invalid.
had a sniff around, these errors have been seen before but I haven't found a solution to them.
In an attempt to "back-engineer" I have built some simple classes on a non-local machine (a machine that throw errors when I try and use classes from my local machine)... and after registration they work perfectly (!) on my local machine. Interestingly classes I build on the non-local machine do not function of the excel version of the non-local machine.
So although not solved some progress. Going to check Excel versions across machines and that .NET frameworks are consistent.
cheers
|
|
|
|
|
LittleEd wrote: o although not solved some progress. Going to check Excel versions across machines and that .NET frameworks are consistent.
My next two suggestions!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
OK think we are there ...
Client machines were looking to run (& debug) using a V1 release under NET. It was quite a pain finding how to amend this setting.
Tried editing the registry
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\AD7Metrics\Engine\{449EC4CC-30D2-4032-9256-EE18EB41B62B}
and adding & setting this entry:
CLRVersionForDebugging=V2.0.50727
..with no effect.
Stumbled upon a solution: edit (or create if necessary) excel.config.exe.xml file to look like
<configuration>
<startup>
<supportedruntime version="v2.0.50727">
<requiredruntime version="v2.0.50727">
& I placed a copy in the same dir as the excel.exe file. All COM classes now available, debugger works fine etc.
Should be *careful* on backward compatability issues but that's not a concern for me.
thanks for your interest,
GH
|
|
|
|
|
I should have added that i've tried to register the type library itself - the code ran fine but the still app didn't let me instantiate objects
the code I used was in the spirit of the link below
http://www.devx.com/vb2themax/Tip/18443
|
|
|
|
|
OK, there doesn't seem to be a concise definition of this anywhere, particularly on MS's pathetic excuse for help.
With the Mod operator, I've always thought that it return everything after the decimal point. Eg,
12 / 5 = 2.4
Therefore I'd expect
12 Mod 5 = 4
In practice, the result seems to be a random number, dependant on the current temparature in Kelvin, the number of times you have double clicked in the last six seconds and a random number between 12 and 47. From some testing...
12 Mod 5 = 2 ??
In fact, from the source code on MSDN, they say that
10 Mod 3 = 1
All I really need it for is working out if a Byte is even or not. If anyone can dare to explain, I'm sure it'll be useful.
Yet another spam post on yet another forum!
I am the lazy one, who sleeps as it suits him, codes what he wishes, and has many years to look forward to.
I love being a student.
|
|
|
|
|
MOD Returns the remainder left over after the first number is divided by the second number
12/5 is 2 with a remainder of 2 Therefore 12 MOD 5 is 2
10/3 is 3 with a remainder of 1 Therefore 10 MOD 3 is 1
and so forth.
Don
|
|
|
|