|
Hello,
sujithkumarsl wrote: i tried with picture box but its doen't animating.
PictureBox, works for me.
Bitmap bmAnimated= new Bitmap(@"......\AnimatedPicture.gif"));
this.pbAnimated.Image = bmAnimated;
All the best,
Martin
|
|
|
|
|
Thanks a lot
My small attempt...
|
|
|
|
|
I have to develop this program(using C#):
Make a main program with a form in it, and a DLL to go along with it all.
In the DLL, add a text file and make, using the property box, the text file's property an embedded resource. Then, using reflection (i suppose), have the main program read the test file and post it to a form.
Plzz tell me how can i access that text file. and Is reflection necessary for it?
And how to achieve reflection?
Plzz reply soon
|
|
|
|
|
ya reflection is necessary for accessing any embedded resource. Get the reference of assembly and read your file in stream.
e.g.
System.Reflection.Assembly a=Assembly.GetExecutingAssembly();<br />
textStreame = a.GetManifestResourceStream("MyProject.MyTextFile.txt")));
|
|
|
|
|
I think that this article does exactly what you want:
Understanding Embedded Resources in Visual Studio .NET[^]
IrfanHaleem wrote: and Is reflection necessary for it?
Well, the Assembly class is in the Reflection namespace, so technically, yes. But you don't have to dig around in the data to get the resource, just use the GetManifestResourceStream method in the Application class.
Example:
Assembly me = Assembly.GetExecutingAssembly();
using (StreamReader reader = new StreamReader(me.GetManifestResourceStream("MyApplication.MyTextFile.txt"))) {
MessageBox.Show(reader.ReadToEnd());
}
-- modified at 5:02 Thursday 10th May, 2007
---
single minded; short sighted; long gone;
|
|
|
|
|
hi everybody,
i had created an application in c# now i want it to run in screen server mode how could i acheive it. Please give me some clue if possible send me some code.
|
|
|
|
|
trap the mouse move and key press events
|
|
|
|
|
|
What data type should be good to represent a series of data (string, double) in turns of efficient and ease. In my series, it usually have about 5000 - 10000 values.
say,
JAN FEB MAR APR MAY
200 400 403 202 122
I wanna do some calculation based on a series of value, then emit another series, so I'd like to use a class to represent them. The order of the value pairs does matter as well. Thanks
Hiya, Everybody ^^
|
|
|
|
|
List<string>
List<int>
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Sorry to tell I'm still using VS 2003, without generic support.
I think I'll go for ArrayList to achieve the goal.
Thanks anyway.
Hiya, Everybody ^^
|
|
|
|
|
hai this is srinu.. am working on remoting ..am facing some difficulties while running GUI based applications.. my problem is .. i want to get remote GUI into local machine..clearly i have a dailog box in remote machine ...i want to get that dailog box using remoting into local machine ...can u plz help me .. is it possible to get that remote dailog into local machine.. gerally am getting any kind of text messages form server through remoting.. but am unbale to get dailog box ..can u plz help me to solve this problem..
thanks in advance..
Thanks,
Srinu.
|
|
|
|
|
Hi!
I'm afraid that's not possible with regular remoting.
The whole idea behind remoting is to execute a function an a different machine, no matter if this function is calculating some value, querying a database or showing a dialog.
The problem with showing a GUI on the other machine is that there's nobody at the other machine to operate the GUI.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Hai,
Thank u for ur reply ... if u don't mind can u plz suggest me is there any concept is avaiable in C# to get solution for this problem. now am clearly explaining my problem
i have one server and one client . i need to get some forms from the server ... suppose my client machine has one Form having 3 buttons are (load, display result , Enterdata) if cliek the load button it loads some GUI's and then if i click on display result it get's the form from the server, when i click on Enterdata .. it lauch one dailog and it should take some data from the client machine(client will enter data manually) after pressing "OK" buuton it will update data in the server machine .. when ever user reqest that data then it shuld be show the data to user when user cliks the button load ( in client machine form ) ...is this my problem can u plz suggest me any kind of solution for this .. i want to implement this on only C#..thanks in advance..
|
|
|
|
|
Hi,
I have a form as a main form that in this form menues of application located on it. Now I wana to add a login form.I wana this login form show at the first and after we input current data in username and password the second form show.
would you please what should I have to do?????????
thanks
|
|
|
|
|
When the form loads, have it make itself invisible, and then show the login form. If login fails, close. If it succeeds, show the main form.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
I did it. in main form I write this code in from.load event :
this.Hide();
Frm_LogIn_User frm = new Frm_LogIn_User();
frm.ShowDialog(this);
this code correctly work but in the login form in button1.click enevt I write this code :
if (textBox1.Text == "1" && textBox2.Text == "1")
{
Frm_LogIn_User frm = new Frm_LogIn_User();
frm.Dispose(this);
}
this code does not work and I think maybe the code is wrong.
I would appreciate of somebody help me.
thanks
|
|
|
|
|
Alireza3839 wrote: textBox1
Why don't your controls have real names ?
Alireza3839 wrote: Frm_LogIn_User frm = new Frm_LogIn_User();
frm.Dispose(this);
What is this for ? What are you trying to achieve ?
Set a public boolean property on your login form called something like LoginSucceeded.
Then do this:
frm.ShowDialog(this);
if (frm.LoginSucceeded)
{
this.Visible = true;
}
else
{
this.Close();
}
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hey everyone,
I have a ASP.NET C# website. On one of my pages I have a datagrid and when the user clicks on the surname it has to pass two values. One is the student ID and the other is the TB_ID. I made the student ID the ItemIndex field so that was easy to get when you click on a student. But I cannot get the TB_ID value from the grid when you click on the surname. This is the code so far:
// find student id and training block for selected record
stPersId = dgGrpReport.DataKeys[e.Item.ItemIndex].ToString();
//TBID = dgGrpReport.Columns(rows[1]).ToString();
//TBID = ((Label)dgGrpReport.SelectedItem.Cells[1].FindControl("TB_ID")).Text;
//TBID = e.Item.ItemIndex[1].ToString();
//TBID = dgGrpReport.SelectedItem.Cells(1).Text;
Response.Write(TBID + " - " + stPersId);
As you can see I've tried a few combinations. Any ideas?
Thanks of course in advance, I appreciate the help!
Michael
|
|
|
|
|
Hello,
I'm trying to highlight selected text in a RichTextBox Control.
I want to do this by using the RTF control code \cbn where n = index.
As I understand you prefix the selected text with a \cbn code to change the background color to the highlight color then Postfix it with another \cbn code to reset color back.
See COMMENT BELOW for full description
//RTF Color codes with indices into Color Table
private const string clrDefault = @"\cf1 ";
private const string clrKeyword = @"\cf2 ";
private const string clrLiteral = @"\cf3 ";
private const string clrOutlining = @"\cf4 ";
private const string clrComment = @"\cf5 ";
private const string clrSelect = @"\cf6 ";
//The actual individual entries in the Coor Table
protected static string colorDefault = @"\red0\green0\blue0;";
protected static string colorKeyword = @"\red15\green0\blue255;";
protected static string colorLiteral = @"\red200\green105\blue36;";
protected static string colorOutlining = @"\red27\green175\blue78;";
protected static string colorComment = @"\red160\green160\blue160;";
protected static string colorSelect = @"\red90\green90\blue90;";
//Code to build the Color Table string
protected static string rtfColorTable = @"{\colortbl ;" +
colorDefault +
colorKeyword +
colorLiteral +
colorOutlining +
colorComment +
colorSelect +
@"}";
public static void HighlightSelection(RichTextBox rtb, string selTxt)
{
string result = rtb.Rtf;
//Replaces existing colorTable with mine
result = CreateColorTable(result);
Regex r = new Regex(selTxt);
// COMMENT BELOW
//If I use clrSelect + selText + clrDefault
// i.e. @"\cf6 " + selText + @"\cf1 "
//The proper keywords foreColor changes to gray.
//But when I use the \cbn equiv. it doesn't??
result = r.Replace(
result,
@"\cb6 " + selTxt + @"\cb1 ");
rtb.Rtf = result;
}
Thanks for your time!
Mike
P.S. Does anyone know a good Regex reference?
Light travels faster than sound. That's why some people appear right until you hear them speak.
|
|
|
|
|
http://www.ultrapico.com/Expresso.htm
Download the tool , its a tool to test regular expression and with few example of regex
|
|
|
|
|
Thanks for the link...Expresso is much better than the one I was using.
Thanks
Mike
Light travels faster than sound. That's why some people appear right until you hear them speak.
|
|
|
|
|
we have a project got some button,if we run the step by step demo function,our teacher ask us after click the first button,the second button which should click will be highlight.So user can follow the highlight button to run the project.Do not know how to highlight the button,any ppl can give a idea?thanks a lot!waiting for your reply!
|
|
|
|
|
Not sure what you mean by highlight, but you can change the background color to make it more conspicuous. Something like this in button1's Click event handler:
button2.BackColor = Color.AntiqueWhite;
Cheers,
Vıkram.
Déjà moo - The feeling that you've seen this bull before.
Join the CP group at NationStates. Password: byalmightybob
|
|
|
|
|
You can make the button BOLD and/or the font size as required:
cmdTest.Font.Bold = true;<br />
cmdTest.Font.Size = 18;
If that is what you require...
|
|
|
|