|
dll is not my one it is made by someone else. I just downloaded it from internet & import methods using definition givin in doccument.
Divyang Mithaiwala
|
|
|
|
|
I created a local web proxy server running on my PDA in order to browsing web pages locally without network connection.
I must tick "This Network uses a proxy server to connect to the Internet" and set up the "Proxy Server" in Settings/My Work Network on the PDA. after that, My local web proxy server can receive the request from Pocket IE.
However, after that, the Web Services Request (HTTP+SOAP) sent by calling the web services from my local web server (I created) will be directed into my local proxy server but not go to the requested remote server.
I have tried to use some methods such as GetEmptyWebProxy.. but they didn't work..
Does anyone know HOW to solve this problem
thanks
|
|
|
|
|
This might not be relevant, but I have never been able to get WebServices working via my local proxy (FreeProxy).
DarrenHuang2005 wrote: I have tried to use some methods such as GetEmptyWebProxy.. but they didn't work..
Did you properly assign that to the generated webservice class?
|
|
|
|
|
I'm using DataView to sort my dataset. Once a user sorts the data I want to reset it back to show all records. Whats the right way to do this? I'm using the RowFilter property to sort the dataview.
Thanks
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
Hello,
You can set DataView.RowFilter property to string.Empty to view all records in the table.
RowFilter property is used to filter the records. You can using Sort property of DataView to sort the data.
HTH. Cheers.
Maqsood Ahmed - MCAD.net
Kolachi Advanced Technologies
http://www.kolachi.net
|
|
|
|
|
Im having problems getting my binding navigation to scroll throu the results of my data set. I have already confirmed that the dataset is being populated properly but cannot assoicate it properly.
----------------------------------
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;
//General Declarations
string dctsConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\\dctsDB.mdb;Persist Security Info=True";
string sqlSelectString = "SELECT * FROM DCTs";
private void Form1_Load(object sender, EventArgs e)
{
//create connection to access database
OleDbConnection myConnection = new OleDbConnection(dctsConnectionString);
//create adapter to perform select
OleDbDataAdapter myAdapter = new OleDbDataAdapter(sqlSelectString, myConnection);
//create dataset from existing dataset object
dctsDBDataSet myDataSet = new dctsDBDataSet();
//fill the data set with informaion from the dct's table
myAdapter.Fill(myDataSet, "DCTs");
bindingSource1.DataSource = myDataSet;
bindingNavigator1.BindingSource = bindingSource1;
}
James M
Network Analyst
Shaw Cable
|
|
|
|
|
If your talking about navigating thru your records in the dataset, then take a look at the currencymanager.
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
In .NET manual, AutoResetEvent.WaitOne() is
[C#]
public virtual bool WaitOne();
My question are :
1.In what case will "false" be returned?
2.Is it necessary to look at the return value of WaitOne?
Thnak you!
|
|
|
|
|
bool WaitOne() is true if the current instance receives a signal. It will never be false since it won't return if it is unsignaled.
|
|
|
|
|
Thank you for your reply.
I have also checked a lot these days, and come to the same conclusion
Would tell me if there are some difference between using AutoResetEvent' WaitOne/Set in forground-thread (started by Thread.Start() )and background thread(started by BeginInvoke()).
I have a problem that WaitOne() returned before it is Set() at another thread. As it happens not so frequently, I still don't know the reason.
I my app, except for the main thread, all threads are started by BeginInvoke.
Thnak you!
-- modified at 2:07 Thursday 30th March, 2006
|
|
|
|
|
Bob_Sun wrote: Would tell me if there are some difference between using AutoResetEvent' WaitOne/Set in forground-thread (started by Thread.Start() )and background thread(started by BeginInvoke()).
I believe there is no difference.
Anyway, you need to initialize the AutoResetEvent as unsignaled before using it:
AutoResetEvent are = new AutoResetEvent(false);
It also needs to be in the same scope as the thread waiting for the signal.
|
|
|
|
|
I am trying to access a dynamically created control ( a tabpage ) with the following code:
((ListView)this.tabControl1.TabPages[1].Controls[1]).Items.Add("HELLO");
I am getting an error:
Specified cast is not valid.
What am I doing wrong?
Thanks,
Jon
|
|
|
|
|
I guess that control is not a listview. You should really iterate through the controls collection for hte tab page and find the list view you want rather than relying on indexes that can change.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have made a custom TabControl derived from Panel, custom TabPage derived form Panel, and TabPageCollection dervived from CollectionBase class. The CollectionEditor will successfully serialize the custom TabPages that are added. However when the custom TabControl is removed/deleted from a form the custom TabPage code that was added by the CollectionEditor is not removed from the forms InitalizeComponent().
When the CollectionEditor Remove button is used the serialized code is removed from InitializeCompnent() so I don't understand why it would not be removed when the custom TabControl is deleted.
I also found out that if the custom TabPage does not derive from anything then the code will be removed when the control is deleted.
So this is my situation, I am very confused and have asked this question on several forums with not effective responses.
Do I need to implement some type of TypeConverter or override some method that is derived from a WindowsForm control?
Any help or lead way will be greatly appreciated! I have been having no luck for the past week. Thank you very much for any help.
|
|
|
|
|
hi
i want to create a rectangle and move it from left to right ( x++ ) and rotate around it's center . how to do that ?
my code is here but i don't get true result :
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Button button1;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Timer timer1;
private System.ComponentModel.IContainer components;
Pen m_pen;
int X;
int Y;
int Width1;
int Height1;
int angle;
float f;
string path;
PointF _pointf;
Bitmap bm;
Graphics gr;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Label label1;
Matrix mat = new Matrix();
public Form1()
{
InitializeComponent();
m_pen = new Pen(Color.Red,4);
X = 200;
Y = 100;
Width1 = 100;
Height1 = 100;
angle = 0;
path = @"CB047003.jpg";
bm = new Bitmap(path);
f = 250;
_pointf = new PointF(f,150);
this.SetStyle(ControlStyles.DoubleBuffer,true);
this.SetStyle(ControlStyles.UserPaint,true);
this.SetStyle(ControlStyles.AllPaintingInWmPaint,true);
}
private void RedrawPicture(object sender, System.EventArgs e)
{
pictureBox1.CreateGraphics().Clear(pictureBox1.BackColor);
pictureBox1.Refresh();
gr = pictureBox1.CreateGraphics();
gr.SmoothingMode = SmoothingMode.AntiAlias;
gr.InterpolationMode = InterpolationMode.HighQualityBilinear;
SolidBrush brush = new SolidBrush(Color.Yellow);
mat.RotateAt(angle,_pointf);
gr.Transform = mat;
gr.DrawRectangle(m_pen,X,Y,Width1,Height1);
gr.FillRectangle(brush,X,Y,Width1,Height1);
label1.Text = "Position : "+angle.ToString();
gr.Dispose();
}
private void timer1_Tick(object sender, System.EventArgs e)
{
if(X == pictureBox1.ClientSize.Width - 105)
{
timer1.Stop();
}
else
{
if(angle == 360)
angle = 0;
X += 5;
angle += 1;
f += 5;
RedrawPicture(this,new System.EventArgs());
}
}
|
|
|
|
|
Changing f won't change _pointf automatically.
---
b { font-weight: normal; }
|
|
|
|
|
Hello, may be some of you could help me. I have a winform with FormBorderStyle asigned to None (I need it in that way), and an AXWebBrowser with Dock asigned to Fill. My problem is that the MouseEnter event for the winform only work if I have a part of it visible, but in this case I must have the webbroser filling all the winform, so the event MouseEnter never work. And the webbrowser doen't have a MouseEnter event, so I can't call that event too. I need the event for enter and leaving.
I try:
((Control)this.browser).MouseEnter += new System.EventHandler(this.AlertWindow_MouseEnter);
But doesn't work !!!
Any ideas??
Thansk a lot.
|
|
|
|
|
You could try finding the coordinates of the form and then see if the mouse is within range(this is what MouseEnter does.)
|
|
|
|
|
I haven't try that, but I want to do it through events.
Thanks very much ExpertComing. If you have some other idea it will be welcome, thanks a lot.
|
|
|
|
|
Make your own event that does the MouseEnter event's job.
|
|
|
|
|
Cuold you give me an example of that please?
Thanks a lot Expertoming !!
|
|
|
|
|
Cuold you give me an example of that please?.
Thanks a lot Expertoming !!
|
|
|
|
|
I posted a similar question a while back but wasnt able to find a solution. The issue I'm seeing is bizzare and yet there is no documentation of this in .Net.
Background: A control has "Visible" property and "VisibleChanged" event. This even is fired whenever the control is no longer "Visible".
Problem: I get the VisibleChanged event when I programmatically set a value for the "Visible" property. However, I do NOT get the "VisibleChnaged" event when the control becomes invisible when the tab page it is on is no longer the selected tab page. When the control is no longer "displayed" (e.g. not visible implicitely) the "Visible" property returns "false" but there is no event.
Stpes:
1) Create a form -- Form1 with a TabControl (tabControl1) and two tab pages (tabPage1, tabPage2).
2) On the tabPage1, add a control (button - b1) and add a b1_VisibleChanged handler. In the b1_VisibleChange method, write the following: "this.Text = b1.Visible.ToString(); " .
3) Add another button on Form1, b2 on the form which is for toggeling the visible property and add the following code for the b2_Click handler: "b1.Visible = !b1.Visible; "
4) Add another button on Form1, b3 on the form which displays the value of the Visible property of button b1. Add the following code in the b3_Click handler: "MessageBox.Show(b1.Visible.ToString()); "
Testing:
Make sure tabPage1 is selected and button b1 is being displayed.
Click on b3: it will show "true" message.
Click on b2: it will hide b1. The Form1 title will display "False".
Click on b3: it will show "false" message.
Click on b2 again: it will show b1. The Form1 title will display "True".
Now switch to tabPage2.
Click on b3: it will show "false" message. However, the Form1 title is still "true" implying that "b1_VisibleChanged" was never triggered.
Is there a way to assure a consistant behavior for VisibleChnaged?
Thanks for your help / suggestions.
- Malhar
|
|
|
|
|
I'm writing a service that copies specific MS Office documents(.doc, .xls,.mdb) after any event triggers a file system watcher (Change, Deleted, Renamed, Changed) and logs those file operations to a xml file. In order to copy those files to a hidden folder located in the user's My Documents Folder I was using in my windows form testing environment
Environment.GetFolderPath(Environment.SpecialFolder.Personal) and it worked perfectly and in order to determine the logged user I was using WindowsIdentity.GetCurrent().Name and when I tryied using them in the Windows Service code none of them worked as expected, Environment.GetFolderPath(Environment.SpecialFolder.Personal) returns nothing at all and WindowsIdentity.GetCurrent().Name returns the account name that the windows service is using.
Is there any way in which I can accomplish the recolection of this information using perhaps
another class or some other way of calling the class?
Thanks in advance, Mario
|
|
|
|
|
Hi all.
Please help me out with this.
What i am doing is that, in a small form i am displaying the current time. To keep it updated, i am using a timer and calling Invalidate on the form, after every 1000 ms, to paint the surface clean for me.
Now the problem is that, the time does not display at all. It sometimes appears, but for such a short duration that it is hardly visible.
Here's what i am doing:
class MyClock
{
.....
public MyClock()
{
m_timer = new System.Windows.Forms.Timer();
m_timer.Interval = 1000;
m_timer.Tick += new EventHandler(Start);
m_timer.Start();
}
private static void Start(Object o, EventArgs e)
{
m_timer.Stop();
m_form.Invalidate(true);
m_time = DateTime.Now;
string time = m_time.Hour + ":" + m_time.Minute + ":" + m_time.Second;
Brush b = Brushes.White;
m_gFormGraphic.DrawString(time, new Font("Verdana", 15), b, new PointF(20, 40));
m_timer.Start();
}
.....
}
I tried adding handlers for Validating and Validated, where i set a boolean variable and display the time only when the form has been validated. But this doesnt work too.
Any pointers will be highly appreciated.
Thanks in advance.
*** Who said nothing is impossible? I have been doing it for a long time ***
-- modified at 13:56 Wednesday 29th March, 2006
|
|
|
|