|
You may have to tell Word to use the proper 1.1 framework by creating a manifest file for word. In your C:\Program Files\Microsoft Office\Office11 directory create the file: winword.exe.manifest with the following contents:
<configuration>
<startup>
<requiredRuntime imageVersion="v1.1.4322" version="v1.1.4322" />
<supportedRuntime version="v1.1.4322" />
</startup>
</configuration>
:..::. Douglas H. Troy ::..
Bad Astronomy |Development Blogging|Viksoe.dk's Site
|
|
|
|
|
How do you incorporate several 3rd party setup programs (*.exe's) into your setup project, then run a .NET project at the end?
Here's what I want:
1. Install my C# project
2. Install MySQL and wait for completion
3. Install MySQL connector and wait for completion
4. Create the database my program will use
5. Create an ODBC driver for my C# program to use
Steps 1,and 5 I know how to do (dump project, edit the registry, etc). The rest I don't know how. I tried to create custom actions, but it will only perform the first listed action.
|
|
|
|
|
Hi,
(VS 2005/C#)
I have a form with two objects:
1. DataGridView object with scrollbars
2. UserControl object showing an OpenGL animation in a separate thread using the BackgroundWorker component.
The animation updates every 10th ms and it works fine. But when I move the scrollbar of the DataViewGrid the animation hobbles severely (design time). I have verified that the animation thread still invokes the Invalidate() method every 10th ms! So the conclusion must be that all the events in the event queue generated by the scrollbar moving make the .NET framework SKIP the graphical update of my control.
Can it be so?
In runtime mode it improves much.
I hope someone out there can answer me. Thanks.
/Magnus
Javaman
|
|
|
|
|
THe problem is that your kicking off drawing every 10ms. That's WAY TOO FAST and totally unnecessary. Slow that rate down and you should be OK. For VERY smooth animation, you only need to show a frame about every 30ms. But, keep in mind your drawing code, and everything else your form does to update its image, has to complete inside that 30ms time! This is where your getting hung up.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks Dave.
I experience problems with a 30 ms interval as well...
The code inside the BackgroundWorker thread work method looks like:
while (!backgroundWorker.CancellationPending)
{
<opengl variable="" assignments="">
...
this.Invalidate();
Thread.Sleep(30);
}
The actual repainting is done during the 30 ms, but when I, e.g., move a scrollbar in the main form the repainting does not have enough time. To bad, this is a performance problem that I did not expect on my computer, Intel P4 2.8 GHz, 512 MB RAM, Geforce FX 5200 128 MB.
So then I want to secure the animation update by doing the repainting in the SAME thread, i.e., the BackgroundWorker thread. But can this be done in some way?
Sincerely,
Magnus
|
|
|
|
|
magja wrote: So then I want to secure the animation update by doing the repainting in the SAME thread,
You're better off NOT doing this in a background thread. Setup a Timer that fires it's event every 30 ms. Put your Drawing and Invalidate code in the Timer Tick event, then you might have to put a Application.DoEvents() line after the Invalidate line. This MAY give you better painting response, but that depends on what else your form is doing at the time.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i want to wrtie c# code in my vb.net form
by Imports Microsoft.CSharp
i imported the above namespace and i tried to write c# code but it doesn't work. so what should i do?
Regards,
Maher Abu Zer
|
|
|
|
|
You can't.
What you can do is use C# to create an assembly and use the assembly in the vb.net form. But I don't see any point in that. :\
If you are able to use C# code in a VB project, can you still call it C# code?
|
|
|
|
|
|
I have this code in VS 2003
Private mobjListener As TcpListener
mobjListener = New TcpListener(5000)
mobjListener.Start()
ByVal client As TcpClient
client = mobjListener.AcceptTcpClient
dim strIpAddress as string
strIpAddress = client.Client.RemoteEndPoint.ToString
but the property Client is protected so...
so i want to get the ip address of the client without using mobjListener.acceptSocket
Regards,
Maher
|
|
|
|
|
Hi
A few options come to mind:
1) Use .Net 2.0 - the Client property is now public.
2) Use reflection - you can access any property using reflection.
3) Derive from TcpClient - you can then add a public property that exposes the socket.
Take your pick
----------------------------
Be excellent to each other
|
|
|
|
|
thanx nicholas for your reply
i want to use it in vs2003
so i want to use either the second or third options:
2) Use reflection - you can access any property using reflection.
3) Derive from TcpClient - you can then add a public property that exposes the socket.
could you please send me samples on how to use them
because i tried to derive from tcpClient but it didn't work
may i made a mistake!
Regards,
Maher Abu Zer
-- modified at 4:01 Thursday 2nd March, 2006
|
|
|
|
|
Hi
2) Reflection
PropertyInfo property = client.GetType().GetProperty(
"Client", BindingFlags.Instance | BindingFlags.NonPublic );
MethodInfo method = property.GetGetMethod( true );
Socket socket = ( Socket ) method.Invoke( client, null );
3) Derivation
Sorry - you can't do it this way because the TcpClient is returned from your call to AcceptTcpClient . I didn't read the question properly
----------------------------
Be excellent to each other
|
|
|
|
|
hi man
thanx for your reply
i'm new to this code
so do i have to import a namespace?
and how can i write it in vb.net, i'd be gratefull if you can help
Regards,
Maher Abu Zer
|
|
|
|
|
Hi
You have to import the System.Reflection namespace.
I don't know VB, so you're on your own there
----------------------------
Be excellent to each other
|
|
|
|
|
ThaNx MaN
I did it, and here it is in vb
Dim myProperty As PropertyInfo = client.GetType().GetProperty("Client", BindingFlags.Instance Or BindingFlags.NonPublic)
Dim method As MethodInfo = myProperty.GetGetMethod(True)
Dim mySocket As Socket = CType(method.Invoke(client, Nothing), Socket)
Regards,
Maher Abu Zer
|
|
|
|
|
I am porting an application that I wrote in C# in Visual Studio 2003, (.NET Version 1.1) to the "Compact .NET" framework. When I try to compile the new Windows CE smartdevice project, the compiler displays build errors that state that the "DataGrid", and "ComboBox", are not in the "System.Windows.Forms" namespace. Both the online and included documentation seem to indicate that these controls are included in the compact framework. There is a very similar problem with the OleDb class of the System.Data namespace Other controls like buttons and menus load fine. Are these controls simply not part of the WindowsCE compact framework? Has anybody else run into this type of problem?
-- modified at 23:08 Wednesday 1st March, 2006
|
|
|
|
|
|
Yes, the class comparison tool indicates that the DataGrid class and the ComboBox class are included in Compact .NET.
|
|
|
|
|
Hi,
Imaginge that one is dealing with business objects which are exposing their attributes through public properties. One is now able to bind these properties to UI Controls with the build-in .net data binding mechanism. So far so good.
Data validation should be done inside the business objects in two different modes. Every public property on a business object can have a ValidateXXX method which validate just the given value. The second method validates all given data in a context that is meaningfuel for the whole business object instance.
Last but not least all validation messages should be displayed at UI level with an ErrorProvider component. Each control should show the assigned validation error message from the business logic layer.
So far we have some business objects, which are bound to UI controls. We have a collection with validation messages provided by the business object instance.
How to connect the whole thing togheter? The databinding mechanism is the only part that knows which UI Control is bound to which business object property. I miss the part which takes care of settings the validation messages for each control after validation is done.
Shouldn't the databinding mechanism provide a way to transport validation messages and shows them with a ErrorProvider next to the bound control
myMsg.BehindDaKeys = "Jerry Maguire";
-- modified at 11:22 Wednesday 1st March, 2006
|
|
|
|
|
Hi,
I have faced exactly the same problem and i concluded that my BusinessObject in order to perform proper data-bound functionality has to implement 3 interfaces:
IDataErrorInfo<br />
INotifyPropertyChanged<br />
IEditableObject
Chris Richner aka Jerry Maguire wrote: Shouldn't the databinding mechanism provide a way to transport validation messages and shows them with a ErrorProvider next to the bound control
As long as you have implemented IDataErrorInfo just set ErrorProvider.Datasource to your object and enjoy the magic.
|
|
|
|
|
Hi predragzakisevic,
I'm trying to solve my problem with your solution. I didn't implement IEditableObject, just added IDataErrorInfo. The problem is raised when I try to attach the business object to the error provider as a datasource. It saids that it's invalid because my business object doesn't implement IList.
How did you implemented yor business objects?
Thanks for you answer btw.
myMsg.BehindDaKeys = "Jerry Maguire";
|
|
|
|
|
class BusinessObject : IDataErrorInfo,INotifyPropertyChanged,IEditableObject ...
{
private Dictionary<string,string> m_Errors = new Dictionary<string,string>();
string IDataErrorInfo.Error
{
get
{
return ((m_Errors.Count > 0) ? "Business object is in an invalid state" : string.Empty);
}
}
string IDataErrorInfo.this[string columnName]
{
get
{
///Fetch from dictionary;
return GetErrorDescription(columnName);
}
}
}
|
|
|
|
|
Hi predragzakisevic,
Thank you for your code snippet. Maybe it's not working because I'm running against .net 1.1. Maybe they changed the way the errorprovider works in .net 2.0. If I try to set the errorprovider.datasource which an object that not implement IList I get an exception. As far as I can see your code doesn't implement IList.
I wrote my own DataProvider implementation under .net 1.1 that does the job as well. Great to have your feedback about this topic.
Have a nice day
myMsg.BehindDaKeys = "Jerry Maguire";
|
|
|
|
|