|
Hi,
I DownLoaded "TerminalControl" Project From This Site and I am Trying To Use This Project On Web Using WebClass Library. All Control are Displaying On Web except "Windows Custom Control Or Terminal Control" of This Project.
How To Solve This Problem Please Send a Reply....
Prabhu.R
|
|
|
|
|
Please help me.
I use Visual c# 2005.
I want to use some control with same name and diffrent index like control array.
Please tell me i can use what property of controls like DropDownList
Thanks in advance.
-- modified at 14:57 Monday 13th August, 2007
|
|
|
|
|
You can create an array of controls if you'd like. What are you trying to do exactly ?
Or do you mean the Items property on the data bound controls ?
Christian Graus - Microsoft MVP - C++
"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,
Visual Designer will not let you do this; it insists on having unique names
for controls. There are two ways to solve this:
- don't use VD for these controls, just create your controls programmatically,
so you can give them any valid name you choose, including array[index]-like names
provided you declare such an array of course.
- keep the controls as they are; now create a collection (array, ArrayList, List,
whatever) and add the controls to that list.
BTW: maybe you don't need anything new; you can iterate over all controls in
a container like this:
foreach(Control c in this.Controls) {
Button btn=c as Button;
if (btn!=null) btn.PerformClick();
}
The above would find all buttons and click them one by one.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
And you can also examine tag property of the control to identify exactly which one it is.
|
|
|
|
|
Anyone know any good tools that "don't get in the way". I mean a OR tool that simply creates an object at the DAL and leaves you with something easy to change/read/maintain...
I've tried a tool that put so much crap in my project that I can't begin to understand how to change it if I wanted too...
I've tried 2 tools that left me with awful code. It seems to me these tools are trying to do too much. Are there any tools that provide basic objects at the DAL or provide all layers and are easy to read, maintain ??
Thanks in advance..
|
|
|
|
|
I use Developer Express' XPO which doesn't really clutter things up much at all. Very easy to use once you get the hang of it. I've used it in both winforms and asp.net applications and have been happy so far.
Cheers,
Drew.
|
|
|
|
|
what is the programing code or AT command to send data from one modem to other. please note that I am not talking about SMS format . I want to send the data in the form of GPRS packet over the network.FOr code I am using C sharp as programing language.
thanks
|
|
|
|
|
There are 2 ways
Read about RAS connection
Or ConnectionManager.
what platform do you use
Compact Framework, Full Framework?
|
|
|
|
|
Plastio:
thanks very much for your prompt reply.Plastio I am just the beginer in the communication area. Will you pls tell me the difference of using these two utilities.RAS Connection OR Connection Manager
Secondly I am using Compact Framework of .NET.
thanks
|
|
|
|
|
I can lay down a lot of information since I have struggled with PDAs and Compact Framework a lot.....
But I will let you read and investigate yourself as a beginner
thats whats makes you a professional the ability to study fast and being accurate.
Please refer to the following link they are leading technologists in the field of
compact framework, I have collected a lot of material myself in the past from OpenNetCF
http://www.opennetcf.com/
Have a nice journey
(Read about ConnectionManager first and then widen your horizons towards the Tapi library)
Cheers
|
|
|
|
|
Plastio:
Thanks very much for helping me out in a way that I can learn something . After reading your comments I immediately log on to that website and try to search the required But due to some problem, web server is ubable to open the search results and "The Page cannot be displayed " error message comes up.
Secondly plastio : Please help me out this time with the code because I have to finish this task in few days and its already very delay.I will definately go through the following website soon.
Once again I appreciate your feelings.
thanks.
|
|
|
|
|
Plastio:
sorry for the correction. I am using Full .NET Developer Framework instead of Compact Framework.
thanks.
|
|
|
|
|
|
1) What will the value of txt be after executing MyFunction?
public void Main()
{
string txt = MyFunction( “12345” );
}
public string MyFunction( string str )
{
if( str.Length == 1 )
return str;
else
return MyFunction(str.Substring(1, str.Length - 1)) + str.Substring(0,1);
}
Hint:
String.Substring( startIndex, length )
seema
|
|
|
|
|
What a confusing & expensive way to reverse a string.
|
|
|
|
|
I am curious to know why you took the time to type this into the site, instead of into visual studio, where you could have watched what it did. In either case, it's obviously homework, what do YOU think it does ?
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Score 0 points. CHEATING DETECTED!
--
You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer
|
|
|
|
|
A better question would be: how many bugs or weaknesses are there in the method
MyFunction() ? I found 4 so far.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
|
How does that fit with "More functions should disregard input values and just return 12. It would make life easier." as quoted by Malcolm Smart ??
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
seemamltn wrote: Re: What is output
According to Wikipedia, "output" is "any data exiting a computer system. This could be in the form of printed paper, audio, video. In the medical industry this might include CT scans or x-rays. Typically in computing, data is entered through various forms (input) into a computer, the data is often manipulated, and then information is presented to a human (output)."
Hope this answers your question.
/ravi
|
|
|
|
|
I use following code in C# to print pdf files, it works ok, I want to use printer's IP address instead of printer's name, any help?
private static void doPrint(string executable, string fileFullPath, string printerName)
{
// Print PDF file using Acrobat Reader.
// "/h" - hidden mode
// "/t" - print command following by the file name and printer name
System.Diagnostics.ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.Arguments = "/h /t \"" + fileFullPath + "\" \"" + printerName + "\"";
startInfo.FileName = executable;
startInfo.UseShellExecute = true;
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
System.Diagnostics .Process process = new Process() ;
try {
process = Process.Start(startInfo);
}
catch (Exception ex)
{
DBMaint.updateLogFile (ex.Message.ToString ());
}
finally
{
process.WaitForExit(20000);
if (process.HasExited == false)
{
process.Kill();
}
}
}
|
|
|
|
|
Each printer has a port for accessing that if you put the port name instead the printer name it would work.
ports for network printers define like this \\Hostname\portName [somewhat like printerName but not exactly] and you can put IP of the host instead of the name.
so you should do 2 things first find the printer port and second find the IP of the host
the first one need some works to do, one of the ways is to use WMI through System.Managment namespace in .NET
and here is the script you need for retrieving printers information
On Error Resume Next
Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20
arrComputers = Array("TITAN")
For Each strComputer In arrComputers
WScript.Echo
WScript.Echo "=========================================="
WScript.Echo "Computer: " & strComputer
WScript.Echo "=========================================="
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_PrinterShare", "WQL", _
wbemFlagReturnImmediately + wbemFlagForwardOnly)
For Each objItem In colItems
WScript.Echo "Antecedent: " & objItem.Antecedent
WScript.Echo "Dependent: " & objItem.Dependent
WScript.Echo
Next
Next
just use the query part to create and use it
Here is the code for showing the Printer ports
ManagementObjectSearcher search = new ManagementObjectSearcher(new SelectQuery("Win32_Printer"));
ManagementObjectCollection moc = search.Get();
foreach (ManagementObject mo in moc)
MessageBox.Show(mo.Properties["Name"].Value.ToString()+" Port: "+mo.Properties["PortName"].Value.ToString());
and the second part is fairly easy just use the Dns.GetHostEntry method to get the IP
and at last I test your code with this method and it works
hope the post would be useful
|
|
|
|
|
Thanks for the very usful information, it works for my project.
But I had little problem also, when I run it from my computer, it's ok, when I deployeed to another computer and scheduled in windows task, I got error,debug window pop up, in windows task log file, it exited with code C000005.
I couldn't figure out what cause the error.
Any help again??
Thanks a lot.
|
|
|
|