|
Thanks Luc, but I want the parameters to be variables as other controls are changing the name, size and type.
MyLabel1.Font = (Font)fc.ConvertFrom(mystring);
This will change the name but I can't get the size to work.
I will look up the other class.
boyd
|
|
|
|
|
when I wrote new Font("Arial", 12) as an example, I assumed you understand
one can also provide variables rather than literal font names and font sizes...
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
|
|
|
|
|
Yes,
string mystring = "Tahoma";
string oldstring;
oldstring = label1.Font.Name.ToString();
float mysize =16;
label1.Font = new Font(mystring,mysize);
This works, I had been using int and not float.
I got the installed fonts working also.
Thanks again,
Boyd
|
|
|
|
|
I m using vb.net 2005. I dont want to hard code my connectionstring I want o be able to pass the Database name and teh server name to my connectionstring
any vb.net code will be appreciated.
How do i serach a domain or a network for the servers
t.aransiola
|
|
|
|
|
Normally you would do this in the connection strings section in your config file. That's why its there.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
hi!
i have 2 forms on my application and 1 called form1 and the another form2 and i want to close form1 by click Button on form2.
how can i do it?
thanks!:->
|
|
|
|
|
In VS 2005, Assuming that you have opened form2 like this:
Dim form2 As New Form2<br />
form2.Show()
Then you can close form 1 like this from form 2:
Form1.Close()
The only problem is that if you do that, Form 2 will close as well (since form 1 created the form 2 instance). So you would have to have another form or Main routine to control all the form open and closes.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
hi guys am new in this Subject, how do i make my forms to look like Vista?
pleaes point an Article or Tutorial in vb.net
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Vuyiswamb wrote: how do i make my forms to look like Vista?
Run your application on Vista. That'll do it.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Pete O`Hanlon wrote: Run your application on Vista. That'll do it.
Should one assume they developed Vista based on the characteristics of his machine
and the requirements of his app?
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
|
|
|
|
|
Only can be done by running Vista. If you want to have Vista-like forms in XP/2000, it cannot really be done.
"I really like comments where I don't have to answer stupid questions" - stfx
|
|
|
|
|
Thanks man for your Reply, i understand
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
I am sure there are probably some tricks out there to simulate it though.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi,
Upon clicking a treeview node, the following events fire (correct me if I am mistaken) - Click and AfterSelect.
In the Click event I want to perform a test and optionally prevent the node that was clicked upon from being selected. I think I have to prevent the execution flow from reaching AfterSelect? Is there a way of "cancelling" the click event or otherwise achieving this?
I do have a work around - a form level boolean variable that I set True if I want to cancel - in AfterSelect if this is set True then it exits the AfterSelect event handler function. But this seems at best a kludge.
Many thanks in advance!
- Anthony
|
|
|
|
|
AnthonyEllis wrote: But this seems at best a kludge.
Sometimes that just happens to be the only case.
"I really like comments where I don't have to answer stupid questions" - stfx
|
|
|
|
|
Hay Lo Guys,
Any ideas how can we update our database(sql) by editing the values (adding rows or editing existing data) from DataGridView in the Win form?
Thanks
Basit
|
|
|
|
|
Use the BindinNavigator component
|
|
|
|
|
Well, binding navigators requries a datasource and a datamember to work in case of the dataset. I am using the business object.
Is there a reason why binding navigator does not recognise the business objects?
|
|
|
|
|
I am developing a new Windows database application in VB 2005. To date I have been using the .NET version of Crystal Reports to provide reports for my applications. Rather than attaching these reports to the database directly I pass in a custom DataSet at runtime to give me more flexibility.
This has worked fine to deliver my reporting requirements but I have come across many issues mainly to do with the memory overhead and bugs in the crystal designer and viewer control.
As I am about to start a new application I have the option of using the Microsoft ReportViewer in local processing mode instead. From my initial reading to achieve the same thing as what I have done with crystal I would create a custom class to pass the data through at runtime.
I just wanted some advice as to whether I would get any benefits of using the Microsoft reporting control over the crystal one. Does it manage memory better, or at least allow me to recover memory, and does it have all the features of crystal?
Alternatively are there any better third party reporting tools for .NET that are better? After a quick search on google I found Report Sharp-Shooter by Perpetuum Software and Stimulsoft Reports.NET. Does anyone have any experience with any thrird party software and if so are there any significant benefits over those shipped with Studio?
Any advice from experience would be greatly appreciated.
Cheers
Jason
|
|
|
|
|
Have you found any others that might be good? I am in the same boat...
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I have a DataSet called ‘exportDefsDataSet’, with two tables, ‘ExportDef’ and ‘ExportDefItem’. The data set contains a relation, ‘ExportDef_ExportDefItem’ that relates the two on ExportDefID. This represents a set of export definitions, and definition items within the export definition, i.e. one export definition has many items.
I have a form with two binding sources on it, ‘exportDefBindingSource’ and ‘exportDefItemBindingSource’. The DataSource of the ‘parent’ binding source is set to ‘exportDefsDataSet’ and the DataMember to ‘ExportDef’. The DataSource of the ‘child’ binding source is set to ‘exportDefBindingSource’, and the DataMember to the relation ‘ExportDef_ExportDefItem’.
I have a ComboBox bound to ‘exportDefBindingSource’ and a BindingNavigator and two textboxes bound to ‘exportDefItemBindingSource’. When I select an export definition in the combobox, I can navigate between the definition items for that definition, but chaos ensues, as often the selected definition disappears from the combo box, or the items for another definition appear in the textboxes. I am battling to reliably preproduce this behaviour, as often the setup works correctly, and after after a seemingly random number of navigations does everything go bad.
Let me describe a typical scenario:
I start the application, and the first definition, “Access Accounting” is automatically selected, and the BindingNavigator correctly navigates between the items for “Access Accounting”. The next definition is “AccpPac DOS”, and if I select it, the correct items for “AccPac DOS” are available, BUT, “Access Accounting” is no longer visible in the ComboBox! Now there are two “AccPac DOS” entries, and the first one of them selects the items for “Access Accounting”. Now I select a third option, “AMS”, and get the AMS items, but now I have two AMS entries, and the first one still points to the “Access Accounting” items. The ComboBox is thouroughly out of sync, but I can’t find why.
I do not believe they are right who say that the defects of famous men should be ignored. I think it is better that we should know them. Then, though we are conscious of having faults as glaring as theirs, we can believe that that is no hindrance to our achieving also something of their virtues. - W. Somerset Maugham
My New Blog
|
|
|
|
|
Hey, i am trying to make a windows32 API application which clicks a button in
a TAdvListView class.
the problem is that TAdvListView seems to be borland API...
everything within the list got the same handle, ex:text,buttons, etc...
any clue how to access that button and send a click to it?
thanks
|
|
|
|
|
Hi Guys,
I have some problem setting up Icon to Form in Visual Basic.It throwing Invalid Picture as Error Message.
File name is 123.ico dimension 16 X 16
Pleae clarify it
Regards
Subash
Subash
|
|
|
|
|
Have you tried with other icons? 123.ico may be damaged in some way.
Virtual1ty "Any fool can learn from his own mistakes, but a wise man learns from mistakes of others"
|
|
|
|
|
searching for a way to 1. build a word finder(C# .net 2002), and 2. incorporate it into a windows application to navigate quickly to a word or phrase within a list box which contains a large collection.
gil
|
|
|
|