|
I very much regret that, I have no idea. I am only just starting out on the EF Highway, which is why I could still remember the stuff, in my previous post. Give it a month or two and I'll have forgotten that as well.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi,
Somehow I cannot load any WPF projects into VS 2008. The error I got is "The project type is not supported by this installation."
What is wrong with my VS 2008?
Best,
Jun
|
|
|
|
|
Which version of VS do you have?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
VS 2008 Version 9.0.30729.1 with .NET Framework 3.5 SP 1
Best,
Jun
|
|
|
|
|
Sorry, my fault. I meant version as in Standard, Express, Professional etc.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
|
OK.
Have you ever been able to load WPF projects? If so and you have recently installed any add-ons, I would try uninstalling them one by one and trying again between uninstalls.
Failing that, if your VS2008 has all the latest updates/service packs I can only suggest a Repair Install, I had a similar problem with an Express version a while ago, and that fixed it. Insert the install DVD and it should offer the Repair facility. If the option appears for a Custom Install, take that and make sure everything is checked.
That is all that I can offer.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Yes. This machine has been reinstalled by an IT person recently. The installation is not clean (half restore and half install).
I'll unstall/install VS 2008 first and see. Hopefully I don't have to redo the entire machine.
Thanks for the help.
Best,
Jun
|
|
|
|
|
Henry,
I have uninstalled all Visual Studio (6.0, 2003/2005/2008) and reinstalled VS 2008 Professional Edition only. The issue remains. After comparison, I do notice some strange things with this Edition:
1) I cannot create a new C# WPF project. The error is the same (project type not supported).
2) The New Project dialog shows the following different WPF types:
"csWPFApplication" (should be "WPF Application")
"csWPFBrowserApplication" (should be "WPF Browser Application"
"csWPFControlLibrary" (should be "WPF Control Library")
"csWPFCustomControl" (should be "WPF Custom Control")
3) All non-WPF types are fine.
By the way, this VS 2008 Edition was from a MSDN subscription.
------------------------
FYI, after I installed VS 2008 SP1 this Edition works like a charm. No WPF project type issue any more. Thanks!
Best,
Jun
|
|
|
|
|
This is very strange. I am at a loss.
Can I suggest that you ask this (exactly as here) in the Microsoft forums here[^].
If you do find a solution, please let us know as it could be useful to others.
I am sorry not to be able to help more. Good Luck.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi, have a good day ,
I was wondering , how do you write Database Application With C# ?
I mean what is the your way , what tools do you use and what is your rules ?
--- For me :
1 - All My SqlConnection , DataTable Are in Runtime ( no desing at all )
2 - I write INSERT and update and delete Sql Query Manually , like functions ( even if I have 50 values in INSERT command I wrote them
as paramters
public static void DeletePerson ( string guid )
{
SqlCommand SqlCmd.CommandText ="DELETE FROM persons WHERE guid = @guid";
SqlCmd.Parameters.AddWithValue ("@guid" , guid);
SqlCmd.ExecuteNonQuery();
SqlCmd.Parameters.Clear();
}
3 - I always use paramters .
4 - I always use Transaction ( even for the short one )
5 - I never ever Use Binding Source ( I build one manually )
Like
TxtPerson.Text = clsDataTable.Rows[CurrentRecored]["Name"].ToString();
Insted of
TxtPerson.DataBindings.Add("Text" , bindingsource , "name" );
6 - I never use Identity in my database , I generte the last number
manually
SELECT MAX(PersonID) FROM persons
7 - All my tables recored dependes on GUID ( No Guid = No table at all )
8 - I use SQL Query Analyzer ... I hate VS Server Explorer ...
9 - For Complex Search Query
I used some routin's like :
public string[] SearchUserNames = { "Name" , "Age" };
public string[] SearchDBNames = { "pName" , "pAge"};
stQuery = "SELECT * FROM persons";
int isAnd = 0;
if (CheckName.Checked)
{
stQuery += " WHERE " + SearchDBNames[combobox.SelectedIndex].ToString();
isAnd++;
}
if (CheckAge.Checked)
{
if (isAnd != 0)
{
stQuery += " AND ";
}
else
{
stQuery += " WHERE ";
}
stQuery += SearchDBNames[combobox.SelectedIndex].ToString();
isAnd++;
}
I want to hear from you ... what is yours ?
I am doing right ?
Thank you , for time and for your advice ...
I know nothing , I know nothing ...
|
|
|
|
|
I do a lot of what you have said.
Isn't Max(PersonId) going to be very inefficient?
I have never had the need to do number 9. It looks too complicated IMHO, although I can see why you do it.
I always use using when I'm using databases though. eg.
using (SqlCommand command = new SqlCommand(sql, connection))
{
}
|
|
|
|
|
Have a look at the DatabaseAccessor[^] article.
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
Hi! I would like know how can I upload and delete video files saved in server using an aplication from client with webservices.
I was reading that I can use the class HttpFileCollection, class Uploader: IHttpHandler with the method ProcessRequest( HttpContext context ) or ftp.
What do you think? Any suggestion?
Thanks a lot.
|
|
|
|
|
You can write any method you like in a webservice to send or deliver a stream of bytes. you may need to chunk large files tho.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
I would like to try attachments to be sent to WebServices.
You can find the details here[^] or google.
|
|
|
|
|
Thanks for the suggestions.
I used ftp. And no problem.
|
|
|
|
|
How to add scroll Horigental scroll bar in the call of DataGridView
Now each X seconds, the datagrid is updated with data from the database. So the datagridview is refreshed.
I also want to maintains the position of scroll bar even after datagridview is refreshed.
When a user is working on row X, and column Y, and the datagrid is refreshed all the scrollbars get back at position 0. So the horizontal scrollbar is put back to the left side of the screen, and the vertical scrollbar is put back on the top of the screen.
Raghvendra
|
|
|
|
|
int _xScrollPosition = dataGridView1.HorizontalScrollingOffset;
dataGridView1.HorizontalScrollingOffset = _xScrollPosition;
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hello,
I'having problems getting the "Taborder" right on a ToolBar which has a UserControl hosted in a ToolStripControlhost object.
To replicate:
1. Create a new WindowsForms project.
2 Add a toolBar with four ToolBarButtons to Form1 (via the designer)
3. Create a new UserControl and drop a MaskedTextBox on it (via the designer)
5. In the form Constructor add the following code;
toolStrip1.Items.Insert(2, new ToolStripControlHost(new UserControl1()));
During runtime if you click on the maskedTextBox in the toolStrip (to give it focus), and try to navigate with the tab key (either shifttab or tab) you'll notice a weird taborder.
If the MaskedTextbox is hosted directly in the ToolStripHostControl everything works fine. But my real usercontrol is way too comlicated to do this.
The problem seems to be caused by inserting a usercontrol in a toolstrip which messes up the taborder.
Does anyone know how to fix this? Any help would be sincerely appreciated.
|
|
|
|
|
The only thing I can think of is after adding UserControl1 go through first the toolstrip then usercontrol1 controls collection and manually set the tab order to what you want.
Other than that I've no idea. Perhaps someone else can help.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Thanks for your reply Henry.
I was thinking in the same direction...
But the only collection I could find to go through, are toolStrip1.Items[] and these do not have a TabIndex to reorder.
|
|
|
|
|
netogg wrote: these do not have a TabIndex to reorder.
That's a shame!
I hope someone else can help you.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
It seems the answer is to extend the ToolStripControlHost class as suggested here[^].
I've just tried it with your 'steps to reproduce' above and it worked fine. Code I used below.
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public class ToolStripUserControl1 : ToolStripControlHost
{
public ToolStripUserControl1() : base(new UserControl1()) { }
public UserControl1 UserControl1Control
{
get
{
return Control as UserControl1;
}
}
}
}
toolStrip1.Items.Add(new ToolStripUserControl1());
Hmm... It was adding it at the end so it appeared to work. Using Insert instead of Add to place it inbetween the buttons produces the same result as before
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Hi Dave,
Thank you for your solution, I already came across the link your posted and tried several times.
I might be doing something terribly wrong...
When I try to "tab" trough the buttons its still messed up. When the focus is inside the UserControl then "tab" goes to the first button instead of to the next. And "shifttab" goes to the last button instead of the previous.
Would you mind posting your full solution please?
Thanks in advance.
@Dave at your comments suggesting insert: been there, tried that... sigh
modified on Friday, July 3, 2009 12:11 PM
|
|
|
|