|
I am populating a windows form from btn but i want to hide the form the button is on, and when i close the existing form i bring back original form. hope this makes sense
Regards
big al
|
|
|
|
|
The easiest way to do this, is to write both forms as controls, put both controls on your one form, and change which control is visible. The other way, is just to set the initial form's Visible property to false when you open the form, and true when it's closed again.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
You could also consider setting the opacity of the form to 0% if hiding and re-showing the form causes problems wih Form_Activate if you are using it.
David Loring
!! Keep Music Live !!
|
|
|
|
|
so the form that needs to show when you close the other form place it like master form like startup form and then type this in load event in that form:
dim f as new form2()
me.hide()
f.showdialog()
me.show()
thats all...
but if you want to show form only if button is clicked then place on other form form2 one checkbox name it "chx" and type like this...
FORM 2
--------------------
public sub button1.click .... ' example button close form
chx.checked=true
me.close
end sub
public sub button2.click .... ' example button end program
chx.checked=false
me.close
end sub
-----------------------
FORM 1 STarting form
-----------------------
dim f as new form2()
me.hide()
f.showdialog()
if f.chx.checked=true then
me.show
else
end
end if
like that enyoj and hope it helps....
|
|
|
|
|
|
please describe wt u want
Lxcite's Planet
... the ultimate solution
|
|
|
|
|
Hari Om Prakash Sharma wrote: please describe wt u want
he described it up there ^ Hide Form & hiding form
|
|
|
|
|
Hi, Working with VB Net (2003) . How to highlight the Data Grid line when they are selected with a click from buttons First, Next, Previous, Last and is it possible also when I click in a cell from the same Data Grid to highlight the row. Thank you
|
|
|
|
|
Are you talking about a Windows Forms DataGrid or the Web Forms DataGrid?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Sorry my mistake .It is a Windows Forms DataGrid
|
|
|
|
|
Hello,
I would like to know if its possible to close internet ports( port 80) in vb.net
Thanks
Al968
Avast Antivirus-<url>http://www.avast.com<url>
|
|
|
|
|
If you mean like a firewall does, then no. It takes driver level code to do this. Something that VB.NET, or managed code in general, is not suited for.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
OK Thanks
Could you specify which language you are refering to ?
Thank You
Al968
Avast Antivirus-<url>http://www.avast.com<url>
|
|
|
|
|
VB.NET, C#, ... About the only language that doesn't target the .NET Framework natively (Managed Code) is Visual C++.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
ok thanks
Al968
Avast Antivirus-<url>http://www.avast.com<url>
|
|
|
|
|
Does anyone know if there is a VB.NET version of the Threed Controls, or how you can create a label / panel with embossed or inset text?
David Loring
!! Keep Music Live !!
|
|
|
|
|
Hello guys
an error occured while i was choosing a picture within a picture box
the error is :
item with same key has already been adding
I cant add an image to my project,not even background image for a form
I always get the above error
but if i try to add a pic by code..it works fine
Note : if i open an other Project and try to add a picture,everything goes fine
Even if i copy this solution to another PC ,same problem persists
Regards
Ramy
Regards
Ramy
|
|
|
|
|
I am using "Viusal Basic Express 2005"
I was wondering how I can display the webcam picture (source) in a form
I am lost and out of control
I don't know where top begin I've search google many many times
I even tried including words that don't exist
help mee
thankyou
|
|
|
|
|
|
The question I am asking doesn't specificly aplly to a browser. The question is :
How can I set my program to run code when at any point the user presses the enter key ??
Thanks
Al968
Avast Antivirus-<url>http://www.avast.com<url>
|
|
|
|
|
Use the forms KeyPress event
also set the forms keypreview property to true
Private Sub Form1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs)
If Char.IsControl(e.KeyChar) Then
If e.KeyChar.Equals(Chr(Keys.Return)) Then
'Your Code Here
End If
End If
End Sub
-- modified at 22:12 Saturday 10th February, 2007
|
|
|
|
|
Thanks for the quick responce.
Al968
Avast Antivirus-<url>http://www.avast.com<url>
|
|
|
|
|
HOW to I close another dialog box from another application? Sendkeys doesn't send the tab key with a modal dialog box (Yes, No, Cancel buttons displayed)... How do I do this?
Do I have to use API calls? How? I am GREEN... I've seen some samples out there, but perhaps I didn't put the code in the right place?
CONFUSED...
(
Waushaka
|
|
|
|
|
You could send WM_CLOSE, I suppose. That may work. I thnk that's what the shutdown process does.
What are you trying to do ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Thanks for your prompt response. In vb net, I am trying to make another Windows application close (or respond) it's modal dialog boxes. It's a software program called "CareFacts", at my place of employment. I am an amateur programmer in vb net, but I've been able to accomplish several things, like games, sound, multiple forms, etc. Several of the modal dialogs come up, and I am trying to send code to respond to them, close them, etc.
I've been able to interact with the program, using API calls. I believe the "handle" changes when the modals come up; I'm not sure how to change the handle.
If you want to see my code, let me know, and I will send it to you..
much obliged for your attention-this program really sucks because it requires the end date for each of our clients to be updated manually... 535 plus (adds up to about 14,000 keystrokes or more), thus my trying to make this vb net program work.
thanks again...
Waushaka
|
|
|
|