|
Hey all
Still working on that AD logon script. I've got everything the way I want it but I cannot find out for the life of me how to pass a variable from vbs to delphi5.
Example:
I want to pass variable UserName to delphi5 as a parameter in a console app. I have UserName = objNet.UserName and after i retreive the username, I then execute the external console app.
Once i begin to execute the console app, I want vbs to pass UserName as a parameter to delphi5.
Any ideas?? I'm stumped
"A child of five would understand this! Send someone to fetch a child of five!"-Groucho Marx
|
|
|
|
|
The Delphi app has to be written to accept a command line parameter. After that, it's easy. Just pass the value as part of the command line to launch the Delphi app.
C:\somepath\MyApp.exe somevalue
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
:-DExcellent. Thanks much!
"A child of five would understand this! Send someone to fetch a child of five!"-Groucho Marx
|
|
|
|
|
is there any method to make end user to just select value from combobox
and not to write any value in it, other than style property since
using style property restrict me to dynamically change selected value depending on some condition using codes
|
|
|
|
|
you could overload the WM_CHAR (not sure about the name), ,but i think that even at runtime, changing the ComboBox properties is still the best thing to do...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]
|
|
|
|
|
To change the properties on run time
|
|
|
|
|
|
Hello!
My aim is to write a text on a picture box image which is working okay but what happens after drawing is the text is getting disappeared on the image because of refreshing. How could I maintain a persistent text on the image?
Thanks!
Here is my sample syntax:
PictureBox6.CreateGraphics.DrawString(GetLabel, GetFont, GetBrush, SetX, SetY)
Love is not a diversible reality!
|
|
|
|
|
You have to either draw the string to an image that the picturebox is showing or override the Paint event of the picturebox and put the drawstring code in that, so when the picturebox is told to redraw itself, it has the code to redraw the string.
Controls and images are not "draw once and forget about it". The images of controls do no persist themselves. You have to supply the code to redraw the image AT ANY TIME.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi, I am inserting current date and time in separate fields for every record inserted or modified. The records are correctly updated in the access database. However, the same is not reflected in the datagrid where the inserted or updated data is displayed. The date appears correct, but the time appears as some date. Please help.
With Best Regards,
Mayur
|
|
|
|
|
I have a chat app that use a webcam. I am taking a screenshot of the preview window in order to get the image. Only problem is, if the window is hidden or say minimized, my images come back as big Black square..ughh
Anyone know how to get the window to keep painting itself when its hidden or minimized?
Any help would be appreciated.
Thanks
-Jason
|
|
|
|
|
Hidden windows never the get told to paint themselves by Windows. You can try sending a WM_PAINT message to the target window handle, but there is no guarantee that it'll work anyway. If the window determines that it, itself, is obscured, it won't waste the time painting those regions.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
how to convert a varchar value into varbinary at runtime
iam using vb 6.0 as frontend and sql as backend
|
|
|
|
|
give an example for your need
|
|
|
|
|
the application is to create login id and i want the value i entered in password in varchar is reflected in login tables password column field as varbinary
something like "convert( & txtpwd.text & as varbinary)"
but in my form varbinary is not there
|
|
|
|
|
I dont think that Vb has a built in conversion method for that, although I may be wrong.
But you can use the Convert function in SQL to do it.
CONVERT(varbinary(Length), @TheVarChar))
In your case, the length parameter would be optional
-Jason
-- modified at 4:07 Thursday 2nd February, 2006
|
|
|
|
|
i want to rename folders. i've used system.io namespace, but directories haven't renamed.
if a folder contains files or directories, the directory created a new name, but files and folders doesn't copied. they'll still alive in the old folder.
if you know a function or api (or whatever) to rename folders (like in windows), please response it
|
|
|
|
|
It would help if you posted the code your using to do the rename. Without seeing exactly what you're doing, it's impossible to tell you what you're doing wrong.
Renaming a folder will not make a copy of it and will not copy the contents of the old folder to the copy. You should be doing something like this:
Directory.Move(currentFolderName, newFolderName)
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i've tried this function. but it fails. i want a code to rename folder while the folder contains something. think in DOS OS we can't do this because, the folder has something. but windows we can easily change folder names. how can i do like that in vb. because windows can do. i inspected kernel32.dll but i couldn't find any suitable functions.
|
|
|
|
|
Read this reply from Dave[^] again, post your code and we can have a look at what you are doing wrong.
...Steve
"Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." (Translation: I'll show you the way, but not write the code for you.) I read that somewhere once
|
|
|
|
|
Public Sub renameFolder(ByVal oldFolder As String, ByVal newFolder As String)
Dim folder As New IO.DirectoryInfo(oldFolder)
folder.MoveTo(newFolder)
'The other method
'Dim folder As IO.Directory
'folder.Move(oldFolder, newFolder)
End Sub
|
|
|
|
|
Works on my machine, but you have no error handling at all so we don't know what the problem really is. Use this code to report and display any exception that's thrown...
Public Sub renameFolder(ByVal oldFolder As String, ByVal newFolder As String)
Dim folder As New IO.DirectoryInfo(oldFolder)
Try
folder.MoveTo(newFolder)
'The other method
'Dim folder As IO.Directory
'folder.Move(oldFolder, newFolder)
Catch ex As Exception
'
' Inspect the ex object to determine the reason
' for the error.
'
MsgBox(ex.Message.ToString, MsgBoxStyle.Exclamation + MsgBoxStyle.OkOnly, "MoveTo Failed")
Finally
'
End Try
End Sub
...Steve
"Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." (Translation: I'll show you the way, but not write the code for you.) I read that somewhere once
|
|
|
|
|
now it works. but i can't understand, this code didn't run like now. it had just created an empty folder. (Thanks GOD) now it runs..
thanks for your patience and interests....
|
|
|
|
|
dungeonsdarknight wrote: now it works. but i can't understand, this code didn't run like now
Maybe, just maybe, the old folder was in use at the time you ran the code at first and threw an exception which you did not catch. If so, you may run into the problem in the future so some exception handling is highly recommended.
...Steve
"Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." (Translation: I'll show you the way, but not write the code for you.) I read that somewhere once
|
|
|
|
|
Like Steve said, ths code works. The problem you're probably having is that you can't rename a folder until all the filers in that folder have been closed by whatever processes are using them.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|