|
On instantiation, web site loads a java applet. I need to wait until the applet if fully loaded before I can LogIn. I can set the cursor to the correct Window position for LogIn, but it arrives before the applet finishes. I am also unable to make the LogIn box accept the Left_Key_Down/Up and the eventual UserId, Password.
WebPageLoader URLWeb ' Navigates to the web<br />
<br />
Sleep 6000 <br />
<br />
Dim LTime As Date<br />
LTime = Now()<br />
While Time - LTime > 20<br />
DoEvents:(<br />
Wend<br />
<br />
'this happens before the web page loads, the page loads in about 5 seconds!!!<br />
' X/Y need to be passed as Pixels!<br />
xPos = (WebBrowser.Left + 0.9 * WebBrowser.Width) / Screen.TwipsPerPixelX<br />
yPos = (WebBrowser.Top + 0.5 * WebBrowser.Height) / Screen.TwipsPerPixelY<br />
<br />
' Move cursor to destination, first<br />
SetCursorPos xPos, yPos: Sleep 500<br />
MousePointer = vbArrow<br />
<br />
'Map into same coordinate space used by mouse_event.<br />
xPos = (xPos / GetSystemMetrics(SM_CXSCREEN)) * &HFFFF&<br />
yPos = (yPos / GetSystemMetrics(SM_CYSCREEN)) * &HFFFF& <br />
<br />
If Me.WindowState = vbMinimized Then Me.WindowState = vbNormal<br />
Me.SetFocus<br />
<br />
Dim hWnd As Long<br />
'hWnd = GetForegroundWindow()<br />
hWnd = WebBrowser.hWnd<br />
<br />
'here are 3 methods that I have tried<br />
Call mouse_event(MOUSEEVENTF_LEFTDOWN Or MOUSEEVENTF_ABSOLUTE, xPos, yPos, 0, 0)<br />
Sleep 250<br />
Call mouse_event(MOUSEEVENTF_LEFTUP Or MOUSEEVENTF_ABSOLUTE, xPos, yPos, 0, 0)<br />
Sleep 250<br />
<br />
Dim lng As Long<br />
lng = SendMessageVal(hWnd, MOUSEEVENTF_LEFTDOWN, 1, 0)<br />
lng = SendMessageVal(hWnd, MOUSEEVENTF_LEFTUP, 1, 0)<br />
<br />
'lng = Send_Key_Code(MOUSEEVENTF_LEFTDOWN Or MOUSEEVENTF_ABSOLUTE, lHandle, False, False, False)<br />
'lng = Send_Key_Code(MOUSEEVENTF_LEFTUP Or MOUSEEVENTF_ABSOLUTE, lHandle, False, False, False)<br />
<br />
SendKeys "xxxx@yahoo.com", True: Sleep SleepTime 'UserID<br />
SendKeys (vbTab), True: Sleep SleepTime<br />
SendKeys "xxxxx", True: Sleep SleepTime 'password<br />
SendKeys vbCr, True
"Good software like good food takes time to prepare"
Winnie-the-Pough"
|
|
|
|
|
Hi,
I have a VB Project that needs Unicode support. I use Textbox, listview, treeview,and labels. I replaced the default textbox with Microsoft forms2.0 object library's textbox in the application, but this too fails to display many of the characters.There are no Treeview and Listview in Microsoft forms2.0 object library. Someone please help me.
Thanks & Regards
Ranjan
|
|
|
|
|
Ummm....Everything in VB is stored in Unicode. Could it be that the characters you're trying to display don't exist in the font that your using?
Which VB are you using? What's the O/S on the machine? It could also be that your O/S doesn't support it. Win9x installations had to have Unicode support added to the O/S after installation...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello,
I am developing a project in vb.net. So, I have made login screen. After the user is validated, I need to open the next screen. I am using the code like:
Dim AdminPage As New frmMDI
AdminPage.Show()
Me.Dispose()
This piece of code works fine in the other vb.net project. But here, after the user is validated, instead of opening the next page, the project stops running. Even in the debug mode also, I am unable to find out the problem as the program stops running. So, please let me know, how can I solve this problem?
With Regards,
Sheshadrinath.R
|
|
|
|
|
Dim AdminPage As New frmMDI
AdminPage.Show()
Me.Dispose()
u may have current form as start up page (Me) so when u say Me.Dispose() then ur application get Dispose bcoz ur main from of application is current form(Me)
so inted of Me.Dispose() use Me.Hide()
it will solve the problem
if u have some prob with that plz reply me on my id
harshad_pednekar@yahoo.com
Regards
Harshad
|
|
|
|
|
Your startup form should be the main application form, not the LoginForm.
You're main form should start up, check some flag to see if the user is logged in, and if not, show the login form. If the login is successful, you can finish starting up your main form. If not, the main form can kill itself and shutdown your app.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
LETS THINK UR LOGIN SCREEN IS IN FORM1
SO U HAVE TO GOTO FORM 2 AFTER VALIDATING
WRITE:
DIM OBJ AS FORM2
OBJ=NEW FORM2
OBJ.SHOW()
ME.HIDE()
|
|
|
|
|
i have a vb application with me. I have used dsn for connecting to database. i want to make a installation package using package and deployment in vs 6.0. Here how can i integrate the dsn?. is there any way so that the dsn automaticaly comes when i install the software in the system.
thanking you
hari
|
|
|
|
|
I haven't used a DSN in almost 10 years... Let's see, ...., there's Creating a File DSN[^] that you could use to gleen some information from. You'd probably have to include this in your installation package and include a custom installer .EXE to install it. There's also some useful stuff in Creating a Machine DSN[^] that you can poke into the registry.
This is going to come down to what your abilities are and what you can pull off with them. I don't think you're going to find much in the way of having this installed for you automatically.
...but, then again, it's been 10 years since I've used one...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I need to use WinSock in vb6.0 to read emails of different accounts. Is any one know from where i could b able to get help on this.
Thanx
Noshaba
|
|
|
|
|
You'd be writing your own implementation of a POP3 and SMTP clients. The topic is WAY too big to go into in a forum environment. If you've got specific questions about the implementation, we can help you with that. But the question you posted is so general, all we can do is point you in the direction of Google:
Results[^] for "VB6 pop3 client"
Results[^] for "VB6 smtp client"
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi all,
I guess i didnt search much in net to get what i want in simple few lines of code
all i want to do is change the button submit to plesae wait and disableit as soon as they click submit so that i can prevent from them to submit again.
|
|
|
|
|
To save you the trouble of reading the manual... in the cmdSubmit_Click() event (assuming your Submit button is named cmdSubmit) ...
cmdSubmit.Text = "Plesae Wait"<br />
cmdSubmit.Enabled = False
Simple huh?
...Steve
1. quod erat demonstrandum
2. "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." I read that somewhere once
(Translation: I'll show you the way, but not write the code for you.)
|
|
|
|
|
i assume those codes will be stored in server side i am talking about when the internet connection is slow. let says. while user uploads the file and the progress bar goes up till the image upload is complete there could be chance they can upload it again. if the internet connection is fast the effect of that code will not be visible. i dont know correct me if i am wrong.
thanks once again.
|
|
|
|
|
foremorecoast1 wrote: i assume those codes will be stored in server side i am talking about when the internet connection is slow
Well you didn't tell me that it was a web app. In this case I agree with Dave. If it is a non-web app, the code I gave you will work just fine.
Be more specific in your questions and RTFM a bit more.
...Steve
1. quod erat demonstrandum
2. "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." I read that somewhere once
(Translation: I'll show you the way, but not write the code for you.)
|
|
|
|
|
You don't want to be doing that...
Simply because if the POST (button click) fails for any reason, the user will not have the option of going back and clicking Submit again.
You'd be much better off writing your code to handle the situation where it might see the same request twice, or more.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
WRITE:IN CLICK EVENT
BUTTTON1.ENABLED=FALSE
VIJAY KUMAR.N.S
|
|
|
|
|
Hi all ,
I am using vb.net 2003, i have to create dll using this. it doesnot have the components library option .Any other methods are there??
thanks in advance..
"Money decreases by sharing..,
knowledge increases by sharing.."
bharath.s
-- modified at 1:16 Thursday 16th March, 2006
|
|
|
|
|
You are looking for Class Library
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
on your solution just add a new project as a Class Library not as a windows application.. the output of this would be a .dll
|
|
|
|
|
Hi All
i am running my web application for dating website in local host prog. when the user try to do file upload i am uploading the file in a temp directory but i get following error.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.UnauthorizedAccessException: Access to the path "C:\Inetpub\wwwroot\dating.net\pix\temp\victor2_6316133322.jpg" is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String str)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode)
at System.Web.HttpPostedFile.SaveAs(String filename)
--- End of inner exception stack trace ---
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess)
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean verifyAccess)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.VisualBasic.CompilerServices.LateBinding.FastCall(Object o, MethodBase method, ParameterInfo[] Parameters, Object[] args, Type objType, IReflect objIReflect)
at Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack, Boolean IgnoreReturn)
at Microsoft.VisualBasic.CompilerServices.LateBinding.LateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack)
at ASP.editphotos_aspx.Upload_Click(Object source, EventArgs e)
i gave all access to anonomous user the project folder and permission inherits to temp directory too. in the directory web sharing i also gave write permission i dont know what went wrong. please help thanks
|
|
|
|
|
You must allow IIS to write to that folder...
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
You have to give explicit permissions to the ASPNET account that your site is running under. Anonymous just wont do it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
ok i gave write permission for IIS to wwwroot now abot giving permission to aspnet account to the site the user wont come up. i mean the computer is disconnected to network and is NTFS. and if i write click the project folder under wwwroot it gives only four options GENERAL, SHARING, WEB SHARING and CUSTOMISE, in web sharing i also have included write permission i really dont know what else i could do. i also tried to put aspnet account under admin group in computer group policy still no help. i dont know what went wrong...
|
|
|
|
|
When you right-click the folder your site is in, there should be a Security tab. If not, you might have simple file sharing turned on. Open MyComputer, click the Tools menu, Folder Options. Click on the View tab in the dialog that comes up. In the Advanced Settings box, scroll down to the bottom of the list. You'll find "Use simple file sharing (Recommended)", turn it off.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|