|
Thanks a lot. I quiried only VS.NET directory so I missed them.
Regards
CK
|
|
|
|
|
Hi,
I am having some problems in calling a managed code( server) from an unmanaged client. I created a WebService Application in C# and a Win32 based console client. The client is working fine when both the server and the client are located on my computer( Windows 2000). However, invoking the client application from another computer on the same network results in an error, whose value is -2147221164. From the Error Lookup option, the message obtained correspoding to -2147221164 is "Class not registered".
So,i copy the entire client project on this other computer(Windows NT).It does not have a .NET compiler.On building the project in Visual Studio 6, gives an error which is: Unable to include atlsoap.h : No such File.
Can anyone suggest me how to deal with this queer problem and what these error messages signifies ??
Vivek.
|
|
|
|
|
In VS.NET right click on the references node in solution explorer.
Click "Add Reference", on the COM components tab choose the component you wish to use (OCX).
You might want to then add it to the toolbox as well, right click on the Toolbox tab you want to add it to, and choose "Customize Toolbox"; then select your COM component again.
HTH,
James
Sonork ID: 100.11138 - Hasaki
and a digital cookie (not chocolate chip, its computer chip) goes to whoever can be the first to tell me what Hasaki means. I know someone registered on here can tell me
|
|
|
|
|
Is there an easy way to maximize a winform at runtime?
For instance, by setting a property instead of getting the
screen dimensions and then specifying the size manually?
|
|
|
|
|
Use the WindowState property.
this.WindowState = FormWindowState.Maximized
James
Sonork ID: 100.11138 - Hasaki
and a digital cookie (not chocolate chip, its computer chip) goes to whoever can be the first to tell me what Hasaki means. I know someone registered on here can tell me
|
|
|
|
|
Hi everyone.
My situation is long but not very complicated. It involves custom web controls. Any help is very much appreciated.
I am building a custom web control. I am creating this control because I have a scenario where I need to dynamically output different types of content to a page (sometimes an image, sometimes a table, sometimes a string of text). As such, a label, or image or control wouldn't do. So, I created a custom web control. This control has a property for a URL string. The URL is inputted to the control and then it inputs the url to a SQL stored procedure. The stored procedure returns a value with the type of output to return (text, table, etc), and it renders the output based on the value. My problem is at compile time. When I compile my code, I get a bunch of errors which make no sense at all!
I'm not sure where it's coming from. Here the code from where I begin getting compile errors:
protected override void Render(HtmlTextWriter output) {
if (Format.Type == "Unknown") {
MyNameSpace.MyClass myClass = new MyNameSpace.MyClass();
SqlConnection myConnection = new SqlConnection(ConfigurationSettings.AppSettings["ConnectionString"]);
SqlCommand myCommand = new SqlCommand("GetOutput", myConnection);
// Mark the Command as a SPROC
myCommand.CommandType = CommandType.StoredProcedure;
// Add Parameters to SPROC
SqlParameter parameterPage = new SqlParameter("@URL", SqlDbType.NVarChar, 100);
parameterPage.Value = Format.Page;
myCommand.Parameters.Add(parameterPage);
SqlParameter parameterType = new SqlParameter("@Type", SqlDbType.NVarChar, 30);
parameterType.Value = ParameterDirection.Output;
myCommand.Parameters.Add(parameterType);
myConnection.Open();
SqlDataReader pageoutput = myCommand.ExecuteReader(CommandBehavior.CloseConnection);
// check if it is a table
if ((String) pageoutput["TableCell"] != null) {
SqlDataReader dr = myClass.GetTableContents(Format.Page);
bool hasMoreRows = dr.Read();
if (hasMoreRows != null) {
// start writing the table
output.Write("table header cell here");
// it is on this next line that is 133, where the compile errors start occuring
while (hasMoreRows == true) {
// this if statement checks if the reader is an even or odd item depth, and
//if it is even it renders a different background color the table (creating
// an alternating patten effect)
if ((dr.Depth % 2) == 0) {
output.Write("alternating style table HTML here");
} else {
output.Write("normal table style here");
}
}
}
}
}
}
}
}
These are the compile errors. I've tried reworking those lines several ways, and nothing seems to fix it.
(133,45): error CS1525: Invalid expression term ')"
(133, 47): error CS1002: ; expected
(136, 38): error CS1026: ) expected
(136, 44): error CS1525: Invalid expression term "
(136, 45): error CS1002: ; expected
(136, 106): error CS1002: ; expected
(136, 106): error CS1525: ; Invalid expression term ')'
(139, 18): error CS1525: ; Invalid expression term 'else'
(139, 23): error CS1002: ; expected
(140,187): error CS1026: ) expected
(140,193): error CS1525: ) Invalid expression term "
(140,194): error CS1002:
Thank you very much for reading this whole message. Even if you can't help me
|
|
|
|
|
bool is a value type, not a reference type so you can't compare it to null.
The datareader returns true if there are more rows to read, and false if there are none.
Other than that, I see no errors on my end. I'm using RC0 on XP Pro
James
|
|
|
|
|
Is there a way to make a form show up as both an MDIChild and an MDIContainer? That is to have a top level window with sub-windows each of which has it's own sub-windows? I managed this once in C++ with MFC through a method much to complicated to describe here, but I'm totally new to C# and wondering if this is possible?
|
|
|
|
|
I just did a quick test and the following exception was thrown -
System.Exception: A form can't be both an MDI child and MDI parent.
So, if it is possible, it isn't done in the most obvious way. Maybe there is a complicated workaround?
|
|
|
|
|
Neill Jordan wrote:
I just did a quick test and the following exception was thrown -
System.Exception: A form can't be both an MDI child and MDI parent.
So, if it is possible, it isn't done in the most obvious way.
Yeah, I did get this far... Thanks for the attempt though. It sure as hell wasn't easy under MFC so it probably isn't easy this time around either. I guess this is a good indication that I should rethink my GUI design!
|
|
|
|
|
Here's some naming so I don't get confused while I'm typing this.
MDIParent
- MDIChild
- MDIGrandchild
On the MDIChild add a panel and set the dock style to fill; you may want to set the backcolor so it isn't the control color.
On the MDIGrandchild set the TopMost property to false, then add the MDIGrandchild to MDIChild's panel's control collection.
You'll probably have to add some logic for scroll bars and the Windows menu on the MDIChild, but that should work visually.
HTH,
James
[edit, fixed my naming chart so it didn't look like both were children were directly from parent]
|
|
|
|
|
My bad, its not the TopMost property, its the TopLevel property.
Guess thats what I get when I guess which of the two it was :P
James
|
|
|
|
|
Hi
I'm looking for the Intermediate language file for a C# DLL/EXE, but I'm either totally misunderstanding the concept or am looking in the wrong place.
I presumed that the MSIL file is very similar to an IDL-with implementation of course- and is also in PLAIN text.
What's going on?
Simon
Simon
"...Bill is watching..."
"An Object Is Simply A Referenced Thingy" quoted from Programming Perl
|
|
|
|
|
Use the IL disassembler ILDASM.EXE to view MSIL. Under Visual Studio.NET RC1 it is located at "F:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Bin\ildasm.exe". Use it to open a .NET assembly.
|
|
|
|
|
MSIL is in a bytecode format like java. Like someone else said you need to use ILDASM to view the MSIL going on in the bytecode.
James
|
|
|
|
|
How to compare data stored in two byte arrays (byte[]).
I need function like memcmp in C.
/Thx 4 hlp
|
|
|
|
|
I am having trouble calling a method on a COM object that takes a SAFEARRAY of VARIANTS as an argument. This array of values is really an array of strings but when the array is contructed like this:
System.Array arr = new System.String[1] {"Some String"}
it raises a "System.Runtime.InteropServices.SafeArrayTypeMismatchException" exception.
When the array connstructed like this:
System.Array arr = new System.Object[1] {"Some String"}
it raises a "System.Runtime.InteropServices.COMException" exception saying that a referenced object is not found.
The method I am trying to call is ICOMAdminCatalog.InstallMultipleComponents
Any suggestions?
Tony Cleveland
|
|
|
|
|
I have been trying to extract the first image in the following video files.
.mpeg
.avi
.mov
I know that you can use Windows Media Player or the DirectShow api. But if any body could give some samples are at least point me in the right direction for some more help I would really appreciate it.
Thanks
|
|
|
|
|
I have an scriplet object defined in 'createservice.aspx' using the following code
<object data="editor.aspx" type="text/x-scriplet">
Where createservice have registered and inherits from src='createservice.cs' (code Behind), this file includes funtions to insert DB written in C#.
in editor.aspx, <IFRAME> is defined where user types in texts.
and editor.aspx is linked to compose.js using<script src="compose.js?169" language="javascript"></script>
1) My question is simple but took me hours, how to retrieve mytext.value from editor.aspx and to be use in createservice.cs(code behind), say like store in a string defined in createservice.cs,
2) should I declare the object in createservice.cs, but how to declare an OBJECT, i only know how to declare htmlTeatArea, htmlLabel and etc from the UI.webcontrols class from .NET framework
Thank you very much
regards, karsin
|
|
|
|
|
Hi guys, is there a bug in Beta 2's implementation of the splitter control?
Try to create a form where a splitter seperates a treeview on the left and
an edit view on the right. I find that you are unable to drag the splitter
all the way to the right like a normal splitter.
Has anyone tried something like this?
Just another wannabe code junky
|
|
|
|
|
For this to work, first the treeview and then the splitter should be docked to the left. The editview should be set to DockStyle.Fill.
|
|
|
|
|
I had big problems with the Beta2 implem of the splitter - however, I got everything working if you design them visuall in the correct order (i.e. place the tree first, then the splitter, then the edit)
|
|
|
|
|
Software4net Inc. has released bCodeParser™ - C# class library for parsing Java bytecode under GNU General Public License (GPL). This set of C# classes - part of the bigger product currently being developed - addresses all routines of translating Java bytecode into reach object model. We decided to release this class library under GPL to facilitate developers in their Java - .NET integration efforts. More details at http://www.software4net.com
Software4net Inc. - <j2ee and="" .net="" specialists="">
http://www.software4net.com
|
|
|
|
|
Does anyone know how to run an external application from a c# windows application?
|
|
|
|
|
This puzzled me for a while too. I searched high and low in the .NET Framework SDK and figured you just couldn't do it. Then by chance I ran across it when going individually through each assembly.
It's in a really obvious location. (read with a sarcastic attitude)
System.Diagnostics.Process.Start("notepad.exe");
Cheers,
-Erik
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
My thoughts are my own and reflect on no other.
|
|
|
|