|
i want to read text of buttons or lables of swf
which is running inside the shockwaveflash control.
Thanks,
zahid
|
|
|
|
|
|
|
With code.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Suppose I have a byte from USB device which holds the day of the week (1 to 7)
I need to print out Sunday to Saturday based on values 1 to 7. I MCU I create a look up table of strings or string array in ROM and access with index.
What is the method here. I think it is enum. But from tutorials I cant figure out how to get a string from a number like indexing.
Please suggest best way here.
Thanks
With Regards
Roy Thomas
"..this file is known as source file probably because it is a source of frustration and anxiety!" - Chuck Sphar - In book 'C# 2005 for Dummies'.
|
|
|
|
|
Hi,
yes enum is fine since the strings you want are valid identifiers, hence:
enum Days {
Monday=1,
Tuesday=2,
...
}
public void Test() {
for (int i=1; i<8; i++) Console.WriteLine(((Days)i).ToString());
}
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
There are several ways (here are two):
string[] weekdays = { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" };
...
string day = weekdays[3]; or
enum Weekday
{
Sunday = 0,
Monday,
Tuesday,
Wednesday,
Thursday,
Friday,
Saturday
};
...
string day = ((Weekday) 3).ToString();
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Thanks a lot to all.
I got it. One clarification.
string[] weekdays = { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" };
...
string day = weekdays[3];
If I use this method, is it creating a RAM string array? or is this array in ROM only? unlike a variable string?
I am using enum .
Thanks a lot
With Regards
Roy Thomas
"..this file is known as source file probably because it is a source of frustration and anxiety!" - Chuck Sphar - In book 'C# 2005 for Dummies'.
|
|
|
|
|
Depends on your compiler. For Visual Studio, it will always be a RAM string, because it won't let you prefix it with "const" because it is a reference type and it (understandably) won't let you initialize const reference types other than string. Despite it being an array of strings. Grrr.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
CelestialCoder wrote: or is this array in ROM only?
on a PC the file system probably resides on a disk, and anything you load from disk is located in RAM; the only thing in ROM (or EEPROM) probably is the BIOS code.
However literal strings belong in code space, not data space. Code space could be write-protected at run-time.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Got it. Thanks for all the info.
Regards
With Regards
Roy Thomas
"..this file is known as source file probably because it is a source of frustration and anxiety!" - Chuck Sphar - In book 'C# 2005 for Dummies'.
|
|
|
|
|
|
Hi,
i have a question about the DataGrid and the DataGridBoolColumn.
Is it possible to disable a CheckBox shown in the DataGridBoolColumn? I get a result of a Database Query. If the Value is true or false the CheckBox should be enabled and the CheckBox is checked correctly, but if the value is NULL the CheckBox ist disabled and checked, i want to get a unchecked and disabled CheckBox in that case.
Thanks for your help!
|
|
|
|
|
AFAK you can't.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
I am creating a web service project in C#. It has a file containing classes, used by the web service.
Problem 1. When I type a local variable inside the class, it is not showing intellisense. for example I am typing the code for class B, which has local variable for class A. When I am going to type objA (object for the class A) and then DOT (.), class A's members are not displayed.
Problem 2. Inside the web method, if i make typing mistake; i.e. wrong variable name or missing semi colon at the end; still compilation goes successful, while I see, there are errors.
Anybody has experienced this? I am facing this problem 1st time and feel much difficult to continue coding. Please point me to right direction.
Thank you for your help in advance
Regards
Aftab Sindhi
.NET Application Developer
U.A.E
|
|
|
|
|
hi,
problem1: if your local variable is private you cannot access the var from classB by typing new classA().var .. create a property or declare the variable as public. (i guess that could be a problem).
problem2: you might check whether the class you want to compile has the buildsettings compile or some else..
hope i could help
|
|
|
|
|
Thanks for ur reply but it seems u didnt understand my question or may b i could not explain properly. Local variable means variable for instance of class A.
<br />
public class B<br />
{<br />
private A objA;
}<br />
Regards
Aftab Sindhi
.NET Application Developer
U.A.E
|
|
|
|
|
Hi,
make sure the following option is set, using menu Tools/Options/ProjectsAndSolutions/BuildAndRun:
"On Run, when build or deployment errors occur" = "Do not launch"
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Dear Luc Pattyn
Thanks for your reply. I tried that but it didnt solve my problem. I am also observing other behaviors also such as , when I right click on any class, I cant see "View class diagram" menu. Hence I cant create diagram.
This only happens in this project while in same Solution, other project is there, which is not mentioning this problem.
Regards
Aftab Sindhi
.NET Application Developer
U.A.E
|
|
|
|
|
I solved my problem.
I opened the project file in text editor. I noticed that my all classes in App_code were not added in compile tag, hence compiler was not compiling those classes. That is why errors were not detected and classes were not added in final assembly file (dll). This was the reason class objects were not showing intellisense.
I added manually my classes in compile tag and everything is working fine. Still could not know why those classes were not added in project file (.proj) for compilation.
Regards
Aftab Sindhi
.NET Application Developer
U.A.E
|
|
|
|
|
hi,i have build a setup file for my desktop application.i have put my banner on the top.but there is a default text like in welcome screen welcome to <project name=""> setup wizard.it is looking odd.i want to remove it.wht shall i do?plz help me...its urgent....
|
|
|
|
|
Unfortunately the only part of that message that visual studio gives you access to is the Product name.
If you want more control over the installation experience you will have to use a different installer technology such as WIX[^]. I believe WIX projects can now be integrated into Visual Studio via a Visual Studio Addin, though I prefer the integration you get in Sharp Develop which uses WIX as it's default Installer project engine.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk
|
|
|
|
|
i have 2 crystal reports both of them have different datasource.These reports were working tommorrow but now when i run reports it show errors one report shows"the table could not found" and another report shows "the report need more information". i rebind my reports with database but error is still there i googled my problem but no solution works.plz help if u know its solutions
|
|
|
|
|
haleemasher wrote: .These reports were working tommorrow but now when i run reports it show errors one report shows"the table could not found" and another report shows "the report need more information". i rebind my reports with database but error is still there i googled my problem but no solution works.plz help if u know its solutions
They WERE working TOMORROW ?
Perhaps if you posted some code ? What has changed since 'tomorrow' ? Something must have changed if it worked before and now doesn't. Have you confirmed your datasource is working ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
thnx 4 reply.my reports not contain so much code it simply bind a record with a button.
protected void Button1_Click(object sender, EventArgs e)
{
ReportDocument cryRpt = new ReportDocument();
cryRpt.Load("C:\\WebSite1\\CrystalReport2.rpt");
CrystalReportViewer1.ReportSource = cryRpt;
CrystalReportViewer1.RefreshReport();
}
|
|
|
|