|
|
I'm using AppDomain.CreateInstance()
Then I'm unwrapping the ObjectHandle, and calling Form.Show().
Pretty much every example I've been able to find hasn't dealt with creating UI objects in another AppDomain. I'm pretty sure this would work fine, if it was just a plain old object.
BW
(Looking at that link now...)
|
|
|
|
|
I might be able to use ExecuteAssembly, but it's going to take a bit more work than I want. I'll try it out.
BW
|
|
|
|
|
Does anyone have any tips or tricks to speeding up the page load on a SQL database website.
Thanks
|
|
|
|
|
Learning wrote: Does anyone have any tips or tricks to speeding up the page load on a SQL database website.
No. No one knows how to do that. And if anyone did it certainly would NOT be Microsoft and they certainly would NOT document it and you certainly could NOT find it by searching with Google.[^]
Good luck, you're going to need it.
led mike
|
|
|
|
|
It's good to see that your mockery battery is fully charged.
|
|
|
|
|
mock mock, who's there? Me, i keel you!
led mike
|
|
|
|
|
If that heading caught your attention...
Good - I was trying...
If you know of any solutions to having such a big setup or
distribution file for my c# app could you please help me?
Perhaps some way of building a setup that only embeds the needed
libraries for my app... I dont want any online installers... just the
smallest possible deployment of my application.
Thanx in advance guys!
Dax
|
|
|
|
|
You're best option is to include a link to the .NET Framework runtime installation. Your app's setup size would already be as small as possible as a seperate install.
Your only other option would be to use one of the tools that compiles the required .NET assmeblies into your .EXE, but be prepared to shell out BIG money for these tools. There are no free ones that do this...
|
|
|
|
|
Take a look at NSIS. Provides a very small self-contained executable for installing stuff.
|
|
|
|
|
I thought he was complaining about the "weight" of the .NET Framework runtime install...
|
|
|
|
|
Oh well, perhaps one or both of us mis-interpreted the question...
|
|
|
|
|
Or we didn't miss it and the OP did??
|
|
|
|
|
Yeah, of course, we're valuable members to CodeProject so we're right by definition
|
|
|
|
|
Given the code below, the first line is drawn 1 pixel longer than the second line (any line where width > 1 is drawn 1 pixel short). Any idea what might be causing this or is this normal behavior?
Pen p = new Pen(Color.Black, 1);
e.Graphics.DrawLine(p, 10, 10, 10, 100);
p = new Pen(Color.Black, 2);
e.Graphics.DrawLine(p, 14, 10, 14, 100);
p.s. The same thing happens when drawing horizontal lines.
Kees
|
|
|
|
|
that is the normal behavior: the pen moves the way you ask it to move; when its size
exceeds one, it will hit some pixels before and after the intended trajectory since
a pen by default has a circular shape. I guess you can modify both the pen characteristics
and the way lines are drawn though, if you really need to.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Thanks Luc,
Setting EndCap and StartCap to LineCap.Square solved it.
Kees
|
|
|
|
|
Reflection is cool, but geez it can be hard to get it to do some things. I want to enumerate all form controls on a user control that inherits from another user control which also has controls on it. Here's some sample code.
UserC in this sample is the user control which inherits from another user control.
Dim BindingFlags As Integer = Reflection.BindingFlags.Instance _
Or Reflection.BindingFlags.Public Or _
Reflection.BindingFlags.NonPublic
For Each fi As System.Reflection.FieldInfo In UserC.GetType.GetFields(BindingFlags)
Dim obj As Object = fi.GetValue(UserC)
If obj IsNot Nothing Then
Try
obj.Name()
Catch ex As Exception
End Try
End If
Next
This will list all the form controls on the UserC class designer but not the class it inherits from. You can see them all when debugging. What gives?
|
|
|
|
|
Hi, can't you just iterate through the userControl.Controls collection to get what you want? using your example you'll get all the fields in control UserC, not just the ones created by the designer. Or, you could try adding FlattenHierarchy to your binding flags (inherited fields must be protected, not private). Or you could write a recursive loop that examines the .BaseType fields of UserC.GetType()
HTH, Rob
"An eye for an eye only ends up making the whole world blind"
|
|
|
|
|
I was staying away from userControl.Controls so I would not have to recursively loop through container controls (a group box will appear in the .Controls but you have to walk through it's controls to get all the textboxes and such). I did try FlattenHierarchy and it didn't make any difference. What I didn't try was looking a the fields of .BaseType.
Thanks for the reply,
Tom
|
|
|
|
|
Hi!
I need a multicolumn treeview with the ability to put checkboxes in the columns. Do anybody know some article or an open source project?
I found TreeViewAdv on codeproject, which is able to do multiple columns but unfortunately no checkboxes.
P.S. I am programing in C#
thx
|
|
|
|
|
Souds like you need to add checkboxes to te project you found on CP.
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
I seem to have found a bug in ListView.Items.Insert(int,ListViewItem).
Could someone please try reproduce this? Maybe I could get a bug report submitted.
(Problem seems to occur on 2.0 and 3.5)
Steps to Reproduce:
1. Start a new project
2. Add a ListView with five items in it.
3. Label them 1 to 5 so we can see what happens.
4. Add a Button.
5. Add the following code to Button.Click:
ListViewItem item4 = this.listView1.Items[3];<br />
item4.Remove();<br />
this.listView1.Items.Insert(0, item4);
The items should be arranged like this:
4 - 1 - 2 - 3 - 5
Instead we see this:
1 - 2 - 3 - 5 - 4
Workaround:
I have found if we switch to View.Details before doing the remove/insert then everything works fine.
Replace the code in Button.Click with this:
ListViewItem item4 = this.listView1.Items[3];<br />
View oldView = this.listView1.View;<br />
this.listView1.BeginUpdate();<br />
this.listView1.View = View.Details;<br />
item4.Remove();<br />
this.listView1.Items.Insert(0, item4);<br />
this.listView1.View = oldView;<br />
this.listView1.EndUpdate();
www.wickedorange.com
www.andrewvos.com
|
|
|
|
|
Does the same thing here
"An eye for an eye only ends up making the whole world blind"
|
|
|
|
|
Thanks for checking it out. What version of .NET?
www.wickedorange.com
www.andrewvos.com
|
|
|
|