|
Thanks Virtual1ty
|
|
|
|
|
You're welcome
Virtual1ty
"Any fool can learn from his own mistakes, but a wise man learns from mistakes of others"
|
|
|
|
|
What about
this.TopMost = checkBox1.Checked
?
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Oh yeah, I didn't think about that
Virtual1ty "Any fool can learn from his own mistakes, but a wise man learns from mistakes of others"
|
|
|
|
|
C# Beginner Nick wrote: to change my web browsers page.
Do you mean the browser that's installed on your pc, or is it a webbrowser component on your form?
Virtual1ty
"Any fool can learn from his own mistakes, but a wise man learns from mistakes of others"
|
|
|
|
|
Component on my Form,
And the buttons are in the Menu Strip.
|
|
|
|
|
Then you can use the WebBrowser component's Navigate() method in the button's event handler. For example:
WebBrowser1.Navigate("http://www.codeproject.com");
Virtual1ty
"Any fool can learn from his own mistakes, but a wise man learns from mistakes of others"
|
|
|
|
|
Ohh ok i understand. Thanks again Virtual1ty
|
|
|
|
|
Glad to help you
Virtual1ty "Any fool can learn from his own mistakes, but a wise man learns from mistakes of others"
|
|
|
|
|
Thanks again, even though I already thanked you twice.
Thought I'd say thanks again because I just now finished the program I was creating becuase of you're help
It allows me to view every episode of Yu Yu Hakusho
I made it for my sister becuase she loves the show and i wanted to try something new.
|
|
|
|
|
I am after writing a C# program which gives details of the NTFS file system. It also offers the chance to do basic undelete. However I have discovered that when you start a .NET 2 program a file with a long alphanumeric name is created and deleted in the system32/temp directory. Is it possible to prevent this as it poses a threat to successful undeleting.
Thanks in Advance
Liam
|
|
|
|
|
Don't parse the temp folders. Even in linux applications make heavy use of temp folders files.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
how to connect MS acess with C#.NET
|
|
|
|
|
s4_sabahatf wrote: how to connect MS acess with C#.NET
The real question is are you capable of looking at the list of C# Database Articles here on CodeProject that surely contain the answers you seek?
|
|
|
|
|
Have a look at this website: http://www.connectionstrings.com/
|
|
|
|
|
Use a connection string. Like Giorgi said, go to http://www.connectionstrings.com[^], better yet, bookmark the site
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
I think I read (or dreamed and hoped) that there was an attribute you could use on a class to disable the designer support. Specifically, write a class that inherits a control or datarow or anything with a designer and double clicking on the class file then defaults to design mode. Sometimes I never want the designer.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
Hi,
I usually add the line
[System.ComponentModel.DesignerCategory("Code")]
right above the class statement for this.
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
|
|
|
|
|
That is exactly what I was trying to remember. Thanks.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
Huh, and all this time I've been using "right-click|view code".
|
|
|
|
|
So why didn't you ask?
I have one question for you (or anyone who digs deeper on this):
having partial classes in two or more files, how can one have one file that opens
by default in Designer whereas the other(s) open in code view?
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
|
|
|
|
|
Now my brain hurts...
|
|
|
|
|
Come to think of it... maybe it's been fixed in VS 2005... but as I recall, in VS 2002/2003, the Designer wanted to design the first class in the file, so if you added some helper class you had to add it after your form, or the Designer would sit there looking stupid.
Maybe in the additional files you could add some class simply to have that attribute?
Dang... now I gotta try it...
-- modified at 22:58 Friday 12th October, 2007
Nope, didn't work. But I notice that the xxx.Designer.cs works the way you describe, so I'll look at how those are set up in the project file...
-- modified at 23:07 Friday 12th October, 2007
That turned out to be more difficult than I expected.
Step 1: Add a new Code File, the name should begin with the name of the form (like the xxx.Designer.cs file).
Step 2: Close the Solution
Step 3: Edit the project file, change
<Compile Include="Form1.CodeFile1.cs" />
to
<Compile Include="Form1.CodeFile1.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
(using whatever names you chose)
Step 4: Open the Solution
Step 5: Close the Solution
Step 6: Edit the Code File to have the namespace and class stuff
Step 7: Open the Solution
VS should have the ability to add other pieces of a Form class built in.
I also noticed that when a file is DependentUpon, it can be deleted, but not removed or renamed.
-- modified at 23:46 Friday 12th October, 2007
|
|
|
|
|
PIEBALDconsult wrote: the Designer wanted to design the first class in the file
Yeah I think that restriction got relaxed, it does not get at me anymore, maybe they
solved it, maybe I don't even try it anymore.
PIEBALDconsult wrote: Maybe in the additional files you could add some class simply to have that attribute?
in my limited experiments it either ignores the additions, or it complains about
inconsistency. So any input will be appreciated.
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
|
|
|
|
|
I tried it, VS just gives a better message explaining the situation.
|
|
|
|