|
...
A problem I see
Too many syllables yours
but mine is correct
...
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
I have created a control which follows the mouse using MousePosition
However i would actually like the mouse value produced by the control to start at 0 at the top and left sides of my control and finish at 1000. at the bottom and the right sides of the control.
Does anyone know how i can do this?
Thanx in advance
|
|
|
|
|
I'm not sure what you mean, but I think you mean you want to do some basic primary school math to convert the width and height of the control to be a range from 0 to 1000 ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Yeah that is what i aim to do just don't really know how to implement this.
|
|
|
|
|
Thanx for the help.
I have created some code that works now dont know if this is the idea you thought but it functions correctly. Only the painted cross moves the same as the value ill just have to change this and it will be complete.
private int MAX_VALUE = 1000;
private int MIN_VALUE = 0;
private double m_WidthMultiplyNo = 0;
private double m_HeightMultiplyNo = 0;
public Point Origin
{
get { return m_origin; }
set
{
m_origin = calculateNewPosition(value);
if (PositionChanged != null)
{
this.PositionChanged();
}
}
}
private Point calculateNewPosition(Point Value)
{
if (Value.Y < m_position.Y)
{
if (Value.X > m_position.X)
{
Value.Y -= 1;
Value.X += 1;
}
else if (Value.X < m_position.X)
{
Value.Y -= 1;
Value.X -= 1;
}
}
else if (Value.Y > m_position.Y)
{
if (Value.X > m_position.X)
{
Value.Y += 1;
Value.X += 1;
}
else if (Value.X < m_position.X)
{
Value.Y += 1;
Value.X -= 1;
}
}
Value.X *= (int)m_WidthMultiplyNo;
Value.Y *= (int)m_HeightMultiplyNo;
Value = KeepInsideValue(Value);
return Value;
}
|
|
|
|
|
i have a grid view with a column of integer values
problem is that i want to add the values in the columns and display it in textbox
thanks in advance
|
|
|
|
|
This would involve writing code. What have you written, anything ? It's trivial, you just iterate over the rows, and read the columns. In fact, you could just iterate over the data source, if it's data bound.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi,
I am writing an outlook Addin which shows a panel on the explorer window of Outlook.
The Panel shows some details regarding the sender of the Email. My user control "TaskPaneControl" has a panel along with some other controls. My code is as below.
<br />
Microsoft.Office.Tools.CustomTaskPane taskPane;<br />
Microsoft.Office.Interop.Outlook.Application applicationObject;<br />
Outlook.Explorer explorer;<br />
<br />
private void ThisAddIn_Startup(object sender, System.EventArgs e)<br />
{<br />
explorer = this.Application.ActiveExplorer();<br />
<br />
explorer.SelectionChange += new ExplorerEvents_10_SelectionChangeEventHandler(activeExplorer_SelectionChange);<br />
}<br />
<br />
void activeExplorer_SelectionChange()<br />
{ <br />
<br />
if (taskPane == null)<br />
{<br />
taskPane = Globals.ThisAddIn.CustomTaskPanes.Add(<br />
new TaskPaneControl(), "Sender Details", explorer);<br />
taskPane.Visible = true;<br />
taskPane.Width = 245;<br />
return;<br />
}<br />
<br />
if (taskPane != null)<br />
{<br />
Microsoft.Office.Interop.Outlook.Selection selection = explorer.Selection;<br />
<br />
if (selection.Count == 1 && selection[1] is Microsoft.Office.Interop.Outlook.MailItem)<br />
{<br />
Microsoft.Office.Interop.Outlook.MailItem mailitem = (Microsoft.Office.Interop.Outlook.MailItem)selection[1];<br />
<br />
TaskPaneControl ct = new TaskPaneControl();<br />
<br />
ct.ShowEmailDetails(mailitem); <br />
} <br />
}<br />
}
The problem here is, on change of Email in the inbox, activeExplorer_SelectionChange method gets executed but the taskpane will not be refreshed.
Please let me know how to refresh the Task pane Contol.
Thanks in advance.
|
|
|
|
|
Hi All,
I want to calculate the bandwidth used by Internet explorer for each domain(google,yahoo,aol,etc). The number of bytes received and sent for each domain need to be calculated. Solutions can be c# as well as in VC++.
Thanks in Advance...
|
|
|
|
|
Jeyakumarbics1 wrote: Solutions can be c# as well as in VC++.
Thats very kind of you, in return I'll allow you to code this yourself.
|
|
|
|
|
|
Jeyakumarbics1 wrote: Solutions can be c# as well as in VC++.
Well then, you must be looking for the Visual Studio Express editions.
|
|
|
|
|
This would require that you write a proxy server to track this kind of information. You'd point the browser at the proxy and the proxy would retrieve the pages for the browser. This gives you the capability to track every byte that goes through the proxy.
|
|
|
|
|
i heard about this Technology 'BHO' at once,
but i had no chance to use it. if you really want to control 'Internet explorer', consider using it.
BHO is a simple ATL COM object that Internet Explorer will load each time it runs; in other words, for every instance of Internet Explorer. BHOs run in Internet Explorer's address space and can perform any operation on available objects (windows, modules, and so forth). BHOs instantiate and get destructed with a browser's instance because it is tied to a browser's main window.
If your system has an active desktop enabled, the BHO gets instantiated along with Windows Explorer as well
modified 27-May-14 5:33am.
|
|
|
|
|
Hi All,
I want to control over Internet Explorer's upload and download events. Upload and download should happen only for allowed file types. And the file type need to be identified based on the file MIME type. Policy is set for each user. Based on the policy upload and download should happen. Can anybody help me?
Sample Policy:
Allowed URL: www.gmail.com
UPload: jpg,gif,zip,doc
Download : rar,xls,doc
Allowed URL : www.yahoo.com
Upload : .txt
Download : .xls
Solution can be either in VC++ or C#. Any suggestion is appreciated.
modified on Wednesday, September 16, 2009 7:04 AM
|
|
|
|
|
Jeyakumarbics1 wrote: Solution can be either in VC++ or C#. Any suggestion is appreciated.
I suggest you start your work.
|
|
|
|
|
There are no events for this.
Again, you'd write a proxy server to control this kind of stuff.
|
|
|
|
|
|
I think WPF is your best bet, but either way, you need to write something, obviously.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
and well, the problem is I don't have a single idea about how to implement that
|
|
|
|
|
finally I ve come up with using unmanaged code from user32.dll
something starts to work right
|
|
|
|
|
1) you should get the screen size(width, height)
2) you should get your window's size;
3) set you window's left location;
// may be this way
this.left = screen.width - this width;
1) when your mouse touches it. it show, or hide;
consider 'mousemove' Event or 'mouseHover' 'mouseLeave' Event.
and if you want to show slowly, you can use 'Timer' or create a 'Thread' to do it.
it's very easy. just think about it.
modified 27-May-14 5:34am.
|
|
|
|
|
hello
I want to change default size of paper in printpreview from A4 to A5,A3 with landscape vertical and horizontal...
can i do this?how?
please help me...
|
|
|
|
|
|
it's not very hard.
//
// key code
//
private System.Drawing.Printing.PrintDocument pd;
.....
.....
// set size and type
this.pd.DefaultPageSettings.PaperSize=new System.Drawing.Printing.PaperSize("A4",800,1100);
..
..
..
modified 27-May-14 5:34am.
|
|
|
|