|
You can remove the blue border at the top by selecting None for FormBorderStyle in the visual designer. If you don't like the way that looks, there are several other choices.
|
|
|
|
|
Thanks,
One last quick question: Can I create a customer interface using Visual Studio (C#) 2005? In other words, supposed I wanted my application to have a mac style look and feel or other different skin theme, can I use what ships with Visual Studio to do that?
Thanks again,
BP
|
|
|
|
|
Kind of. ToolStrips, MenuStrips, ContextMenuStrips all have a Renderer property, that controls the look and feel.
I recommend the free Krypton Toolkit[^], makes your forms, buttons, menus, everything look beautiful.
|
|
|
|
|
|
Result is here:
I ask I find
http://msdn2.microsoft.com/en-us/library/aa446560.aspx
|
|
|
|
|
using System;
using System.Collections.Generic;
using System.Text;
namespace OutputTest
{
class Program
{
public static int i;
static void Main(string[] args)
{
while (true)
{
i = Console.Read();
Console.WriteLine("Output: ", i);
}
}
}
}
|
|
|
|
|
Umm...you have no break set in your control loop. That program's gonna hang at the while and never release. Not sure why it would print 3 times. What are your command line args?
|
|
|
|
|
It should run forever: while(true)
|
|
|
|
|
ok...so, take this "super-hypothetical never would happen in real life situation" where a provider of an external web service requires an authentication token to invoke any of the methods contained in their provided services. ...And say again in this "super-hypothetical never would happen in real life situation" that they didn't provide a dev account to your project group, so each time you want to test your code against the service, you have to use the release account and are eating up these precious tokens that your company is paying out the wazoo for....as such, the project controller doesn't want to pay for another account to use as a dev account, but at the same time doesn't want to eat up tokens before the thing ever goes live(which means -no unit testing at all...basically develop it black-box and then hope when you flip the switch nothing screws up...not gonna happen)
...With me here? Now, take again in this "super-hypothetical never would happen in real life situation" where the provider of this external service has live demos with input textboxes on a web form interface that provide full functionality of the service. Is there any way in this "super-hypothetical never would happen in real life situation" that a wrapper around this demo could be created so that a program could send it's data through the pre-defined web interface and consume the data that is returned?
...And just to clarify, the app that I'm talking about to wrap around the web service client is not desired for production(would probably get in big trouble for that). I'm just needing some way of testing my logic and there's currently no way of doing so but since the provider has a permanently authenticated thread on the server, I thought it would be nice to create a demo that could demonstrate functionality by funneling through their pre-existing client.
|
|
|
|
|
Try using a webbrowser control in your app. Through it you'll have acces to the html document loaded and you'll also be able to interact programatically with the controls or even the script functions within the page. I did something some time ago.
|
|
|
|
|
Good People,
What do the following words mean in C#?
Partial
Refactoring
Delegates
Thanks,
BP
|
|
|
|
|
They mean [^]
only two letters away from being an asset
|
|
|
|
|
1 - Not a whole
2 - When your factor fails, you have to refactor.
3 - When you have to take off a legate, you use Delegates.

|
|
|
|
|
I'm not sure why you're asking this, if not for homework ?
Refactoring means the same in any language. Partial means you're using VS2005, it's a new keyword. A delegate is a fancy function pointer.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
LOL - it's not for homework. (After 12 years of college/grad school primarily in the 90s, those days are long gone.) I am learning C# here at work and want to use it for my first software project. I'm self-taught.
Thanks for your answers,
BP
|
|
|
|
|
BlitzPackage wrote: I am learning C# here at work and want to use it for my first software project.
OK - google would have answered them all, but...
a partial class has more than one .cs file, you just put 'partial' in your class definition, and the compiler will find all files relating to a class and merge them
Refactoring means to take existing code and change it's structure, most commonly by breaking a large function into several smaller ones.
A delegate is a function pointer, like I said. That means, a variable represents a function which can be assigned and called in code. All the event handlers in your forms code, like when you click a button, is handled with delegates.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
|
|
Thanks Ed,
I appreciate your answers.
Sincerely,
BP
|
|
|
|
|
hi
1. Partial - its a new kyeword introduced in c#2.0 and is use to write a class in distributed form
E.G - look at the designer of your form it is Form1.designer and where u write code is partial class form1. similarly u can have no. of class u want with the same name like partial Form1 and write and these will be combined in a single class i.e Form1.. Realy a good feature..like Sometime when no.of developers need to work on same class and so others.
2. Refactoring - provided to help u need writting templetes in code. For C# there is inbuilt Refactoring in dot net and for VB.net need to install third party. one can provide own code snipette and use refactoring to use them Simple best way to make lazy programmer.
3. Delegate - this is a something that works between event source and event target. It handles the event.
Atul kumar
|
|
|
|
|
I have to open Excel workbooks with different excel versions. With the reference for Excel2000 (Version 9.0) the code is
Excel.Application oEA = new Excel.Application();
oEA.Workbooks.Open ( "testfile.xls", Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing , Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing );
This version needs 13 arguments for the Open-Method.
With a reference for Excel 2003 (Version 11.0) the same method needs 15 arguments.
My software has to run with both Excel-versions. If I compile with reference to Excel2003, my software does not run with Excel 2000 and vice versa.
Does anyone have an idea?
Ali Nehring
|
|
|
|
|
Create a class that wraps the object creation based on object type (2000, 2003, etc.). Then call you wrapper's Open, which just calls the correct version.
|
|
|
|
|
I tried this. I wrote 2 wrappers for both of the versions. Both of the wrapper have been implemented in different projects. If I reference to the wrappers, my project will not build, because there is a conflict:
Error: the dependency 'Interop.Excel, Version=1.5.0.0, Culture=neutral' in project 'NEAcoustics' cannot be copied to the run directory because it would conflict with dependency 'Interop.Excel, Version=1.3.0.0, Culture=neutral'
What can I do?
|
|
|
|
|
I am trying to write a DLL that has an event and am subscribing to the event from 2 different programs, but each of my programs is creating a new instance of the DLL.
The class is a singleton class and looks like this:
public sealed class clsEvents
{
public static readonly clsEvents Instance = new clsEvents();
private string _Value = "";
public event EventHandler ValueChanged;
public void OnValueChanged(EventArgs e)
{
EventHandler handler = ValueChanged;
if (null != handler)
{
handler(this, e);
}
}
public string Value
{
get { return _Value; }
set
{
_Value = value;
OnValueChanged(EventArgs.Empty);
}
}
} The singleton class only does half the work so that the same instance of the class is shared within each program but I need to use the same instance in both programs. I have set both programs to compile into the same directory so I know they are loading the same DLL but they are each creating their own instance of the class.
Finally, my question:
In VB6 it is possible to set the Instancing of a DLL to Multiuse and any programs that use that DLL would share the same global variables from the DLL. Is it possible to do the same thing in C# so that each of my programs uses the same instance of the singleton class?
Forgive me if I am going about this all wrong but hopefully someone can help. Please tell me if there is a better way to share events across multiple programs.
|
|
|
|
|
I'm afraid I think you're out of luck with this. Each of your programs runs in its own process and the operating system ensures that processes are independant of one another. Your dll will be loaded twice - once into each process, and even though you have implemented a singleton you ultimately have two of them on your computer.
You need to look at inter-process communication, something like named pipes perhaps or you might be able to get away with Mutexs. Hopefully someone here might have done this before.
Regards,
Rob Philpott.
|
|
|
|