|
I'm not quite sure what you mean faad.
If you are trying to display another windows form, you can use Form.Show().
If you are trying to run an external process you need to look at the System.Diagnostics.Process class and use the Process.Start() method.
Good luck
quorum pars magna fui
|
|
|
|
|
I have different forms in my application
there is a main form.
There is a splitter on the main form.
on left side when a button is clicked i want to display a form on the right side,and then change the right side form on each click.
|
|
|
|
|
Why not use the button click event to Show th componets?
quorum pars magna fui
|
|
|
|
|
Hi can you guys explain me is the
using System
using XXXXx
using blá blá
are the libraries where the prog is going to get some functions if so how can i get a detailed and easy understanding of each library, what can she do what is she for and so on.
Thanks 
|
|
|
|
|
view the microsoft documents that came with the .Net framework sdk... if you choose to install them...the would be under the start menu. the using referse to a namespace... in this case System (System.Console,ect)it also houses System.Windows.Forms (the form that windows applications are created from), and countless other functions.. i couldnt tell you all of them if i tryed lol. refer to the .net framework guide..for more info... if you didnt install it..you can reinstall or go to msdn.com and seach for the "using" command.
Jesse M
The Code Project Is Your Friend...
|
|
|
|
|
thanks, i have then instaled.
|
|
|
|
|
I have a component that uses DesignerSerializationVisibility to serialize collection items to code.
It works great for adding new items to the collection, and rending them as well.
I cannot seem to get them to delete from the code when the parent is deleted.
Example:
I have a variation of the ToolBar, where the button collection is my own extension of the ToolBarButton.
When I add a button, it adds the code to the code file, creating and setting the values.
When I go into the button collection, and remove the buttons manually, the code goes away.
But if I just delete the tool bar, without deleting the buttons, the code for the buttons remains.
Things I have tried:
1) Adding the buttons to the components list.
2) Using the dispose method to dispose of the buttons.
3) Using the dispose method to manually delete the objects from the collection.
The tool bar class extends ToolBar, the button class extends ToolBarButton, and the collection extends CollectionBase.
I have also tried adding the buttons to the base class, but the code is still not removed.
The control seems to work fine, it just won't get rid of the code in the designer. The objects are even being disposed, as the next button I create starts at 1 again, and causes duplicate code entry (which is how I found the problem.)
Any help would be greatly appreciated.
Chris Rosenbury
|
|
|
|
|
I have a Webbrowser control in a window. When the user clicks a button I want to create a new window (Form) and move the webbrowser control into the new window. Sounds simple!
Trouble I'm having is that when I change the parent of the webbrowser to the new window, the webbrowser stops working. Its kind of frozen, no redrawing or anything. I think this has something to do with OCX, but I know nothing about OCX. When you add a webbrowser to your form in VS.net, it adds some code that deals with OCX.
Anyway does anyone know how to move a webbrowser control to a new window?
(I can't just make a new webbrowser in the new window because of the page that's in it..)
"Outside of a dog, a book is Man’s best friend. And inside of a dog, it’s too dark to read."
-Groucho Marx
|
|
|
|
|
I believe you can't. Stuff like IOleClientSite, IOleInPlaceActiveObject are the reasons why.
|
|
|
|
|
OK. Dissapointing, but good to know. coming from you i believe it,
thanks,
"Outside of a dog, a book is Man’s best friend. And inside of a dog, it’s too dark to read."
-Groucho Marx
|
|
|
|
|
Need to search a C# string for a certain character, much
like strchar does for char arrays... what's the best way
to do this?
thanks
|
|
|
|
|
Strait out of the MSDN
String myString = "abc";
bool test1 = String.Compare(myString.Substring(2, 1), "c") == 0;
myString.Substring(3, 1);
bool test2 = String.Compare(myString.Substring(3, 0), String.Empty) == 0;
Or you could just use String.IndexOf()
Which would work something like
String myString = "abc";
int myInt = myString.IndexOf("c")
Where IndexOf() returns 0 - n if the char is found and '-1' if it isn't.
Hope this helps
But I, being poor, have only my dreams.
I have spread my dreams under your feet;
Tread softly, because you tread on my dreams.
- Yeats
|
|
|
|
|
hi,
I want to get notify before delete file occured in the file system
and to copy the file to other directory,doe's anyone know
how can i do this .
thank's 
|
|
|
|
|
nissiml,
Have a look at http://www.codeproject.com/csharp/fswatcher.asp[^] it will monitor a selected directory for changes. It may be eaiser to just proactivly back-up and monitor the files rather than try to intercept the file deletion.
Hope this helps
quorum pars magna fui
|
|
|
|
|
Hi guys
I am wkg on a C# Component which retrieves information from the ADS on Win2k Domain. For some reason, instead of using the System.DirectoryServices namespace, I have to go for the ADS Library (a COM DLL).
To write the code in VB.NET I can go ahead and use the GetObject Global method of VB. as following...
<br />
Dim objLDAP as ActiveDS.IAdsOpenDSObject<br />
objLDAP = GetObject("LDAP:")
' Here it uses the Global GetObject method,
' that specifies the First param as path and...
' NO ProgID as it is Optional Param.
In C#, I cannot use the same global function, hence the alternative, Activator.GetObject can be used. But it does not retrieve the reference at all.
I even tried, Specifically giving the Type param to the Method as...
<br />
IAdsOpenDSObject objLDAP;<br />
objLDAP = Activator.GetObject(typeof(ActiveDS.IAdsOpenDSObject), "LDAP:");
This ends up in giving error message saying that,
A Proper link to the Service may not have been established correctly. How can I make this work, as I must have all my Components in C# only. Porting this part in VB.NEt only for this reason would be infeasible.
Please help me out in this.
Atul Kale
Sr. Software Engineer.
XcelVision Technologies Ltd.
|
|
|
|
|
You really should be using System.DirectoryServices for this, and only resorting to the ADSI library as a last resort.
The Activator.GetObject is not related to the VB GetObject function. To replace the VB functionality, you can either use the Microsoft.VisualBasic.Interaction.GetObject function, or use a combination of the BindToMoniker and GetActiveObject functions from the System.Runtime.InteropServices.Marshal class.
using System;
using System.Runtime.InteropServices;
public class ComUtils
{
public static object GetObjectFromClass(string className)
{
object ret = Marshal.GetActiveObject(className);
if (null == ret)
{
Type t = Type.GetTypeFromProgID(className);
ret = Activator.CreateInstance(t);
}
return ret;
}
public static object GetObject(string pathName)
{
return Marshal.BindToMoniker(pathName);
}
public static object GetObject(string pathName, string className)
{
if (null == pathName || 0 == pathName.Length)
{
return GetObjectFromClass(className);
}
else if (null == className || 0 == className.Length)
{
return Marshal.BindToMoniker(pathName);
}
else
{
object ret = GetObjectFromClass(className);
UCOMIPersistFile pf = (UCOMIPersistFile)ret;
pf.Load(pathName, 0);
return pf;
}
}
}
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|
|
Hi Richard,
Thanx a lot for that code! In fact I had tried all the possible combinations of using Type.GetTypeFromProgID and then calling the Activator.GetObject etc. etc. But the most important thing I forgot was about the Binding part. I had been wkg on VC++ with Monikers many a times, I just never thought I would need them here too.
regards
Atul Kale
MCSD, MCT
Sr. Software Engineer
XcelVision Technologies Ltd.
|
|
|
|
|
does anyone know how to create disk quotas for users in c#, i am having a pain trying to figure this out.
please help!

|
|
|
|
|
Hi,
I'm new to this "Crystal Reports Stuff"... I would like to know a bit more about this...
Does it come to use it for free with VStudio .net ? ( at least for desktop applications ?).
How easy and powerful is this tool ? It's easy to integrate that into my applications ?
I'm thinking about start studying about this, or just export my reports into Ms Word, is that a good idea ?
thanks a lot, greetings
Braulio
|
|
|
|
|
I want to save My drawings on a form to a jpg of Gif files??!
I did it..but when I try to open them in a paintbrush or IE..I got some problems..on IE it didn't appear
and on paint brush it opens a black image??
please I need help in this as soon as possible
thanks
Muhammad Mahmoud Mousa Soliman
Faculty of Computers & Information Sciences
Information Systems Major
Ain Shams University in Cairo
|
|
|
|
|
Look You Stupid Guy
Try The Following And It Will Work
Image MyImage = Bitmap.FromHbitmap(ControlPaint.CreateHBitmap16Bit(MyBitmap, Color.White));
MyImage.Save("MyImage.gif", ImageFormat.Gif);
Your Master
Ahmed Mostafa Ahmed Aboelkhair
P.S. I Am His Freind And I Am Kidding With Him
|
|
|
|
|
Hi, all:
I am totally stuck, please help. I have a datagrid on the WinForm ( using C# ). I am trying to create a combobox for one of the columns. I use the technique described in MS KB Article 323167 ( coded in VB.NET) and I port the code to C#. It works fine for the existing rows. Whe I click on the * row ( i.e., try to create a new row) on the datagrid. The combobox seems there, but when I click on the down arrow, the combobox does not dropdown. Occasionally, I can get the dropdown, but when I leave the cell, the changed value goes to the previous row ( strange!). The primary key is AutoNumber, when I click on the new row ( with "*" in front of it), I sometime get little pencil in front of the row, but sometimes I do not get it except the autonumber ( almost like it does not treat as a new row ).
Has anyone use this combobox technique and work on the new row successfully? I include the code snippet ( handling the events) here, if you can spot anything I did wrong, please let me know.
Any help is highly appreciated. Thanks in advance.
Dion
************ Code Starts here ***********
private void dataGrid1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)<br />
{<br />
if ( dataGrid1.CurrentCell.ColumnNumber == 1 )<br />
{<br />
cbType.Width = dataGrid1.GetCurrentCellBounds().Width;<br />
}<br />
}<br />
<br />
private void dataGrid1_CurrentCellChanged(object sender, System.EventArgs e)<br />
{<br />
if ( dataGrid1.CurrentCell.ColumnNumber == 1 )<br />
{<br />
cbType.Visible = false;<br />
cbType.Width = 0;<br />
cbType.Left = dataGrid1.GetCurrentCellBounds().Left;<br />
cbType.Top = dataGrid1.GetCurrentCellBounds().Top;<br />
cbType.Text = dataGrid1[dataGrid1.CurrentCell].ToString() + "";<br />
cbType.Visible = true;<br />
}<br />
else<br />
{<br />
cbType.Visible = false;<br />
cbType.Width = 0;<br />
} <br />
}<br />
<br />
private void dataGrid1_Scroll(object sender, System.EventArgs e)<br />
{<br />
cbType.Visible = false;<br />
cbType.Width = 0;<br />
}<br />
<br />
<br />
private void dataGrid1_Click(object sender, System.EventArgs e)<br />
{<br />
cbType.Visible = false;<br />
cbType.Width = 0;<br />
}<br />
<br />
<br />
private void cbType_TextChanged(object sender, System.EventArgs e)<br />
{<br />
if ( dataGrid1.CurrentCell.ColumnNumber == 1 )<br />
{<br />
cbType.Visible = false;<br />
<br />
if ( ( dataGrid1[dataGrid1.CurrentCell] + "") == "" )<br />
{<br />
SendKeys.Send("*");<br />
}<br />
<br />
dataGrid1[dataGrid1.CurrentCell] = cbType.Text;<br />
} <br />
}
|
|
|
|
|
Hi,
What do i need to develop win ce apps with .net??
is there some sdk for it? , is it even possible?
//Roger
|
|
|
|
|
The compact framework (subset of the .NET SDK). Available as part of .NET 1.1 (still in beta[^]).
|
|
|
|
|
excuse my ignorance now but , when that is installed , can i compile apps in vs.net to the 1.1 framework? do i need to point vs.net to where the new compiler is or?
i have no idea what im doing now ... totally confused
//Roger
|
|
|
|