|
hi all
i am a newbie to C# and i am trying to devlop a application for SENDING SMS through PC and i am trying to decode a application (myphoneexplorer) using portmonitor.
now i am in a portion of understanding the handling the setting of COMPORT.
this is the portmon result
IRP_MJ_CREATE Options: Open
IOCTL_SERIAL_SET_BAUD_RATE Rate: 921600
IOCTL_SERIAL_SET_LINE_CONTROL StopBits: 1 Parity: NONE WordLength: 8
IOCTL_SERIAL_SET_CHAR EOF ERR BRK EVT XON XOFF
IOCTL_SERIAL_SET_HANDFLOW Shake:1 Replace:40 XonLimit XoffLimit
IOCTL_SERIAL_SET_QUEUE_SIZE InSize: 16384 OutSize: 16384
IOCTL_SERIAL_SET_QUEUE_SIZE InSize: 16384 OutSize: 16384
IOCTL_SERIAL_SET_WAIT_MASK Mask: RXCHAR
IOCTL_SERIAL_SET_TIMEOUTS RI:20 RM:10 RC:2000 WM:10 WC:200
Can somebody guideon this explain the pasted content and how to set it through C#
Regards
Venkat.S
|
|
|
|
|
dear all
i am newbe with C#, i got a problem when i am debug, the issue is as following:
Error 2 The type 'UIS_Application.MainDialog' already contains a definition for 'toolBtnRun' C:\Documents and Settings\LI ZHIYUAN\Desktop\UIS Application\UIS Application\UIS Application\MainDialog.Designer.cs 555 54 UIS Application
how to solve this issu. thanks a lot.
|
|
|
|
|
So you declared toolBtnRun more than once. Use "Find in Files (entire project)" to locate the redundant one(s).
|
|
|
|
|
thanks sir, acutally i found already by this way, i couldn't find where i definded more than one. and moreever i couldn't display the "MainDialog GUI", when i double clicked the "maindialog" then the following dialog display and content is : object reference not set to an instances of an object. how to solve it. thanks
|
|
|
|
|
the object reference not set to an instances of an object refers to the fact that you have no
instance of MainDialog initialized.
Ex:
SomeClass sc;
sc.SomeProperty = "Blah";
would yield the same error message => object reference not set to an instances of an object
That is because the sc isn't initialized. In fact it's null. It references/points to nothing.
Needed sc = new SomeClass(); before using the reference.
I bug
|
|
|
|
|
thanks sir, i solved already according to your help.
here another problem for me, when i set the "maindialog" as topmost, however when i click the mnubutton to display a dialog, it can't be display outside, it displayed the behind the maindialog, if i set the maindialog as normal then it can display, however when i want to run my maindialog, i want it as topmost. how to display the other dialog outside the maindialog when i set maindialog as topmost. thanks a lot
|
|
|
|
|
Make it (the other form top most through code):
Form2 f = new Form2();
f.TopMost = true;
f.ShowDialog();
I bug
|
|
|
|
|
if you mean double-clicking a form in the solution pane leads to an exception, that must be because some of your code (including the default constructor) gets executed by Visual Designer and a fault of yours results in an Exception. You could always right-click the form, choose "View Code" and go look for the problem.
|
|
|
|
|
when eriting source code, how we can have Persistence block in C# text editor?
|
|
|
|
|
Do you mean reusing the same code again and again?
You could write your own code snippet[^].
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
when we create a block inside text editor, by pressing any key, that block disappears,
while existing block, if suddenly u press DEL key, content of that block get detroyed.
i dont want this, i want to have a block remain persist. pay attention i am talking only
about text editor not data manippulate or SQL server or....... just inside of text editor.
|
|
|
|
|
Write a Data Access Layer.
|
|
|
|
|
i'm trying to crate an AVI file using some screen shots as frames.but when starting the process it gives the the exception saying
"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
the application that i use to create the avi file is loaded to my application using reflection.what i do is just pass the frames to this loaded application.
any idea why this occurs.
thanx n advance..
|
|
|
|
|
because you took a wrong turn somewhere.
Member 4257632 wrote: using reflection
why?
|
|
|
|
|
This is my code
Note newNote = new Note();
Search newSearch = new Search();
SRLS newSRLS = new SRLS();
Alarm newAlarm = new Alarm();
QuickLaunch newQuickLaunch = new QuickLaunch();
Calender newCalender = new Calender();
Time newformtime = new Time();
private void Form1_Load(object sender, EventArgs e)
{
notifyIcon1.Visible = true;
if (timeToolStripMenuItem.Checked == true)
{
newformtime.Show();
}
if (alarmToolStripMenuItem.Checked == true)
{
newAlarm.Show();
}
if (calenderToolStripMenuItem.Checked == true)
{
newCalender.Show();
}
if (sRLSToolStripMenuItem.Checked == true)
{
newSRLS.Show();
}
if (searchToolStripMenuItem.Checked == true)
{
newSearch.Show();
}
if (noteToolStripMenuItem.Checked == true)
{
newNote.Show();
}
if (quickLaunchToolStripMenuItem.Checked == true)
{
newQuickLaunch.Show();
}
timeToolStripMenuItem.Checked = Settings.Default.timecheck;
alarmToolStripMenuItem.Checked = Settings.Default.calendercheck;
calenderToolStripMenuItem.Checked = Settings.Default.alarmcheck;
sRLSToolStripMenuItem.Checked = Settings.Default.srlscheck;
searchToolStripMenuItem.Checked = Settings.Default.searchcheck;
noteToolStripMenuItem.Checked = Settings.Default.notecheck;
quickLaunchToolStripMenuItem.Checked = Settings.Default.quickLaunchcheck;
}
So id some one checks the box then closes the program and then reopens it the other form should be visible can anyone see the problem in my code? coz I can't
|
|
|
|
|
Are you saving the checked states of the checkboxes anywhere?
|
|
|
|
|
Yeh when They press the button they save the box if its checked or not and that works, but it just doesn't open when the form1 loads
|
|
|
|
|
Where is the state saved? In the configuration file?
|
|
|
|
|
private void timeToolStripMenuItem_Click(object sender, EventArgs e)
{
((ToolStripMenuItem)sender).Checked ^= false;
Settings.Default["timecheck"] = timeToolStripMenuItem.Checked;
Settings.Default.Save();
}
private void calenderToolStripMenuItem_Click(object sender, EventArgs e)
{
((ToolStripMenuItem)sender).Checked ^= false;
Settings.Default["calendercheck"] = calenderToolStripMenuItem.Checked;
Settings.Default.Save();
}
private void alarmToolStripMenuItem_Click(object sender, EventArgs e)
{
((ToolStripMenuItem)sender).Checked ^= false;
Settings.Default["alarmcheck"] = alarmToolStripMenuItem.Checked;
Settings.Default.Save();
}
private void sRLSToolStripMenuItem_Click(object sender, EventArgs e)
{
((ToolStripMenuItem)sender).Checked ^= false;
Settings.Default["srlscheck"] = sRLSToolStripMenuItem.Checked;
Settings.Default.Save();
}
private void searchToolStripMenuItem_Click(object sender, EventArgs e)
{
((ToolStripMenuItem)sender).Checked ^= false;
Settings.Default["searchcheck"] = searchToolStripMenuItem.Checked;
Settings.Default.Save();
}
private void noteToolStripMenuItem_Click(object sender, EventArgs e)
{
((ToolStripMenuItem)sender).Checked ^= false;
Settings.Default["notecheck"] = noteToolStripMenuItem.Checked;
Settings.Default.Save();
}
private void quickLaunchToolStripMenuItem_Click(object sender, EventArgs e)
{
((ToolStripMenuItem)sender).Checked ^= false;
Settings.Default["quickLaunchcheck"] = quickLaunchToolStripMenuItem.Checked;
Settings.Default.Save();
}
|
|
|
|
|
So, on the form load, you should check the value of the setting and then check the appropriate check box and show the corresponding form.
You are checking the checked state of the checkboxes which will be unchecked by default on the form load.
|
|
|
|
|
Yay I fixed most of it!, but for some reason the code dose not work for the calender part
|
|
|
|
|
systemerror121 wrote: ((ToolStripMenuItem)sender).Checked ^= false;
And what is that supposed to do?
It's worse than that awful == true ..
|
|
|
|
|
alarmToolStripMenuItem.Checked = Settings.Default.calendercheck;
calenderToolStripMenuItem.Checked = Settings.Default.alarmcheck;
|
|
|
|
|
Copy - paste code is not confined to VB. The number of times I have done this is embarrassing, usually in TSQL where it is even more difficult to track down!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: Copy - paste code is not confined to VB.
That doesn't makes VB any better. It still sucks.
|
|
|
|