|
Using some event to call it up (command button, etc.) or just opening in your constructor of form one:
System.Windows.Forms.Form form2 = New myNamspace.Form2;
Form2.show();
Brettski
|
|
|
|
|
Seeing as this is a C# forum, that code wont compile like it will in VB.NET
I am guilty of the other way round, I always manage to post C# in the VB forum - and it always gets pointed out to me.
|
|
|
|
|
It wont? Please explain? It's what I use and I don't use vb.net.
Thank you,
Brett
|
|
|
|
|
Form2 frm = new Form2();
frm.Parent = this;
frm.show()
Divyang Mithaiwala
System Engineer & Software Developer
|
|
|
|
|
I am setting Conditional BackColor property of UltriWinGrid ButtonColumn with this code:
private
void gridLookup_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e)
{
if(UtilClass.IsNumeric(e.Row.Cells["BuildingId"].Value.ToString()))
{
e.Row.CellAppearance.BackColor = Color.PeachPuff;
e.Row.Cells[0].Band.Layout.Override.CellButtonAppearance.BackColor = Color.PeachPuff;
}
else
{
e.Row.CellAppearance.BackColor = Color.White;
e.Row.Cells[0].Band.Layout.Override.CellButtonAppearance.BackColor = Color.White;
}
}
now this code is working fine at first time but when user perform horizontal scrolling on this grid the button column disappear once and when user again reverse scrolls the column appears without back color formatting, how can I make assigned backcolor stable on scrolling.
|
|
|
|
|
Thats nice. Now why dont you ask the authors of this control?
|
|
|
|
|
This question belongs on the Infragistics user forum, not a general programming forum.
There are 10 kinds of people in the world.
Those that read binary...
...and those who don't.
|
|
|
|
|
Would anyone happen to know how to use the start.dll to open files? what parameters it takes and what the basic code is needed to get it working? basically i want to be able to pass any file to the start.dll and it will then open the file in the right application, just like normally happens when you open a file in windows explorer.
|
|
|
|
|
You don't need a DLL to do that...
Simply use:
System.Diagnostics.Process.Start("filename");
that will open the specified file in the asociated program.
--------------------------------------------------------
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Hi all,
I would like to store a string in a file using Rijdael encrypt method , and I'm looking for a way to store the iv (Initialization Vector) inside the encrypted file as well, in this way the user doesn't have to remember both the key and the iv.
My solution is to save the iv as plain text at the beginning of the file followed by the encrypted text.
//declaration used by both write and read
BinaryFormatter bformat = new BinaryFormatter();
Rijndael rij = Rijndael.Create();rij.Key = key;rij.IV = iv;
//write to file
Stream stream = File.Open(label3.Text, FileMode.Create);
CryptoStream crypt = new CryptoStream(stream, rij.CreateEncryptor(), CryptoStreamMode.Write);
bformat.Serialize(stream, iv);
bformat.Serialize(crypt, "hello");
stream.Close();
crypt.Close();
//read from file
Stream stream = File.Open(label3.Text, FileMode.Open);
CryptoStream crypt = new CryptoStream(stream, rij.CreateDecryptor(), CryptoStreamMode.Read);
//set the iv
rij.IV = (byte[])bformat.Deserialize(stream);
//read the encypted data
string test = (string)bformat.Deserialize(crypt);
stream.Close();
crypt.Close();
My problem is : (string)bformat.Deserialize(crypt); throw an exception : "Binary stream '190' does not contain a valid BinaryHeader".
What's the matter?
The problem is crypt.position is different from stream.position ?
Do you know any other way to save the iv in an encrypted file?
Thank Francy
|
|
|
|
|
I guess that something is written to the stream when you create the CryptoStream. Try to read and write the IV before you create the CryptoStream.
---
b { font-weight: normal; }
|
|
|
|
|
HI
HOw to change the language of the messagebox button
Mohamad A. Flefel
C#.net Developer
|
|
|
|
|
Do extensive research on localization. Plan for about a 2-3 week project to implement it into a working project.
|
|
|
|
|
Sorry : but i doesn't Understand
Mohamad A. Flefel
C#.net Developer
|
|
|
|
|
Search at Code Project for HeyboBox. This is customize Message Box dll source code is not give damo project is there. You can ask the writer to share the code with you if he aggrees, this will help you out some way.
|
|
|
|
|
Hello ,
How can i save an image in sql table ?
Mohamad A. Flefel
C#.net Developer
|
|
|
|
|
|
This is the function to upload the file
public string imageupload()
{
string FileName=null;
if (filUpload.PostedFile.FileName=="")
return " ";
filUpload.PostedFile.FileName.Substring (filUpload.PostedFile.FileName.LastIndexOf(".")+1);
FileName = DateTime.Now.ToString().Replace("/","").ToString().Replace(" ","")+ "." + filUpload.PostedFile.FileName.Substring (filUpload.PostedFile.FileName.LastIndexOf(".")+1);
FileName = FileName.Replace(":","");
if(filUpload.PostedFile.ContentLength>0)
filUpload.PostedFile.SaveAs(Server.MapPath("itemimages") + "\\" +FileName );
return FileName;
}
"Aim to go where U have never been B4 and Strive to achieve it"
http://groups.yahoo.com/subscribe/dotnetforfreshres
http://himabinduvejella.blogspot.com
|
|
|
|
|
Hi, i have to interface my c# software,
with an old activeX in vb6 language,
i never do this thing and i don't have any idea.
someone can give me a simple example to do this.
i would like to understand how can i pass parameters,
if the activeX want variant variables how can i pass
these?
thanks.
Clif
|
|
|
|
|
I have to pass a dynamic array of structures from an unmanaged DLL to C#. I wrote the following wrapper-function.
Unmanaged C++ DLL:
typedef struct browserStruct<br />
{<br />
unsigned long id;<br />
unsigned char name[250];<br />
} structTypBrowser;<br />
<br />
extern "C" __declspec(dllexport) unsigned long __stdcall sv_getDocClassList(<br />
unsigned long &cnc,<br />
unsigned short numOfElems,<br />
structTypBrowser *browserArray<br />
) {...}
In C#:
public struct svStructTypBrowser<br />
{<br />
private UInt32 m_id;<br />
private string m_name;<br />
}<br />
<br />
[DllImport("SVConDll.dll")]<br />
private static extern UInt32 sv_getDocClassList(<br />
out UInt32 c,<br />
out ushort numOfElems,<br />
out IntPtr browserArray
);<br />
<br />
public getDocClassList() {<br />
IntPtr p1;<br />
svStructTypBrowser[] m_docClasses;<br />
...<br />
try<br />
{<br />
result = sv_getDocClassList(out m_cnc, out noe, out p1);<br />
<br />
m_docClasses = (svStructTypBrowser[])Marshal.PtrToStructure(p1, typeof(svStructTypBrowser));<br />
}<br />
}
The IntPtr p1 is null after calling sv_getDocClassList().
Has anybody a solution?
|
|
|
|
|
hi all
i m working on a data mining project and need the source code of fuzzy c-mean clustering algorithm
can anyone help me in finding.
regards
|
|
|
|
|
If you google for Fuzzy C-mean Cluster, you will find many algorithms. Since they are written as pure mathematical equations, then it should be simple for you to come up with your own source code. But you will find such implementations to be highly guarded, so do not expect anyone to just hand you source code for such a complex implementation.
...and you do not have to ask the question multiple times. Only once is needed.
|
|
|
|
|
hi all
i m working on a data mining project and need the source code of fuzzy c-mean clustering algorithm
can anyone help me in finding.
regards
|
|
|
|
|
Hi
you can use matlab.there is tools in matlab for fuzzy c-mean clustering.
|
|
|
|
|
Hello!
I have 2 Questions.
(1) I have made a DeskBand in C# in which I can switch b/w taskbar and System Tray. Means if I Right click on taskbar toolbar and press “Move to System Tray” Context menu item it hides it self on Taskbar and Notification icon becomes visible. And if I click on notification icon and press “Move to TaskBar” Context menu item, then it hides it self on system tray and displays on task bar but also show the Windows own TaskBar Context Menu (See Attached Screen Shot). How Can I stop that event from being fired.
(2) Can I hide/show the Quick Launch Bar (On Taskbar) using C# my own Button
For any further help on this topic i cand send u attached snapshots with it on ur mail because i think theres no attached like stuff in it.
|
|
|
|