|
look at this...
Application.Restart()
if i use this,the application will restart..but i dnt want the application to restart?
any idea?..plss..txxx..
|
|
|
|
|
You would need to write a Reset method that manually re initialises all your objects and variables
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Why are you reposting same question[^]?
The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures."
जय हिंद
|
|
|
|
|
hi ,
i have a question about events in vb.net ,
im looking for a similar functionality to c# event registering ,
like how could i "unregister" an event during run time and then register it back.
for example in c#
myclass.myEvent -= new MyEvent(myHabdler);
[code block , that i dont want the event will fire]
myclass.myEvent += new MyEvent(myHabdler);
thank you for your time!
Net
|
|
|
|
|
Hi,
I suggest you read up on the AddHandler and RemoveHandler methods. They serve that very purpose.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Thank you its exactly what i was looking for.
Net
|
|
|
|
|
hi, i've written a few applications using vb.net, and they all work fine on my computer, but after copying into another computer, there is always one error or the other. sometimes, the applications woulnd't even start up at all. i've seen other applications that people developed using vb.net, i've downloaded some from the internet and they dont seem to have any problems... how do they do it?
how can i make my vb.net applications run on other computers without an error message???
|
|
|
|
|
|
yea, i've tried that. it only solves error at start up. but... how can i distribute the application without a setup? for example, there an application i downloaded, it had just the .exe and some .dll files... no setup or anything, and the application works just fine! i want to be able to distribute ma applications just like that. i wrote a little yahoo multi messenger patch application... the application is too little to create a setup for it. so what can i do?
|
|
|
|
|
There are several aspects to consider in development and deployment. Just think about the following ones at least.
Hardware and software is a broad subject. I have no doubt that evey developer has faced with such problems because development is not as easy as we think. There is no perfect software and even hardware and definetly there is no expert one to solve every type of problem. The problems are time depended to be solved.
We all make mistakes and therefore we draw something from the story we experienced not to fall into it again.
Targeted OS is important (32 bit / 64 Bit)
The frame work is importand (for example you developed an app with .Net frame work 3.0) if the user doesn't have this framework in his/her system, he suppose to download it to make your app running.
Whichever library you use during the devlopment make sure that you have to also include this libraries in deployment package. Some time you use your own ones but sometime you use the ones which belongs to OS.
Consider the security issues and make sure that OS will allow you to install your app.
Surely you will come over the problem soon.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
i search for visual basic code that i can use in a macro to copy tables to excel sheet...
from : http://www.nhl.com/scores/htmlreports/20082009/PL020875.HTM
i want to automate the extraction process in my excel macro to do it several times from similar pages with different datas and do a analysist of the data. i want to keep same format as in the web page
can you please help me?
i can pay for help
please reply!!!!!
modified on Sunday, February 22, 2009 3:53 PM
|
|
|
|
|
There is a computer competition in our school , programming with Visual Basic , but they didn't specified which version of Visual basic is gonna be used , and due to their .... computers , everything is possible , even VB2002(3) ( not sure which version really exits !! )
right now i'm learning C# , but I want to learn some Basic for this competition . If i start learning VB.NET 2008 syntaxes , can i use them in 2005 and 2002(3) versions too ? what is the real difference between them ?
17 years old, new to C# and programming
|
|
|
|
|
For what's new follow the links here:
What's New in Visual Basic[^]
Mohammad Reza Sabouri wrote: If i start learning VB.NET 2008 syntaxes , can i use them in 2005 and 2002(3) versions too ?
No. But you may as well use the latest version. It will be more fun.
Kevin
|
|
|
|
|
Hi
I have formulated a function that checks the titles of the IE pages open and if required page is found, takes the appropriate action (in this code snippet, just tells by message box)
The problem is function does not do the required job.
Where is the bug? Any help would be appriciated.
Thanks (vb.net version 2003)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim strNames() As String = {"Yahoo", "Gmail", "Hotmail"}
Dim bln As Boolean = FindWindow(strNames)
MsgBox(bln.ToString)
End Sub
Private Function FindWindow(ByVal Names() As String) As Boolean
Dim pr As Process() = Process.GetProcessesByName("iexplore")
If pr.Length > 0 Then
For i As Integer = 0 To UBound(pr)
For j As Integer = 0 To UBound(Names)
If pr(i).MainWindowTitle.IndexOf(Names(j)) <> -1 Then
Return True
Exit Function
End If
Next j
Next i
End If
End Function
reman
|
|
|
|
|
Amer Rehman wrote: The problem is function does not do the required job.
OK, so what does it do?
My guess is that you are finding that Process.GetProcessesByName("iexplore") returns one process. If you look at the process tab of task manager you will see that only one instance of internet explorer runs irrespective of the number of windows it has open. Contrast this to Notepad which starts one instance per window.
The title you are retrieving via pr.MainWindowTitle is the current iexplore window.
By the way I got all of this information from four lines of code and an inquisitive mind. How are your debugging skills today?
Alan.
|
|
|
|
|
Thanks for reply, but I am sorry to say that you are wrong.
First, what do I want? I want to prevent user from downloading other than the mail pages(Yahoo, Gmail,Hotmail).
Process.GetProcessesByName("iexplore") returns an array of processes whose Title we can retrieve in this way pr(i).GetMainWindowTitle. If we change the argument "i" we can retrieve all the open windows of IE though the process type is one ("iexplore").
What does the application do?
It gives wrong answers.i.e. if the mail page is open first, it says "True", but if it is opened after opening another IE page, it says "False" despite the fact that it is open.
reman
|
|
|
|
|
I'm running IE6 and this has one process for all windows. What version are you running?
Alan.
|
|
|
|
|
You're right I am wrong, or maybe we're both right! When I want an extra window I have always used IE's menu File..New..Window which doesn't start a new process and then there is only one title available, that of the current window.
I can get another iexplore process from the start menu and then as you say there is a title for each window.
Alan.
|
|
|
|
|
Dear Mr. Alan
After replying your first mail, I checked the code and found that I was maistaken. I did'nt check the Vb Documentation before writing code.Perhaps the solution to my problem is by using some API call. There is no managed way in VB 2003 to get all the open window. Or if there is, I'm not aware of it.
And I'm using IE version 6.
Thanks
Amer
reman
|
|
|
|
|
Not sure but this would be better:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim strNames() As String = {"Yahoo", "Gmail", "Hotmail"}
Dim bln As Boolean
if FindWindow(strNames) then
' true - found
MsgBox(bln.ToString)
else
' False - Could not find
end if
End Sub
Private Function FindWindow(ByVal Names() As String) As Boolean
Dim lbReturn as Boolean = False
Dim pr As Process() = Process.GetProcessesByName("iexplore")
If pr.Length > 0 Then
For i As Integer = 0 To UBound(pr)
For j As Integer = 0 To UBound(Names)
If pr(i).MainWindowTitle.IndexOf(Names(j)) <> -1 Then
' You do not need to return here or even exit function as
' functions should fall through to the end and then return
' its just better programming
lbReturn = True
End If
Next j
Next i
End If
Return lbReturn
End Function
Regards
Julian Mummery
Please Visit my FREE Bug / Fault Logging Website at FaultLogger.com
|
|
|
|
|
I am new to programing, and have been challenged to create a spreadsheet viewing application that will allow someone the ability to view data from either an excel generated file or an Access database table.
This challenge was created when I was talking about learning a programming language for personal and business reasons. I ran down to the book store grabbed books on Visual C#, Visual Basic, bought Visual Studio 2008, then sat down at my home office and looked dumbfounded at everything. --- So here I am
I do not want someone to do this for me, I love challenges. However, I need some advice.
Would it be best to build this in VB or Visual C#? OR do I need jump into C++? It has been pointed out to me that Java may be the best way to go.
I am considering creating a website to track the progress of this project.
The Project Challenge
- create a stand alone application that can view data from an excel/access source
- application must have a sort capabality
- application must be able to retrieve updates from original data source
- data must be non-editable
- maintain a spreadsheet format
** additional challenge create one field that can be used as a note field, that can be saved.
----------------
I think I have finally bit off more than I can chew here, as a google search provided no help in building such an application.
So any help is greatly apprciated.
Thanks,
Forjat
|
|
|
|
|
if you have not read the books you bought and worked through the samples then I suggest you do that first. At a guess you don't even know the questions to ask yet so I would concentrate on that first.
Deciding on a platform is also some thing you need to do NOW. I would recommend C# because you will have the most resources available to support you (samples, examples, blogs and forums).
Forjat wrote: I think I have finally bit off more than I can chew here
Yup, that's a mouth full alright, the reason you do not see one of these is that it is totally redundant and of no practical use. Excellent learning though!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
This is very doable and will teach you a lot. I have done it myself - started with a VBA app in Excel, grew into a VB.NET application using OleDb to connect to the Jet engine (Excel and Access), and finally onto a VB.NET - SqlServer 2008 application.
There are some clues.
I don't speak Idiot - please talk slowly and clearly
I don't know what all the fuss is about with America getting it's first black president. Zimbabwe's had one for years and he's sh*t. - Percy Drake , Shrewsbury
|
|
|
|
|
Hello,
I have a project in VB .net 2008.
I have the following strange problem.
The application is use a Touch screen so there is no mouse or keyboard on the PC connected.
When a button is pressed there is another form that comes up.
first i disable the start form, after doeing that i show the new form on top of the main form.
On the new form there are also buttons ,.....
Sometimes i have the problem that when the Second form is there the users are touching something and the main form comes on top of the second form. The problem there is that the main form is disabled so there the user can do nothing but the form where the user need to use is behinf the main form.
I dont know how it can happens when i first disable the main from.
Like mentioned before there is no mouse or keyboard installed so switching with CTRL-TAB is not possible.
Is there anyone that can help me with this problem.
Using VB .net 2008 on a Vista pro machine.
thanks
DCA
|
|
|
|
|
Why are you disabling the ENTIRE form ??
Why don't you Hide the main form ?(which I think you are trying to do by placing the second form just over it).
Or, disable the controls on the main form instead of the whole form.
The user can move the second form or minimize it, to find the disabled main form stuck on the screen!!
|
|
|
|