|
See....frmMain is the main form and appears when program starts.
Now when user search a file, form2 appears and actual code is written in form2 for searching files. But after searching files from form2 I want to display result on the listview of frmMain.
|
|
|
|
|
But this code is inside form2. frmMain is a variable inside form2. So, how is that variable's value set ? Where is it defined ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
frmMain is not a variable. It is main form.
|
|
|
|
|
So the listview is a shared variable ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Yes. Listview is a shared control drawn on frmMain.
|
|
|
|
|
Wow - that's a bit of VB nastiness I didn't know about. So, what happens if you have more than one instance of the frmMain class ?
Anyhow, VB sucks. You want to create a delegate so you can call it in your second form, and it calls a method in the first form, passing through the data.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
There is only a single instance of frmMain class.
Yes I want to use a delegate to show searched files on the listview of frmMain.
|
|
|
|
|
Gagan.20 wrote: There is only a single instance of frmMain class.
Yes, but I just did a test and found that while in C#, I'd tell anyone who made their form controls static that that is a TERRIBLE design, it seems in VB it does that for you. And, given that VB is doing it, what happens if I have more than one instance of a form ? It's insane. VB sucks.
OK, well, have you read up on delegates ? I'll be honest, I know a delegate is what you need, and I'd expect any basic tutorial on delegates in VB to give you the code you need, but I use C# ( did you notice I hate VB ? ) and so I can't tell you off hand what the syntax is.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hello to All,
My Print is of 9000 Pages so i want to view its Print Preview. But at the time of previewing its shows only first 1000 Pages.
So Please how to view All Pages Preview.
Thanks
If you can think then I Can.
|
|
|
|
|
Is someone seriously going to read through 9000 pages of a print preview ? Either this is a limitation of the control, OR it's a problem with your code.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
thank u sir
If you can think then I Can.
|
|
|
|
|
I think you may be the only person I've ever heard of that wants to preview 9,000 pages.
Seriously, I don't see why it would be a limitation in the control, but, it's entirely possible. Other than that, without any kind of error message or how you're handling printing, noone can tell you anything useful.
|
|
|
|
|
Maybe its a better idea to produce one big pdf file (or a lot of smaller ones ...)
|
|
|
|
|
a visual program that run an aplication and when application exit then vb program gives a message and it exits too
any help here ????????
|
|
|
|
|
master2323 wrote: any help here ????????
Lots, but you need to give a better explanation of what is not working, what messages you are seeing etc.
|
|
|
|
|
i can run mspaint using a a vb program ..but i wanna display a message to the vb program when i exit the mspaint
|
|
|
|
|
Ah. you can get a handle to the program in question when you call Process.Start and you can make your program wait until the other program finishes, or you can check it to see if it's still running.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi,
Read about the System.Diagnostics.Process class on MSDN and pay special attention to the example associated with the Exited event. It summarises the basic code that you will need to implement to detect when a process terminates.
Alan.
|
|
|
|
|
I want to combine parameters and fixed values in queries as this strQuery = "insert into books (zaglavie, avtor_id, book_id, book_udk, janr_id) values(?,autor,?,book,?)" where autor and book is global variable
|
|
|
|
|
It doesn't matter where the variables come from, you can still pass them into a paramaterised query. Or do string mashing if you don't care about security.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi,
I have a datagridview1 column "Name", which has collections of names and some are repetitive; e.g.
"Name"
-------
ram
shyam
ram
ram
raj
shuk
shuk
So, in the above "Name" column, there are repeatation of names. I want to do this:
1) read the repetitive name as a single, e.g. "ram", "shuk"
2) store them in a array of string;
3) finally the array should be like this : arr(1) = "ram", arr(2) = "shyam", arr(3)="raj",arr(4)="shuk" .
So in arrays I have finally stored the repetitive names as once.
Now I want to copy these array entries into rows of another datagridview2 whose column name is "Final Name".
Can someone help me by providing a piece of code?
Thanks
R.S.
|
|
|
|
|
Please let me know the data source. Do you execute any transact sql statement?
Thanks
Md. Marufuzzaman
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
No I have not executed any transact sql statement.
My code is like this :
cmd = New SqlCommand("Select * FROM student_details", con)
If con.State = ConnectionState.Closed Then con.Open()
myDA = New SqlDataAdapter(cmd)
Dim myDataFillSet As New DataSet()
myDA.Fill(myDataFillSet, "student_details")
|
|
|
|
|
jeshra279 wrote:
No I have not executed any transact sql statement.
My code is like this :
cmd = New SqlCommand("Select * FROM student_details", con)
If con.State = ConnectionState.Closed Then con.Open()
I think you are using... whatever .. update the SQL statement by using SQL JOIN.
Thanks
Md. Marufuzzaman
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
Please help me with a piece of code. I cant make it out without help.
Thanks
|
|
|
|