|
if you want to run a EXE (Name : WW) from an other EXE (Name : QQ) with value sent to it you can use
sell "ww.exe value",vbnormalfocus
it is good and semble
soly
|
|
|
|
|
Hello
I am working with VB.Net, I want to read/write text data in remote server which is running on the same LAN.
I used the following code which gives an error
Imports System.IO
Imports System.IO.StreamReader
Dim path As String = "\\Server Name\Data\BarCode.txt"
Dim DirPath As String = "\\Server Name\Data"
Dim sw As StreamWriter
Dim di As DirectoryInfo
If Directory.Exists(DirPath) = False Then
di = Directory.CreateDirectory(“Data”)
End If
If File.Exists(path) = False Then
sw = File.CreateText(path)
sw.WriteLine("This is Test ")
sw.Flush()
sw.Close()
End if
How to make it working format?
Thanks
Muru
|
|
|
|
|
And that error is????
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
it through run time error. How to add user name, Password and Domain of the remote server?
|
|
|
|
|
If your machine and the remote machine are in the smae Windows domain, the code will use your security token to get into the remote machine. If your is seperate domains or in workgroup mode, you have to supply a username and password that the remote machine will recognize and has the appropriate rights to get at the network share you want on that server.
You can map a drive to that share then use it just like any normal drive letter. You can find and example here[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi
Thanks for your quick reply. Actually my exact requirement is, I am running VB.Net mobile application for Windows CE.Net 4.2 OS. I want write log file on the Server which running on the same LAN. Will it possible to map drive in Window CE.Net 4.2? Or Is there any other way write data to the server file? Kindly please assist me
Thanks
Muru
|
|
|
|
|
I have no idea. I don't do mobile development. You probably should have added that major detail to your original post. Ask in the Mobile Development forum for a more qualified answer.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hello,
I have a menu that a user can click and open a window. However, if the user was to click this form many time, it will continue to open up more windows. I want to prevent this from happening. If the user clicks open, it should just open the window once, if the window is already open, then it should get focus for that window.
I hope you understand, this is my code so far.
<br />
Dim rep10 As New NewCalls<br />
rep10.MdiParent = Me<br />
rep10.Show()<br />
Thanks in advance,
steve
|
|
|
|
|
http://www.codeproject.com/vb/net/Simple_Singleton_Forms.asp
|
|
|
|
|
Currently i doing a project on scheduler. My task is to perform a remote shutdown on the computers in my network at a specified time. I have problem figuring the code for this function. Can anyone help? Thanks a lot.
|
|
|
|
|
I am in the process of deploying a project using Visual Studio's Windows Installer but would like to check software activation keys before doing the install. I've looked at custom actions but they are executed after the installation. Is there a way to to this ?
Regards
"The things that will destroy us are: politics without principle; pleasure without conscience; wealth without work; knowledge without character; business without morality; science without humanity; and worship without sacrifice."
-Mahatma Gandhi (1869-1948)
|
|
|
|
|
You'll want to look at the Launch Conditions editor. This is where you can add requirements before an install.
|
|
|
|
|
I had a high school course in Visual Basic 6.0. However, I am now in college studying c++ in a unix-based environment. I am tryin to get back in to VB using VB.NET 2005. I am a gymnastics coach and i am trying to create a program that stores the skills each child has accomplished and retrieve them.
Any ideas as to how I can get the data to open and save?
|
|
|
|
|
j5matt wrote: ny ideas as to how I can get the data to open and save?
To be honest, VB2005 is so different to VB6, you really may find it easier to use C#, based on your knowledge of C++ style syntax ( although C# is nothing like C++ ).
Your best bet is probably an access database, only because it's more portable than a SQL Server one. Either way, there are tons of tutorials around on how to do this. Access also allows you to easily create your tables without writing any SQL.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Who gave you a 2 and why? That's what I want to know. Anyway, I've countered it because I can't see anything basically wrong with your answer.
|
|
|
|
|
I didn't even notice. What I find funny is, it was a 2, but not quite a 1 ? How do people quantify that ? If it's not 1 or 5 I don't bother voting.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I'm in the process of converting an application written in VB from VS2003 to VS2005, which has numerous random access files and structures. I am receiving warnings that read "Implicit conversion from 'System.ValueType' to StructureName in copying the value of 'ByRef' parameter 'Value' back to the matching argument. The application does function as designed, but I would like to correct the code to remove these warnings.
I have been searching the internet for weeks and have found many folks with the same problems, but no solutions have been posted. A sample of the associated code is listed below. With the statement
"FileGet(intCarFileNum, MyCellCarriers, intL)", the structure "MyCellCarriers" is underlined in green.
Any suggestions would be greatly appreciated.
Public Structure struCellCarriers
<vbfixedstring(3)> Public cIndex As String
<vbfixedstring(1)> Public cSep1 As String
<vbfixedstring(48)> Public cCarrier As String
<vbfixedstring(1)> Public cSep2 As String
<vbfixedstring(1)> Public cCR As String
End Structure
Public MyCellCarriers As struCellCarriers
intCarFileNum = FreeFile()
FileOpen(intCarFileNum, strCarFile, OpenMode.Random, , OpenShare.Shared, Len(MyCellCarriers))
intCarRecCnt = LOF(intCarFileNum) / Len(MyCellCarriers)
cboCellCarrier.BeginUpdate()
cboCellCarrier.Items.Clear()
For intL = 1 To intCarRecCnt
FileGet(intCarFileNum, MyCellCarriers, intL)
With MyCellCarriers
If .cCarrier.Trim > "" Then
cboCellCarrier.Items.Add(.cCarrier.Trim)
End If
End With
Next intL
FileClose(intCarFileNum)
|
|
|
|
|
how to add a msfgrid in VB.Net.
|
|
|
|
|
where are you struggling?
|
|
|
|
|
hi,
i didn't find msfgrid in components.
|
|
|
|
|
it comes with vb6 so if you have that, install it then you will have it available to you. otherwise...
|
|
|
|
|
ActiveDocument gives error whenever i open any existing document..
CType(applicationObject, Word.Application).CustomizationContext = CType(applicationObject, Word.Application).ActiveDocument
CType(applicationObject, Word.Application).ActiveDocument.Saved = True
oh !! i missed out the important part..
well this works fine when i go:- start-> run-> winword
it works fine when i go with debuging..
but if i run existing document by double clicking... it gives error .. specifying activeDocument not exist..
-- modified at 2:24 Thursday 19th October, 2006
"You can do any thing you set to your mind" - theGhost_k8
|
|
|
|
|
Where are you calling the function?
If you have opened a document prior to calling ActiveDocument it should work.
If there's no documents opened at all by Word it will return the error you mentioned.
And why do you keep boxing the applicationObject several times? You should cast it into a Word Application object and use it as it's more efficient this way.
"A democracy is nothing more than mob rule, where fifty-one percent of the people may take away the rights of the other forty-nine." - Thomas Jefferson
"Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote." - Benjamin Franklin
Edbert
Sydney, Australia
|
|
|
|
|
huh !! finally some one repled !!
OK now first boxing.. i'll do follow ur suggesion...
i'm calling this function from OnStartupComplete..
well i;ve tried an another way, used WindowActivate event of word object to add commandbar .. well it does work in case of opening existing document but as WindowActivate event fires several times it makes my addin slower..
hence i've set the object to nothing .. which causes event to be fired once.
You might thought, so whats the problem..??!! well, as soon as i set object as nothing.. it stops futher firing generating NewDocument event or anything else..
So .. no more addin loaded in new Document generated by clicking on new.
HELP...
"You can do any thing you set to your mind" - theGhost_k8
|
|
|
|
|
Please do us a favour and make your message easier to read, then we will be more inclined to help.
If you're calling the function on the OnStartupComplete of Word, then of course it will return an error as there is currently no ActiveDocument yet (i.e. no document is opened).
You should call the function on appropriate events such as when a document is opened or new document is created. This way you can be sure that there is an Active Document.
If you need further help, you probably might want to explain what is it that your function is doing.
"A democracy is nothing more than mob rule, where fifty-one percent of the people may take away the rights of the other forty-nine." - Thomas Jefferson
"Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote." - Benjamin Franklin
Edbert
Sydney, Australia
|
|
|
|