|
OK, I've updated my sig.
-----
*** Never give me an answer having anything to do with Visual Studio. I don't have this because I have two computers, one being my dad's mac, which is connected to the internet, the other being my pc, which is, sadly, not connected to the internet. The setup for the Visual C# program I think is called a "bootstrap" program, and it needs to connect to the internet to install the program. THEREFORE I cannot install this program onto my pc.***
|
|
|
|
|
OK - now that I understand the problem, you can get the express editions on CD from Microsoft. I recommend it.
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 )
|
|
|
|
|
How can you associate an icon with a certain type of file, so that when you view the file in Windows Explorer, the file will be displayed using that icon?
-----
Note: *** Never give me an answer have anything to do with Visual Studio. I don't have this program, and it'll be that way for a long, long time. ***
|
|
|
|
|
That's done in the registry, in the same section that handles what file to use to open a program if you double click on it.
HKEY_CLASSES_ROOT / Word.Document.8 / DefaultIcon
for example.
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 )
|
|
|
|
|
|
Thanks, that article is exactly what I needed.
-----
Note: *** Never give me an answer have anything to do with Visual Studio. I don't have this program, and it'll be that way for a long, long time. ***
|
|
|
|
|
Hi
I am trying to write a small utility where fill the form and click submit button automatically.
I am using mshtml to get all the information and press the button. But how do i get the button name from code below? Any ideas?
<form method="post" action="/cgi-bin/add_posting.pl"><br />
<fieldset><br />
<br />
<input type="hidden" name="pid" value="0001068190921181587792429822"/><br />
<input type="hidden" name="sms_me" value=""/><br />
<input type="hidden" name="room_type" value=""/><br />
<input type="hidden" name="house_type" value=""/><br />
<br />
<input type="hidden" name="num_bedrooms" value=""/><br />
<input type="hidden" name="contract_type" value=""/><br />
<br />
<button type="submit" class="submit">submit your ad >></button><br />
<br />
<input type="hidden" name="posting_id" value=""/><br />
<input type="hidden" name="current_live_date" value=""/><br />
</fieldset><br />
</form>
Thanks
Irfan
I am still learning
|
|
|
|
|
A regex that looks for a button with type="submit" ? Of course, this button doesn't have a name, unless you mean the text on the button ?
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 )
|
|
|
|
|
Because this button does not have name. I was not sure how to press it. So i should be using regex ?
I am still learning
|
|
|
|
|
OK, so regex isn't going to help you. You're not really asking C# forms questions, you're asking how to interact with a web page, in the browser control, right ? I believe you can just find the submit button(s) using javascript, without needing a name.
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 )
|
|
|
|
|
Irfan Faruki wrote: fill the form and click submit button automatically.
You dont really need to click the button, but submit the form.
Give the form some id. Then simple JS document.myForm.submit() should work.
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
"Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
Thanks for the help guys
dnh... Can you show an example if you don't mind? I am a newbie at c# and dont knwo Js
Thanks
I am still learning
|
|
|
|
|
i send 6 arranged datas from outside to c#.net with serialport.and i use serialport_datareceived(..) .i must get these datas in the c# arranged.but i cant get datas with sequence in the c#.how can i solve this problem?my code is this:i mean first data will be
value[1]=first data coming from outside.
value[2]=second data coming from outside
....
i wish i could explain my problem
private void myform_Loaded(object sender, EventArgs e)
{
seriport = new SerialPort();
seriport.DataReceived+=new SerialDataReceivedEventHandler(this.seriport_DataReceived);
seriport.PortName = "COM4";
seriport.DataBits = 8;
seriport.BaudRate = 9600;
seriport.Parity =System.IO.Ports.Parity.None;
seriport.StopBits = System.IO.Ports.StopBits.One;
seriport.ReceivedBytesThreshold =6;
seriport.ReadBufferSize =10000;
seriport.WriteBufferSize =10000;
if (seriport.IsOpen)
seriport.Close();
seriport.Open();
}
private void seriport_DataReceived(objectsender,SerialDataReceivedEventArgse)
{
byte[] values={0,0,0,0,0,0,0,0};
seriport.Read(values, 0, 6);
//icall my functioun here.
}
|
|
|
|
|
Is the data coming into the port delimited? Have you tried using seriport.ReadLine(), then parsing out the line?
|
|
|
|
|
i have 6 datas.and each of data between 0-255 (just one byte).if i use serialport.readline() so how can i separate my datas in visual c#?
for example my datas:
10
245
100
12
250
8
when i use serialport_readline() so how can i seperate these_another question is that will i get datas with arranged?
|
|
|
|
|
If you are not using a delmiting character, such as a comma or colon, then you would not be able to seperate the values. What does the string look like when it is sent to the port?
|
|
|
|
|
i use "putc(value)".i use microcontrolor.i use 6 times putc(value);
putc(value1);
putc(value2);
.
.
.
or i can use:
printf("%03u %03u "%03u %03u "%03u %03u ",value1,value2,...);
i must solve this problem.cause my greduation work must be finish
|
|
|
|
|
Can you insert a delimiter between the values using the printf? If so, then you can use ReadLine() on the serialport, and you would know that they are in the order you sent them. When you get the value, you can use .Split() on it, and put the values into a string array.
Somthing like this:
<br />
String[] data;<br />
data = seriport.ReadLine().Split(System.Convert.ToChar(":"));<br />
|
|
|
|
|
will i send ":" at the last of 6 values or between each of variable will be ":"
1)value1:value2:value3:value4:value5:value6: like this?
2)value1value2value3value4value5value6: or like this?
|
|
|
|
|
Like this: value1:value2:value3:value4:value5:value6
You dont need one after value6, but you'll need one in between each of the other values.
|
|
|
|
|
can i ask you different question?
when i programme goes to serialport_datareceived(..)
so how can i break this.and i want to call another function how can i do it?
|
|
|
|
|
I'm not sure I understand what you are asking. You should be able to call a function from with the data_recieved() function. Like this:
<br />
private void seriport_DataReceived(object sender, SerialDataReceivedEventArgs e)<br />
{<br />
string[] data;<br />
data = comport.ReadLine().Split(System.Convert.ToChar(":"));<br />
FunctionCall();<br />
}<br />
|
|
|
|
|
i mean that must i break this thread?i tried to write serial data in serialport_datareceived();function but i didnt do it.
must i use some "invoke" code and "break" like break codes?
|
|
|
|
|
Can you post the portion of the code you are having problems with?
|
|
|
|
|
i ll try did u write anything in this function?i mean did u try to write this data do textboxes in serialport_datareceived(..)?i tried but i didnt do it
|
|
|
|