|
The aim is to make a goodbye screen, but at the mo it is just over the top of the current form, whereas i want that to be the only form shown!
I will have a go with this statement
|
|
|
|
|
Then that's what you do. After that, you can wait a little bit, then call Application.Exit.
|
|
|
|
|
Dave Kreskowiak wrote: For Each f As Form in Application.OpenForms
' Make sure we're not hiding the form this code is on...
If f Is Not Me Then
f.Hide
Next
Next
That was what I was thinking of yesterday when I replied in the earlier post...
|
|
|
|
|
is this the exact code i should use?
I have tried it and i get how it works, but i am getting an error on "not me" bit, and why is there 2 nexts, wouldnt one just create the loop?!
|
|
|
|
|
That first Next should be an "End If" actually.
You should NEVER just copy and paste code. Try and understand any examples and write your own. There's too many "Copy'n'Paste" programmers out there clogging up the forums.
|
|
|
|
|
Dont worry, i am just trying out code really, not copying and pasting and leaving it that way.
Still, what is the "not me" bit about?
|
|
|
|
|
Me always referes to the current instance of an object. Since every open form ends up in the OpenForms collection, that loop has to check to see if it's going to hide the form the code is running on.
|
|
|
|
|
hi there
i am writing an app which collects screen captures and the uses getpixel to read colors of various pixels on the captures... a problem i have run into though is that for this line:
curcolor = gamescreen.GetPixel(432 - (57 * x), 432 - (57 * y))
i am getting an error saying the object is currently in use elsewhere
... i'm not exactly sure what to do, but i've played around with a few things... curcolor and gamescreen are not being used anywhere else at the time, so i am assuming it has something to do with GUI... any suggestions would be appreciated, thanks!
|
|
|
|
|
Your best bet if you're doing a lot of screen reading is to read my image processing articles and write a C# dll that does it, because VB.NET can't do it the way C# can, which is faster.
Do you have more than one thread going on ? I suspect that getpixel locks the bits internally every time, and that they are still locked from the last call, hence the error.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
visual basic 6
When I use webbrowser control,
I can write
WebBrowser.Document.parentWindow.execScript "window.alert=null;"
on WebBrowser_NavigateComplete2 event
now i use vbMHWB control, how to do it ?
当我在vb中使用webBrowser这个控件的时候,我可以在WebBrowser_NavigateComplete2这个事件
中执行WebBrowser.Document.parentWindow.execScript "window.alert=null;"这个方法,
现在,我使用了vbMHWB这个控件的时候,我怎么使用Js的execScript方法重载js的一些方法,比如window.alert=null;window.focus=null;等等在WebBrowser_NavigateComplete2这个事件中现在好像不支持,一运行会报error.怎么解决?
hi
|
|
|
|
|
<br />
<br />
Private Sub brwWebBrowser_DocumentCompleteWBEx(ByVal wbUID As Integer, URL As Variant, ByVal pDisp As Object, ByVal isTopLevel As Boolean, ByVal sDocSource As String) <br />
<br />
'IE中DHTML的属性和方法可以重写。当然alert,confirm, showModalDialog也不例外。<br />
brwWebBrowser.Document(iCur).parentWindow.execScript "window.alert=null;" '<------error here! access refuse 访问拒绝 <br />
brwWebBrowser.Document(iCur).parentWindow.execScript "window.confirm=null;"<br />
brwWebBrowser.Document(iCur).parentWindow.execScript "window.showModalDialog=null;"<br />
brwWebBrowser.Document(iCur).parentWindow.execScript "window.showModelessDialog=null;"<br />
brwWebBrowser.Document(iCur).parentWindow.execScript "window.open=null;"<br />
brwWebBrowser.Document(iCur).parentWindow.execScript "window.focus=null;"<br />
brwWebBrowser.Document(iCur).parentWindow.execScript "window.onunload=null;"<br />
brwWebBrowser.Document(iCur).parentWindow.execScript "window.attachEvent=null;"<br />
brwWebBrowser.Document(iCur).parentWindow.execScript "window.eval=null;"<br />
brwWebBrowser.Document(iCur).parentWindow.execScript "eval=null;"
hi
|
|
|
|
|
does some man get the code for NavigateError?
when website address error was wrong, there will be link to fixed webpage,,,
regards
henry
henry
|
|
|
|
|
What is it that you want ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
the code is for that , when user input a wrong website address and which address is unavailable or does not exist, the IE will be linked to a fixed website.
not sure it is clean or not, looking for your help,,,
regards
henry
|
|
|
|
|
So, all you should have to do in your NavigateError event handler is call Navigate to a known good page, like a local file or some other site.
|
|
|
|
|
Hi,
How to show a Crystal report without Database using VB6.
Thanks & Regards
Kumaran
|
|
|
|
|
Kumaran21cen wrote: How to show a Crystal report without Database using VB6.
After a quick google search, I don't think it is possible...
|
|
|
|
|
The only thing that's "very urgent" in a forum environment like CP, is the need to pee.
AFAIK, CrystalReports will only work in a database environment.
|
|
|
|
|
Dave Kreskowiak wrote: only thing that's "very urgent" in a forum environment like CP, is the need to pee
|
|
|
|
|
i want vb.net codes for update or change the values and save the changed or updated values in datagrid during runtime of vb.net windows application.
|
|
|
|
|
sathyan_8294 wrote: plz help...very very urgent...
As opposed to all the other questions, that are asked by people who don't care if they get an answer ? Please don't do this, imagine if everyone did, the forum would look like this:
Pease help
I need help !!!!
Urgent - help me !!!
Do you think that's useful ?
sathyan_8294 wrote: i want vb.net codes for update or change the values and save the changed or updated values in datagrid during runtime of vb.net windows application.
Your question is broad enough that it's obvious you've not bothered with google. It's also too broad to answer. Save the changes to where ? Is this ASP.NET or winforms ? What have you tried ? Why doesn't it work ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Looking at previous posts you had another 'plz help' message title in which the rules were explained. Again, please read the rules of the forum.
__________________
Bob is my homeboy.
|
|
|
|
|
And the only thing that's "very very urgent" in a forum environment like CP, is the need to pee. So, please, go to the bathroom first, then come back and explain your question in more detail when you don't need to pee so bad.
|
|
|
|
|
|
okay,
I've looked into using my.settings to change values of text boxes at run time. What I'd really like to do though, allow the user to save the current settings as "whatevername.xml", and then open that setting file whenever they want, changing the values of the text boxes. I'm not sure what to do as everything I've read uses either the app.config, or user.config files. Any ideas?
Thanks
|
|
|
|