|
How to deny the change system date/time using VB
Bye
Mohan balal
|
|
|
|
|
Simple ... You can't.
This is controller by a security policy. Click on Start/Run and type secpol.msc. The open up Security Settings/Local Policies/User Rights Assignments. In the right side box, you'll find "Change the System Time". This is teh list of Groups/User that can change the system time. Just change this list, or if your in a domain/Active Directory environment, change the list accordingly and the policy will take effect in the next refresh cycle.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi all,
I have MDI application with StatusBar Control.
I want to add capslock and numlock panels..
I tried to establish it with OnKeyUp event
but I have a few problems with it,
one problem is when child window is opened, it gets the messages and not the mainframe...
What is the best way to do it...
Thanks RoyRose78.
|
|
|
|
|
I'm not quite following what you want to do,
but if your trying to send "messages" back to a
MDI Parent StatusBar from a MDI Child, I would use this.
DirectCast(Me.MdiParent, MainForm).Panel1.whatever
DirectCast(Me.MdiParent, MainForm).Panel1.Text = "It Worked"
|
|
|
|
|
Have you tried setting the KeyPreview on your MDI Parent form to True? This should let your main form see all the key events going to the controls under it before they are sent to the controls.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I have an old dos program that checks a cd-rom. I want to create a GUI using VB 6 to make it easier to run from windows. Is there any way to do this. also the results it gives i need to read back into VB 6 so that I can create a text file showing the results
|
|
|
|
|
If the DOS app outputs everything you need to the screen, you can launch the command and pipe it's output to a text file. Then your VB app can read that text file and decide what to do from there. The command your going to Shell launch would look something like this:
CDCHECKER.EXE D: > C:\results.txt
You'll have to use the Scripting Runtime WshShell object to launch the program and wait for its execution to complete. Set a reference to the Windows Scripting Object Model. This will give you the ability to Dim a WshShell object. Use the Run method of the WshShell object to launch your command line and wait for it to finish.
Dim wshShell As New WshShell
wshShell.Run("CDCHECKER.EXE D: > C:\results.txt", 0, True)
Then it's a simple matter of reading and parsing the results.txt file.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
HI,
Thanks for helping but I am a novice when it comes to VB 6 so I'm not understanding what you said to great. Will I send you what I have put together at the moment.
|
|
|
|
|
I don't have the time to be writing installing VB6 and checking code. To set a reference, all you do is go to the Project menu and click on References near the bottom of the menu. For there, scroll down the list of objects that comes up and find Microsoft Scripting Object Model. Check the box next to it and click OK. Then the code will work.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I must write an application that connect to a Web Server and retrieve file with a specific extension and place them in a array of bytes.
I dont know where to start (except the fact that i must use System.Net namespace). Can someone help me.;P
I am a newbie
|
|
|
|
|
Download the Application Updater Block from MS Samples and look at the code there.
|
|
|
|
|
I am woking on an application that makes calls to Adobe Acrobat. Acrobat can only be manipulated externally using JavaScript. Trying to port the JavaScript commands into my VB.Net application (Windows based not ASP or Web) has been extremely diffcult.
Is there a method, class or reference which allows me to bring the JavaScript into the project and complie into VB.net code?
I found an application on this website that converts the JavaScript to VB.Net or C# code, but the end result is made to be displayed in a web browser (no good for my Windows app).
Any suggestions/help will be appreciated.
Peter Hesse
|
|
|
|
|
I'm having a very hard time believeing that Acrobat can only be manipulated by Javascript, considering Acrobat exposes a bunch of COM interfaces. After all, there's nothing special about Javascript that gives it exclusive privleges over Acrobat.
There is really no good utility to convert Javascript to VB.NET. The best way to do it is by hand. What does the code look like, in Javascript, you need to convert to VB.NET?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
From the Adobe Acrobat 6.0 SDK:
Acrobat 6.0 provides a rich set of JavaScript programming interfaces that are designed to be used within the Acrobat environment. It also provides a mechanisim (know as JSObject) that allows external clients to access the same functionality from enviroments such as Visual Basic.
That being said, here is a typical snippet I am dealing with. This one digitally signs a PDF document and sets certain properties of the signature.
var myEngine = security.getHandler( "Adobe.PPKLite" );
myEngine.login( "dps017", "/c/profile/dps.pfx" );
var f = this.getField("Signature");
// Sign the field
f.signatureSign( myEngine,
{ password: "dps017", // provide password
location: "San Jose, CA", // ... see note below
reason: "I am approving this document",
contactInfo: "dpsmith@adobe.com",
appearance: "Fancy"});
I have figured out how to set up the document and have actually figured out the code to create the digital signature block. When signning however, f.signatureSign has several variables that must be passed in the form of objects, with each object containing several properties. In the example above, the location: and reason: are part of a signatureInfo object know as oInfo.
I tried to create a structure and then create an object based upon that structure, but it throws an error.
If you can help I can send a snippet of my code that may give you a better idea of how Adobe claims the JavaScript should be implemented.
Thanks for your reply,
Peter Hesse
|
|
|
|
|
Hi,
By default PictureBox, Label or TextBox controls show rectangle corners. I need to draw these controls so that they have rounded corner. Any ideas?
Thanks.
|
|
|
|
|
You'll either have to find 3rd party controls that do this or write them yourself. Basically, for each control you want to change, you'll create a control class that inherits from one of the controls you want to modify. Then, you'll have to override the OnPaint method and supply your own painting code to draw the control how you want.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
There is a client LAN_CLIENT who is on LAN (office, university or any other place). There is a HOME_CLIENT connected directly to the internet. Now how HOME_CLIENT can communicate with the person who is sitting in the LAN i.e LAN_CLIENT, as LAN's IP is not the same as that of internet. Both are using winsock control of VB 6 application(UDP).
Both users have to be connected directly i.e no server. So how the data of HOME_CLIENT will pass through LAN's server & reach LAN_CLIENT's PC.
I don't want to use port forwarding done manualy in router.
I'll be very thankful for the reply.
Try to go in 1 direction.
|
|
|
|
|
curious_keen wrote:
I don't want to use port forwarding done manualy in router.
Since there is no direct route between the local network that the LAN_CLIENT machine is on and the Internet, you MUST use some kind of forwarding or Proxy server on the LAN_CLIENT side. I'm assuming the the LAN_CLIENT sits on the safe side of a firewall. That firewall must be configured to allow either the connection originating from the LAN_CLIENT to the HOME_CLIENT or must be configured to allow the connection originating from the HOME_CLIENT going to the LAN_CLIENT, on the ports your using.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
The LAN in which I am there is neither proxy nor any firewall. But Yahoo messenger & MSN messenger works fine. Also file transfer seems to be direct (because of speed) as tested in MSN messenger, so how Yahoo & MSN messenger connect 2 people directly.
So how the data which reaches server will reach the LAN_CLIENT...?
Try to go in 1 direction.
|
|
|
|
|
curious_keen wrote:
so how Yahoo & MSN messenger connect 2 people directly.
They don't. It goes through a relay server. IF your network address is not an Internet address then there MUST be some kind of translating proxy or firewall or whatever between your machine and the Internet.
curious_keen wrote:
Also file transfer seems to be direct (because of speed)
The speed of a transfer is NOT a method of determining how the message is being transferred from one machine to the other.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi!
I have created one class library in C# with some overloaded functions like,
public void AddColumn(string val){};
public void AddColumn(string val, bool PK){};
I am taking referance of this C# classlibrary in to Visual basic project. Everything is workign fine except, I am able to call only the first overloaded method. If I will try to call the second overloaded method, I am getting run time error like "Invalid procedure call or argument".
Is there any way from which I can call the second overloaded method?
|
|
|
|
|
There's nothing special you have to do. Just call the function name with the right parameters. That's it. In order to give you more information on this, we'll have to see the C# and VB.NET code your using.
Wait! Are you using VB.NET or VB6? VB6 won't call an overloaded method because it doesn't support it. VB.NET will...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi gurus,
I want to add a text file into my project to use it at my development time. How do i do this?
Thanx in Advance,
Ravi.
|
|
|
|
|
Can you explain what you mean sorry?
"Purple Monks Don't Exist"
|
|
|
|
|
Add a text file to your project? Why? How do you want to use this text file at development time? What is the purpose of the text file?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|