I am a new programmer . Currently I am studying C# But I confused in choosing WPF and windows form for studying .
I like to develop windows application .
please help to choose one of them .
You will need to know both. WinForms are the old method of doing things and still very widely used. WPF is the new method. It is catching on but there will always be WinForm work to do.
can anyone help me figure out how to take the user input, save it to a variable (if necessary) and run it against the database?
If you’re planning to let the user enter the entire SQL query and then run it, this sort of thing can be VERY risky…a malicious (or simply inept) user could easily delete all data from your tables and so forth.
I m more familiar with Window form as everyone started VB with it, but in term of thread implementation, does it matter? please explain.
You can use threads in either so it doesn’t matter.
The button code:
private void button2_Click(object sender, RoutedEventArgs e)
{
Form1.Show();
}
The path to my form in the solution:
DatabaseForms.Forms.Form1
Why to I keep getting an object reference is required error?
Did you try putting:
Form1 form1 = new Form1();
form1.ShowDialog();
I worked in ASP.Net 2.0 and I want update latest version. So I want learn new technology like WCF, WWF, LINQ, WPF. Please suggest me which one best (demand in IT market) for me among WCF, WWF, LINQ, WPF. I want concentrate any one only.
I recommend you to check the motor of search of Yahoo
Is there any framework or good practices for developing the WPF application?
lol
Google isnt really helping, all I get are advantages of each. what are the core differences between the two?
I’ll take a stab at it:
In a Forms app, you put a set of controls on the form. For each control you add, there is some code generated for you (if you look in form.designer.cs, you’ll see all the generated code.) Each control is an object with a set of properties. It’s a reasonably simple, straight forward approach. As long as you want a more or less conventional looking WinForm.
WPF is a bit different. Instead of generating code for each control on the form, you generate (or write) XAML. XAML is just XML. It’s more along the lines of writing HTML than writing object oriented code.
The XAML XML is interpreted at run time to render the Form. The XAML rendering engine is certainly more sophisticated than using WinForm controls. XML tends to be more flexible than hard coded objects. If you want a round button in WPF, I think that’s reasonably easy to do. Much harder in Forms.
So, after all that: WPF is harder to write (or at least harder to learn), but is more flexible and powerful.
If all you need is a simple form, WinForms is fine. If you need to really customize the look and be creative, WPF is a better choice.
I glossed over a lot of details, and to be honest, I’ve only had limited expose to WPF. WinForms work for what I need to do.
Im very new to VB.. I just created a small 2 window wpf app. The first window has a start button. I was wandering how do I change from the main window (start button window) to the next window? it might sound like a noob question. but i really need help.
Thanks
~Ryan
Well you have a couple of methods.
1. Form2.Visible = True
2.
Dim myForm as New Form2
myForm.Visible = True
I want to study developing desktop applications. What should I study between WPF or Silverlight? Which do you prefer?
WPF since Silverlight is a subset of it and really designed for web development.
I made a WPF program, and I gave it to a friend that runs Windows XP but the program doesn’t really open. the area which the form is suppose to be at is just stuck!
Is it possible because I have a dragging function? (I read something with it and Windows XP but im not sure)
I’m not sure what more to say, please help.
Should run, Microsoft put a lot of effort into making WPF run on XP instead of Vista only (Win7 wasn’t out yet). See link.
Does your friend have the right version of .NET installed? Same version you compiled against? Needs to be at least 3.0 for WPF, right?
Do you have any hard code paths to operating system files or folders in your code? Things like Program Files or users or the desktop? Those things change between Windows versions.
If you have Win7, and you can install XP Mode, you could try running your program there. If it doesn’t work their either, the problem is likely with your code.