|
I had a small application of BHO of c#. I used to do all the things on browser when ever DoCumentcomplete Events gets fired.
I want the browser content not to visible to user intially for sometime (eg., for 1 or 2seconds). How can I do this using c#?
|
|
|
|
|
Hi I had an application of c# which is developed in visual studio 2005, It had been doing well, I had made total into a msi setup.
I want this setup should be valid for some period (eg., for 30days) from the installation date.
How can I lock the code?
|
|
|
|
|
My GPS application can detect not only a Bluetooth GPS receiver but also a GPS/GSM Micro Tracker(it was connected to my application via TCP). I have to send SMS command and it reply back the GPS data(NMEA data - $GPRMC). The problem is that the application can display GPS data($GPGGA) from the Bluetooth GPS receiver but it can't display the data from the gsm machine. Whenever I send sms, I receive back the GPRMC data and I can show it in my textbox but I can't display it on my VE map. The following problem occurs. Thanks in advance. Regards.
http://img172.imagevenue.com/img.php?image=81285_problem2_122_505lo.JPG
The followings are some of my codes.
private void ProcessNMEAData(string data)
{
string[] NMEALine = data.Split('$');
string[] NMEAType;
for (int i = 0; i < NMEALine.Length; i++)
{
NMEAType = NMEALine[i].Split(',');
switch (NMEAType[0])
{
case "GPGGA":
ProcessGPGGA(NMEAType);
break;
case "GPGLL":
break;
case "GPGSA":
break;
case "GPGSV":
break;
case "GPRMC":
ProcessGPRMC(NMEAType);
break;
case "GPVTG":
break;
}
}
}
private void ProcessGPRMC(string[] data)
{
double lat, lon;
double rawLatLong;
rawLatLong = double.Parse(data[3].Replace(":00", ""));
lat = ((int)(rawLatLong / 100)) + ((rawLatLong - (((int)(rawLatLong / 100)) * 100)) / 60);
if (data[4] == "S")
lat *= -1;
rawLatLong = double.Parse(data[5].Replace(":00", ""));
lon = ((int)(rawLatLong / 100)) + ((rawLatLong - (((int)(rawLatLong / 100)) * 100)) / 60);
if (data[6] == "W")
lon *= -1;
if (internetConnected && !loadingFile)
{
StringBuilder sb = new StringBuilder();
sb.AppendFormat("<div>Latitude: {0}<br/>Longitude: {1}<br/>Speed: {2}</div>", lat, lon, data[7]);
AddPushpin(lat, lon, sb.ToString());
}
else if (loadingFile)
{
object[] param = new object[] { lat, lon };
webBrowser1.Document.InvokeScript("AddPoint", param);
}
}
|
|
|
|
|
Hi,
any idea about how to convert excel to pdf using any free printer driver in vb.net
|
|
|
|
|
In a c# forum. I bet you cross posted as well?
Try this[^]
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi,
in an application i used a trackbar to set input values to an output channel.
The arrow keys left right works fine, the arrow keys left decrement right increment the value.
But the arrow key up decrement and the arrow key down increment the value ??
with the key page up also decrements and the key down increments the value too ?
How could i fix this problem , so that arrow key up increments and arrow keys down decrements,
also the page up down ?
|
|
|
|
|
It's only a bug if you attribute "Up" to increasing the value and "Down" to decreasing it. If you turn the TrackBar vertical, the keys are correct. Visually, it's a bit backwards to reverse the keys.
You can create you're own TrackBar class by inheriting from TrackBar, then override the OnKeyDown method. Check for the appropriate keys and handle the Value of the trackbar yourself, skipping sending the keys to the base OnKeyDown method.
|
|
|
|
|
Hi, thanks for the answer,
i've created my own class, but if the code is running, nothing happens, because
if i press arrow up or down, this.value will correct set, but the control self set's
the value too (so he made the opposite and the control value is allways the same ) !!
Why ? i didnt call the base.OnKeyDown.
public class myTrackbar : TrackBar
{
protected override void OnKeyDown(KeyEventArgs e)
{
if(e.KeyCode == Keys.Up)
{
int delta = this.SmallChange;
this.Value += delta;
}
else if (e.KeyCode == Keys.Down)
{
int delta = this.SmallChange;
this.Value -= delta;
}
}
}
|
|
|
|
|
I want to put datalabels and legendkeys in powerpoint using c#. how to achieve this? here is the code below
private void button1_Click(object sender, EventArgs e)
{
String strTemplate;
strTemplate =
"C:\\Program Files\\Microsoft Office\\Templates\\Presentation Designs\\Blends.pot";
PowerPoint.Application objApp;
PowerPoint.Presentations objPresSet;
PowerPoint._Presentation objPres;
PowerPoint.Slides objSlides;
PowerPoint._Slide objSlide;
PowerPoint.TextRange objTextRng;
Graph.Chart objChart;
Graph.DataSheet dataSheet;
//Create a new presentation based on a template.
objApp = new PowerPoint.Application();
objApp.Visible = MsoTriState.msoTrue;
objPresSet = objApp.Presentations;
objPres = objPresSet.Open(strTemplate,
MsoTriState.msoFalse, MsoTriState.msoTrue, MsoTriState.msoTrue);
objSlides = objPres.Slides;
objSlide = objSlides.Add(1, PowerPoint.PpSlideLayout.ppLayoutTitleOnly);
objTextRng = objSlide.Shapes[1].TextFrame.TextRange;
objTextRng.Text = "My Chart";
objTextRng.Font.Name = "Comic Sans MS";
objTextRng.Font.Size = 48;
objChart = (Graph.Chart)objSlide.Shapes.AddOLEObject(150, 150, 480, 320,
"MSGraph.Chart.8", "", MsoTriState.msoFalse, "", 0, "",
MsoTriState.msoFalse).OLEFormat.Object;
dataSheet = objChart.Application.DataSheet;
dataSheet.Cells[1, 2] = "abc";
dataSheet.Cells[2, 2] = "50";
dataSheet.Cells[2, 3] = "40";
dataSheet.Cells[2, 4] = "50";
dataSheet.Cells[2, 5] = "50";
dataSheet.Cells[3, 2] = "60";
dataSheet.Cells[3, 3] = "70";
dataSheet.Cells[3, 4] = "80";
dataSheet.Cells[3, 5] = "60";
dataSheet.Cells[4, 2] = "50";
dataSheet.Cells[4, 3] = "40";
dataSheet.Cells[4, 4] = "50";
dataSheet.Cells[4, 5] = "50";
objChart.Application.Update();
objChart.Legend.Position = Graph.XlLegendPosition.xlLegendPositionBottom;
objChart.HasTitle = true;
objChart.ChartTitle.Text = "Here it is...";
objPres.SaveAs("C:\\abc.ppt", PowerPoint.PpSaveAsFileType.ppSaveAsPresentation, MsoTriState.msoTrue);
objPres.Close();
objApp.Quit();
}
|
|
|
|
|
Can any 1 tel me how to start working with VOIP..
what should be the 1st step
1st i hv to Make a Simple TAPI Audio Conferencing or something else i hv to start with
Kindly Guide me so that i can Start the Project
|
|
|
|
|
Do some research, read some articles. I found this[^] using Google, it may be more than you are looking for but it should help.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
how to get number of tables in a database (MS Access)using query
|
|
|
|
|
Don't cross post. See the database forum
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
i wrote the code for progress bar. but i want o pop up my progress bar some thing like message box while progressing. how can i do pop up progress bar in a msg box....
ProgressBar ProBar = new ProgressBar();
private void import(object sender, EventArgs e)
{
if (listView1.Items.Count == 0)
{
this.ProBar = new System.Windows.Forms.ProgressBar();
this.ProBar.TabIndex = 0;
this.ProBar.Maximum = dlg.FileNames.Length;
this.ProBar.Minimum = 1;
this.ProBar.Step = 1;
foreach (string path in dlg.FileNames)
{
FileInfo fileInfo = new FileInfo(path);
listView1.Items.Add(path);
imageList.Images.Add(Bitmap.FromFile(path));
ProBar.PerformStep();
A S E L A
|
|
|
|
|
Create a new form, put the progress bar on that and show the form.
|
|
|
|
|
hi...thx...please can just explane bit more...thx
A S E L A
|
|
|
|
|
Come on! How hard is it to add a new Form to your project, then drag a ProgressBar from the ToolBox and drop it on the Form??
|
|
|
|
|
Hi,
I am trying to build a Network Printer Monitor. I found few softwares available for the same.
I need a print monitor component like dll or user control so that I can use it my application.
Or is there any development kit/API available for it?
Any suggestion?
Thanks,
|
|
|
|
|
Rather than re-invent the wheel, try the printer manufacturer?
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
|
|
|
|
|
Hi,
Could you please anyone tell me how to listen to a network printer?
|
|
|
|
|
What is that you want to do ? Can you explain it clearly?
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
Walk up to it and rest your head against it??
Seriously, how is anyone supposed to answer that question?
What is it you're trying to do by "listening to a network printer"???
|
|
|
|
|
Hello,
I want to search a set of directories that are organized by "LastName FirstName". However, the number of spaces between each name might vary (most only have 1 space, but some have 2 or 3 b/c of a typo). The only search pattern I know of to accommodate this is "LastName*FirstName", but I'd rather use some regex like "LastName[ ]+FirstName", that only allows spaces between the names. Is this possible, or would I just have to get all directories and manually evaluate the regex on each one?
Thanks,
Dybs
|
|
|
|
|
You have to get the list of files and RegEx each one yourself to find the matches. The search options in the GetFiles methods, or whatever else you use, do not support RegEx expressions and there is no search option that will only match "any number of spaces".
|
|
|
|
|
Dave,
I thought as much, but wanted to confirm. Thanks.
Dybs
|
|
|
|
|