[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How do I send info to another program with Visual Basic 6?

Posted on 2009-04-26
3
Medium Priority
?
323 Views
Last Modified: 2012-05-06
Okay, is it possible to...
-open a internet window
-send text to a text box in the window
-press a command button in the window
-reload the window to a URL

Please answer one or all the questions.

0
Comment
Question by:IrTeh1337
  • 2
3 Comments
 
LVL 14

Accepted Solution

by:
Matti earned 500 total points
ID: 24244448
Hi!
Using sendkeys etc. does not give a sure results but You need to use own webbrowser control in this if it will due:
It's very similar in VB 6 this one is asked in .NET but it's on VB 6 area
http://www.experts-exchange.com/Programming/Languages/Visual_Basic/Q_24000817.html

In my frist comment there is a sbmit button click on that browser object.

Regards!
Matti
0
 

Author Comment

by:IrTeh1337
ID: 24246698
Okay, I am trying to create a auto-log in--just like the example you gave.
Look at the code snippet,
Is it possible to use a web control to...
put text in the text box and then click the command button?
If that is any way possible with vb6 please reply.
It's JavaScript fyi.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 
 
 
 
 
 
 
 
 
 
 
 
 
<html>
 
<head>
  
    
        <META http-equiv="Expires" content="0"/>
        <META http-equiv="pragma" content="no-cache"/>
        <META http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"/>
        <META name="Expires" content="0"/>
 
        <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
 
        <link rel="shortcut icon" href="../images/favicon.ico" type="image/x-icon"/>
        <link rel="stylesheet" type="text/css" href="/reportCard/stylesheet.css"/>
 
    
 
 
 
 
    
 
 
    <title>PTSD Report Cards</title>
    <script type="text/javascript">
        function trapEnterKey(evt)
        {
            var keycode;
 
            //noinspection StatementWithEmptyBodyJS
            if (evt)
                ;
            else if (window.event)
                evt = window.event;
            else if (event)
                evt = event;
            else
                return true;
 
            if (evt.charCode)
                keycode = evt.charCode;
            else if (evt.keyCode)
                keycode = evt.keyCode;
            else if (evt.which)
                keycode = evt.which;
            else
                keycode = 0;
 
            if (keycode == 13)
            {
                document.getElementById('loginForm:loginButton').click();
                return false;
            }
            else
                return true;
        }
    </script>
  
</head>
 
<body onload="document.forms[0].elements['loginForm:userNameInput'].focus();" onkeypress="trapEnterKey(event);">
 
  <script type="text/javascript">var _AdfWindowOpenError='A popup window blocker has been detected in your browser. Popup blockers interfere with the operation of this application. Please disable your popup blocker or allow popups from this site.';</script><script type="text/javascript" src="/reportCard/adf/jsLibs/Common1_0_7.js"></script><form id="loginForm" name="loginForm" method="POST" onkeypress="return _submitOnEnter(event,'loginForm');" action="/reportCard/pages/login.jsf">
 
  <table border="0" cellpadding="3" cellspacing="3" class="panel"><tbody><tr><td><img src="/reportCard/images/ptsdLogo.jpg" alt="Welcome to Mayet Report Cards" title="Welcome to PTSD Report Cards"></td></tr>
 
<tr><td><table align="CENTER" border="0" cellpadding="3" cellspacing="3" class="panel"><tbody><tr><td><table border="0" cellpadding="5" cellspacing="3">
<thead><tr><th class="login-heading" scope="colgroup" colspan="3">
PTSD Report Cards
</th></tr></thead><tbody><tr><td></td><td></td><td></td></tr>
<tr><td><label class="label" for="loginForm:userNameInput"><span class="label">Enter your user name:</span></label></td><td><input id="loginForm:userNameInput" name="loginForm:userNameInput" type="text" value="" maxlength="30" size="20" class="textField" tabindex="0"></td><td></td></tr>
<tr><td><label class="label" for="loginForm:passwordInput"><span class="label">Password:</span></label></td><td><input type="password" id="loginForm:passwordInput" name="loginForm:passwordInput" maxlength="20" size="20" class="textField"></td><td></td></tr>
<tr><td></td><td><input id="loginForm:loginButton" name="loginForm:loginButton" type="submit" value="Login" onclick="submitForm('loginForm',1,{source:'loginForm:loginButton'});return false;" class="button"></td><td></td></tr>
</tbody></table></td><td></td></tr>
</tbody></table></td></tr>
</tbody></table>
 
<input type="hidden" name="org.apache.myfaces.trinidad.faces.FORM" value="loginForm"><span id="tr_loginForm_Postscript"><input type="hidden" name="org.apache.myfaces.trinidad.faces.STATE" value="!8c2b464"><script type="text/javascript">function _loginFormValidator(f,s){return _validateInline(f,s);}var loginForm_SF={};</script></span><script type="text/javascript">_submitFormCheck();</script></form>
 
</body>
</html>

Open in new window

0
 

Author Closing Comment

by:IrTeh1337
ID: 31574760
Yeah I used the link for the code. Happy: :P
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question