|
MAke them both controls and host them on the same form.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
It the Form_Closed event of Form1 :-
Dim f as form2<br />
f.Show()
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
won't work. once the scope of the close event is done, the variable is released. you need to put the form2 in it's own message loop.
sub main
application.run(form1)
application.run(form2)
end sub
|
|
|
|
|
Hi,
I am sort of new to VB.NET. Using .NET 2.0. In C# I would have static properties in my Globals class. No I am trying to implement the same feature in VB.NET, but it is not working. Here is my declaration in Globals.vb:
Private Const COMPANY_LONG_NAME As String = "My Company"
Public Shared ReadOnly Property CompanyLongName() As String
Get
Return COMPANY_LONG_NAME
End Get
End Property
But then I try to write this name in my .aspx page, but when I try Globals. then CompanyLongName does not show in the list to select from.
Please can someone explain why.
Regards
|
|
|
|
|
Do you use the same namespace for the aspx pages? If not, have you imported the namespace? If not, then you have to use MyNameSpace.Globals to access the class.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
my idea is..
open the exe form1 will appear onto the screen.
And then when click on form1, i wanna close form1 and form2 will appear.
pls suggest to me...
|
|
|
|
|
Please only ask once.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
sub main
Application.Run(Form1)
Application.Run(Form2)
end sub
|
|
|
|
|
I am writing a client/server application software which requies that i load data from the server computer where Microsoft SQL 2000 database is installed unto a listbox on the form on the client computer using vb.net.
Please how is that possible, because i have tried several times to do so but i am unable to do it.
Bizzo
-- modified at 7:52 Wednesday 7th November, 2007
|
|
|
|
|
The easiest way is to connect over the network using SQL Server Management Studio
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Look at the SqlDataAdapter and the SqlDataReader.
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
hi all
when i check the child node of a treeview it will automatically check the parent node of that child node.
can some one tell me how can i do that
i am trying to do that but the recursive procedure (that will check all the child nodes when the parent node is checked) is making it difficult.
thanks in advance
help everyone
|
|
|
|
|
I don't know exactly what you want but here are a few ideas:
when child node is checked and parent noded needs to be checked you can use the parent property of the child node wich will give you its parent node and then you can check that one
when a parent node is checked and all child nodes need to be checked you can use the nodes (I think its called like this but not shure) property of the parent wich will give you a collection of nodes, then iterate thru them and check all of them
hope this helps
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistakes.
|
|
|
|
|
the problem is
1. when all child and parent nodes are unchecked, then , when child node is checked then i need to also check its parent node. thats exactly what i want to do.
what i have done
1. when a parent node is checked, all of its child nodes is checked.
2. when a parent node is unchecked, all of its child nodes is unchecked.
3. checks and unchecks all the parent nodes and child nodes with the help of buttons.
all these things are using some sort of recursive function and thats cause the problem. i use all that in aftercheck event of treeview
any help will be thankfull
help everyone
|
|
|
|
|
eyes2007 wrote: what i have done
1. when a parent node is checked, all of its child nodes is checked.
2. when a parent node is unchecked, all of its child nodes is unchecked.
3. checks and unchecks all the parent nodes and child nodes with the help of buttons.
all these things are using some sort of recursive function and thats cause the problem. i use all that in aftercheck event of treeview
So you were able to do those 3 things?
eyes2007 wrote: the problem is
1. when all child and parent nodes are unchecked, then , when child node is checked then i need to also check its parent node. thats exactly what i want to do.
to do this you will need to 'override' the aftercheck event of the treeview otherwise it's going to cause problems as you already noticed.
the easyst way to do this is with a boolean. when the aftercheck event is fired check if its a child node or not if so put boolean to false and check the parent after this you put the boolean back to true.
and then as first check in the aftercheck event you check this boolean if its false you do nothing else you do the code needed.
this is probably not the best way to do this but it should work and that's how I would start and see where it gets me.
if you have problems with implementing this post the code (or part of the code) in the aftercheck event that way I can have a better picture of what you are doing and what is going on.
hope this helps
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistakes.
|
|
|
|
|
hi guys
i want input in a text box in upper case,,
text box shuld show upper cases as user types in it , regardless of capslock os on or off
can u tell me how to do that ?
is there any property ?
thansl in advance
hello
|
|
|
|
|
Handle the TextChanged event and convert the text as you go using ToUpper on the string class.
|
|
|
|
|
hi thanks
but in this way the cursor goes in the start
means
textbox2.text = textbox2.text.toupper()
secondaly
i cant change my cursor property for my form , it is always
waitcursor, if i try to change it but still it remains waitcursor why is that
happening
hello
|
|
|
|
|
ghumman63 wrote: but in this way the cursor goes in the start
It has been a while since I've done this, but as I recall you need to capture the selection (even although it will be zero length) before making the change then replace the selection afterwards.
|
|
|
|
|
m sorry i could not get your mean
hello
|
|
|
|
|
Hi, you can manipulate the KeyChar property inside a TextBox.KeyPress handler;
this is an example in C#:
private void tb_KeyPress(object sender, KeyPressEventArgs e) {
e.KeyChar=e.KeyChar.ToString().ToUpper()[0];
}
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
hi guys
i want input in a text box in upper case,,
can u tell me how to do that ?
is there any property ?
thansl in advance
hello
|
|
|
|
|
ghumman63 wrote: is there any property ?
Nope. Trap the KeyPress event and change the KeyCode from lower case to upper case.
"The early bird may get the worm, but the second mouse gets the cheese" - anonymous, found in Uncle John's Bathroom Reader
|
|
|
|
|
Hi guys.
i can explain for my doubt with example.see.my table have multiple type of employee details like as Mangemment,Programmer,Designers,Accountants,Contra ctEmployees.Each type of department having many employee details.Now my drop down list having types of department names like that above types of department names..if i select any one type of department data wil be display in gridview format .gridview data column as employee Name,Address,Phone_No,email_address and each every row with checkboxes.gridview showing data according to select the dept.No problem.
first I select Mangemment type of employee grid view showing that type of employee details ,here i checked first two employee details then checkbox values put in one viewstate,then i go to Programmer type of employee it showing that type employee details here i want to checked two employee details using checkbox but what happened first two checkboxes are already checked. so view state having proper checked check box values but problem is
whenever i go to select for another type of employee details checkboxes are checked based upon order of previous checked index.
this is my problem.plz clear my problem.its very urgent.
whenever i select dropldown list viewstate values is emty . this is my problem.
--------------------------------------------------------------------------------
Thanigaimani.thirumalai
|
|
|
|
|
You should Post this question in ASP.NET forum instead of VB.NET.
AliAmjad(MCP)
First make it Run THEN make it Run Fast.
|
|
|
|