|
Do you mean a new connection that they can choose from the auto-dial screen, or just a connection to their ISP? For the latter, see the WinINet[^] documentation.
For the former, this really seems to be platform-dependent, i.e. Windows XP works a little differently from Win2K, which works a lot differently from Windows OS's like 98 and ME. If you use the information above, specify functions like InternetAutodial , the user could create their own connection. If you need to create it for them (like some ISP do with their auto-configuration), I think you can do this with .cnf files.
One more way is to use the function InternetDial , which allows you to specify a connection name, flags, and a number to dial. This way, at least, you could get them to dial a particular server. An HWND the parent window (Form.Handle , inherited from Control.Handle ) is required for the prompt dialog. This is supported in all Windows platforms that support .NET.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
hello,
how can I send parameters to a designed page ( smart doc )?
thanx
anat
|
|
|
|
|
Hello,
I want to create an option dialog like Microsoft visual C# .Net option dialog
which consists of a tree in left panel and a by clicking on its node
left panel changes.
Is there any template or sample code that I can use it.
Thanks & Regards
Saeideh
|
|
|
|
|
I would create a form, then put a TreeView on it. Set it's Dock property to Left . Then create multiple Panel objects with different names (or create them in your form code in an array). Then, when a specific TreeNode is selected (check in the Click event), you show a specific Panel, and hide the others. You may want to set the Panel 's Dock property to Full .
- Daniël Pelsmaeker
|
|
|
|
|
You should also try searching CP for option dialogs. There are several examples that work the way you want.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Hi Guys!
we know that there is a way to handle custom exceptions in
asp dot net by specify the error page.
is there any way to do the same in csharp windows form.
i.e custom windows form.
i don't want to write try/catch block in my programm
in all places.i just want to write it once where it can handle all the program exception. is there a way.
Ali Khan
|
|
|
|
|
Legend Never Dies wrote:
is there any way to do the same in csharp windows form.
No. You can't get exceptions without try/catch,I think the best you can do is use try/catch and popup your custom error form in catch part.
Mazy
No sig. available now.
|
|
|
|
|
No u don't understand my question,
i want to write only one try/catch block that can handle all the exceptions of the whole applications, which off-course may contains multiple windows forms
|
|
|
|
|
Handle the HttpApplication.Error event in your Global.asax file, or it's related code-behind file. Since auto-event-writeup is enabled by default, you can just declare your handler as
private void Application_Error(object sender, EventArgs e)
{
HttpServerUtility server = HttpContext.Current.Server
Exception e = server.GetLastError();
} For more information, see the documentation for the event I mentioned, and the HttpServerUtility.GetLastError method.
You could also create your own IHttpModule for handling, errors, too, if you require library portability without moving the whole web application.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
There are some buttons in yahoo and hotmail that have fletcher at the left or right of them and when you click on them drop down menu appear and you choose an option. I need them in my windows applicaation in C#.Does anybody know them? I don't have time to develop them myself.
Mazy
No sig. available now.
|
|
|
|
|
You might get an idè by studding the source code for
http://www.codeproject.com/cs/miscctrl/color_picker.asp?target=color%7Cpicker
Thomas
|
|
|
|
|
Hi,
I was just wondering...
how do you make a stand-alone program in Visual C#.net 2003 that can be used by people who do not own visual studio, or any programming language for that matter.
Currently it says that they're missing MSCOREE.dll, and I suspect they're missing about 40 other dlls as well.
Any ideas?
Thanks
|
|
|
|
|
Hi,
The user that executes the program, gotta have the dotNet 1.1 Framework.. =)
..?
// Up The Irons, SirErugor
|
|
|
|
|
It's called the dot net framework. You kind of have to install it on the client computer.
|
|
|
|
|
I already said tha'
// - Up The Irons, SirErugor
|
|
|
|
|
Lord Tor wrote:
how do you make a stand-alone program in Visual C#.net 2003 that can be used by people who do not own visual studio, or any programming language for that matter
[Key points in bold]
There needs to be a distinction in your mind between the framework, the language, the compiler, and the development environment. * The language is the syntax, grammar, and conventions that define how the code is written and interpereted. The compiler turns the code given to it into an executable file or library (called an assembly in the .NET world). The development environment is the application you use to help you create programming projects.
A framework (loosely defined) is a core library that you use to build your applications. ** The .NET framework happens to be an integral part of the C# language - it doesn't function without it. Because of this, the .NET framework must be installed for your applications to run. The .NET framework is a free redistributable, and should not be confused with VS.NET, which is MS's development environment for .NET, and which costs a fortune.
Sorry for being a bit long-winded, but I just wanted to make sure things are clear for you.
* You may already know some of this, but just in case...
** OK, I can just see myself being corrected by the "purists". FYI, I have read Marc Clifton's "What is a Framework?".
|
|
|
|
|
Thank you all for your help. So telling my users to download the .net framework 1.1 is the only thing I need to do? It's not like C++.net, requiring you to statically link your program?
Cheers
Mike
|
|
|
|
|
I have a ASP.Net Web Application project and I have multiples web forms. How do I activate or load a new web form into my current browser window. The method
Form frm = new Form();
frm.ShowDialog();
doesn't work here because this is not a window application. Here we don't have this method available.
I appreciate any help.
The rookie
|
|
|
|
|
As this is an ASP.NET related question perhaps you would like to ask it int the correct forum.
|
|
|
|
|
There are two methods for doing this:
Server.Transfer("yourpagename.aspx");
or
Response.Redirect("yourpagename.aspx");
Hope this helps!
|
|
|
|
|
What is that application that generates *.chm file automatically based on a dll?
Don't forget, that's Persian Gulf not Arabian gulf!
|
|
|
|
|
Have you looked at NDoc?
I, for one, do not think the problem was that the band was down. I think that the problem may have been that there was a Stonehenge monument on the stage that was in danger of being crushed by a dwarf.
-David St. Hubbins
|
|
|
|
|
struct tagSTGMEDIUM
{
int tymed;
[switch_type(int), switch_is((int) tymed)]
union
{
[case(TYMED_GDI)] HBITMAP hBitmap;
[case(TYMED_MFPICT)] HMETAFILEPICT hMetaFilePict;
[case(TYMED_ENHMF)] HENHMETAFILE hEnhMetaFile;
[case(TYMED_HGLOBAL)] HGLOBAL hGlobal;
[case(TYMED_FILE)] LPWSTR lpszFileName;
[case(TYMED_ISTREAM)] IStream *pstm;
[case(TYMED_ISTORAGE)] IStorage *pstg;
[default] ;
};
[unique] IUnknown *pUnkForRelease;
}
The above code is the clas STGMEDIUM
what I'd like to know is how to translate this to C#.
I've figured out the enumeration dictates what type of object the pointer "union" represents, and more or less how it works. But how would I make this case statement in C# that sets the type of an object, in a way in which C would understand?
Is this actualy nescessary? Or can I declare an object variable, and produce a case statement in the structure based on the enumeration? Is this portable to C? Or would the structs be incompatible?
Cheers
Cata
|
|
|
|
|
Actually, a better representation would be:
[StructLayout(LayoutKind.Sequential)]
public struct STDMEDIUM
{
public int tymed;
public IntPtr handle;
public IntPtr pUnkForRelease;
} The handle will work for all cases, since each member is just a pointer, including lpszFileName (since a string pointer is a pointer to the first character in the array). BTW, this is how Microsoft has created their STGMEDIUM struct for internal use as well. As I mentioned before, you'd be wise to learn IL and use ildasm.exe to examine the classes and structs in the .NET BCL, or get yourself a good decompiler like .NET Reflector[^] and examine what you need in System.Windows.Forms . As I mentioned before, the .NET version of IDataObject eventually gets transformed into the COM version of IDataObject and all the .NET-related drag-n-drop stuff is just a wrapper around the native functions and structs, which are all P/Invoked and defined in the System.Windows.Forms.dll assembly (as internal, nested members). This could save you a lot of time in creating what you need (you'll still need to create it, but at least you can get pointers about how to do so from the defined members in that aforementioned assembly).
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Thanks heath, most helpful.
I'll make the enumeration in C# and use that to interpret / designate the integer.
What is IL?
I will definitely look into it.
Cheers
Cata
|
|
|
|