|
Please don't cross post.
No, you are requesting a web page, not an object.
Some serialization might occur in the process of creating the response, like putting values in ViewState, but the creating of the response itself is not based on serializing.
---
b { font-weight: normal; }
-- modified at 8:09 Sunday 5th March, 2006
|
|
|
|
|
Hi,
Have a doubt with the functionality of 'string' type.
As String types are immutable we should not use string types, when large string manipulations are involved. This is understood.
But I assume StringBuilder as a class will use either of two .NET types,
char or string to store the data. Then how is StringBuilder mutable?
Please clarify how StringBuilder works internally.
ThankYou,
Regards.
|
|
|
|
|
Please don't cross post.
---
b { font-weight: normal; }
|
|
|
|
|
|
I am looking for some Windows XP style Icons, but i find it really hard... Can i use the windows icons from the dll files in the System32 folder? (My progra is for non-comercial use) I found some icons in System.Drawing.SystemIcons, but they were not many. Can I use icons from SharpDevelop? (it's a open source project, right?) I've searched the source folders for Sharp Develop, but i can omly find a few of the Icons used in that program...
Is there any easy way?
Viktor Nilsson
|
|
|
|
|
The fact that noone answered you yesterday, probably means that none of the regulars here've done so. You might get an answer from an infrequent poster in the next few days, but your best bet would be to try asking somewhere else. Repeatedly posting the same question to the same place will not help you in the least.
-- modified at 12:42 Friday 3rd March, 2006
PS I'd suggest looking for and buying a book on DirectX. Look on Amazon.
|
|
|
|
|
Hi Everyone,
I was wondering if any one has implemented a smart client with active X objects inside of it?
For Example a Winform Smart Client with VLC ActiveX or MediaPlayer ActiveX objects in the application to view streams.
If you have, any tips or pointers or code fragments would be much appreciated.
Is it even Possible? How would the code confirm that all the ActiveX components are installed on the Machine?
Thanks in Advance;)
Regards
Mark
|
|
|
|
|
|
I am trying to figure out how to auto update a windows service from within the service itself. I cannot figure out how to restart a service inside that same service. Does anyone have any ideas for how to pull this off?
Thanks,
mike
|
|
|
|
|
You can't. Stopping the service stops your service code, so there is no way to call it's own Start. On top of that, you can't replace an .EXE that's already running. You'd have to do this from a seperate application, possibly from another service.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi im having a problem with my application..
basically i want to store values of my textboxes when i click on the add button..at the moment
what i have is when i load the application the below code is generated.....
Private Function LoadProject(ByVal ProjectID As Integer) As Boolean
' Simulate having retrieved project data
' from a database. Here, we'll use our
' Project and Task data structures to
' hold the data.
With theProject
.strProjNo = 1
.dateProjStart = DateTime.Today.AddDays(-100)
.dateProjTime = DateTime.Today.AddDays(100)
End With
theTasks.Add(New Task(0, "Go To Computer Graphics Lecture", _
DateTime.Today.AddDays(-17), _
DateTime.Today.AddDays(22), _
"make sure i print off lecture slides before lecture starts"))
theTasks.Add(New Task(1, "Go to Lab ", _
DateTime.Today.AddDays(-11), _
DateTime.Today.AddDays(19), _
"complete lab six and get it signed"))
theTasks.Add(New Task(2, "see tutor ", _
DateTime.Today.AddDays(-11), _
DateTime.Today.AddDays(19), _
"complete lab six and get it signed"))
Return True
End Function
.....and when i add a new task the new values are stored but only temporarly..i need it to store forever..
Private Sub btnAddTask_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAddTask.Click
' Unbind the Tasks array list from
' the dropdown ComboBox.
cboxTasks.DataSource = Nothing
' Add the task to the Tasks array list.
theTasks.Add(New Task(txtTaskNo.Text, txtTaskName.Text, _
txtTaskStart.Text, txtTimeStart.Text, _
txtTaskActual.Text))
With cboxTasks
.Items.Add( _
CType( _
theTasks(theTasks.Count - 1), Task).strTaskName)
.SelectedIndex = theTasks.Count - 1
End With
' Cleanup the form and re-select the old task.
AfterNewTaskCleanup(ixTaskPrev)
End Sub
.....i want to use xml as my datastorage but dnt no how to implement this..would be grateful if any 1 could help
p.s. i am using vb.net 2003 - smart device application for pocket pc
thanks
|
|
|
|
|
Environment:
----------------
Win XP SP2
VS 2005 Prof. Release and VS 2003 Prof. Release
Winword 2003
Topic:
-------
Managed assembly compiled with VS 2005 and prepared for COM Interop (registered for COM-Interop and visible to COM-Applications, e.g. Winword) could not be instantiated in Winword through VBA-Macro.
Statement in VBA is something like this:
Set comp = CreateObject(“OMNIplan.TestCOMInterop2”)
Or using a Reference (Component is visible in VBA-Object-Browser):
Dim comp as OMNIplan.TestCOMInterop2
Set comp = new OMNIplan.TestCOMInterop2
An Error is thrown in VBA:
Number -2147024894
Description: File- or Assemblyname ‘TestCOMInterop2’ or a Dependency not found.
After compiling the same project with VS 2003 Prof. the Component instanciates und runs without problem.
The assembly is a local resource and not copied to a network directory.
In my opinion it is therefore trusted and no code access security is in play.
I have checked the registry entry for Net-Version 1.1 and 2.0, they are identical accept the Runtime-, Assembly-Version and codebase.
First I had thought it could be a registration error. Therefore I have tried regasm …, the same result.
A deployment with a setup-project yields the same error.
I suppose the error is triggered by Net 2.0. Net 2.0 seems to operate with COM Interop in another way than Net 1.1. (In my opinion it is a loader-problem, the contructor is never reached under Net 2.0)
Perhaps it is bug or it is by design. But what has changed, if it is by design ?
I am baffled, can someone help.
Thanks a lot
gill
The code:
-------------
using System;
using System.Runtime.InteropServices;
using System.Text;
using System.Windows.Forms;
//
namespace OMNIplan
{
[Guid("17693BE6-BC93-45fd-BE80-A079C957B001")]
public interface _ITestCOMInterop2
{
[DispId(1)]
bool OpenDocument (object wordApp, object wordDoc,
object wizard, object settings,
object kindDoc);
}
//--- Events-Interface
[Guid("17693BE6-BC93-45fd-BE80-A079C957B002")]
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
public interface _ITestCOMInterop2Events
{
}
//
[Guid("17693BE6-BC93-45fd-BE80-A079C957B003")]
[ClassInterface(ClassInterfaceType.None)]
[ComSourceInterfaces(typeof(_ITestCOMInterop2Events))]
[ProgId("OMNIplan.TestCOMInterop2")]
public class TestCOMInterop2 : _ITestCOMInterop2
{
private string csCRLF = System.Environment.NewLine;
public TestCOMInterop2()
{
MessageBox.Show("TestCOMInterop2: Constructor");
}
public bool OpenDocument(object wordApp, object wordDoc,
object wizard, object settings,
object kindDoc)
{
try
{
if ((null != wordApp) && (null != wordDoc))
{
MessageBox.Show("TestCOMInterop2.OpenDocument OK");
return true;
}
MessageBox.Show("TestCOMInterop2.OpenDocument Failed");
}
catch (Exception ex)
{
MessageBox.Show("StartUp-Fehler: " + ex.Message);
throw ex;
}
return false;
}
}
}
|
|
|
|
|
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
|
|
|
|