MSDN Magazine December 2002
View Complete Post
I know how to change to a custom cusor or visual instead of a standard cursor during drag and drop operations. I know how to get the current mouse position during drag and drop methods (often there is a GetPosition method, or alternatively I can use
p/invoke or System.Windows.Forms.Cursor.MousePosition getter).
My question is, how can I (or is it not possible) to change the mouse position programmatically during the drag/drop operation, ideally just before the drop occurs so that items are dropped at the point of the programmatically set cursor position?
I tried to to use the System.Windows.Forms.Position setter and SetCursorPos both in the source's PreviewQueryContinueDrag handler and the target's PreviewDrop handler but neither affected the position of where the items were dropped. In the case of
PreviewQueryContinueDrag, the mouse visually moved to the programmatic location
after the items were dropped, even though the PreviewQueryContinueDrag handler was called before the item was dropped (and before PreviewDrop).
After login, i have create a session to display the Username of the logged user, however instead of display the Username, i want to display the Full_Name of the logged user
However i have no idea how it dones....Kindly if you could help me in giving suggestion / ideas. Thank you.
P_ID (PK) =1
Full_Name = Lucy
Login.aspx - as i do session, it will display lucy88 however i would like to display Full_Name which is Lucy.
protected void Button1_Click(object sender, EventArgs e)
SqlDataSource sds = new SqlDataSource();
sds.ConnectionString = ConfigurationManager.ConnectionStrings["MyDB"].ToString();
sds.SelectParameters.Add("Username", TypeCode.String, this.TextBox1.Text);
sds.SelectParameters.Add("Password", TypeCode.String, this.TextBox2.Text);
sds.SelectCommand = " SELECT * FROM [PersonUser] WHERE [Username] = @Username AND [Password] = @Password";
DataView dv = (DataView)sds.Select(DataSourceSelectArguments.Empty);
I'm enhancing the behaviour of out of the box WF designer drag/drop experience. One of the things I'm trying to do (in part) is when a toolbox item is drag over an existing activity designer and then dropped, I want the toolbox item's activity to
be dropped close to the activity designer on which it was to be dropped, but not directly on top of the designer.
To accomplish this, I detect when a drop operation is about to occur and then I attempt to move the cursor position next to the activity designer. The problem I'm having is moving the cursor during the drop operation. I've tried various ways
to do this programmatically, but nothing seems to work. Or, perhaps it is getting moved but then the workflow designer (and in particular the flowchart designer) does something special with mouse position or otherwise ignores it.
I started out posting this question on the
WPF forum, but now I'm beginning to wonder if perhaps there is something unique to the WF/flowchart designer that's causing the mouse not to move (or to move back to the original position perhaps) rather than a general issue with moving the mouse
during drag/drop operations.
Can anyone provide any guidance?
well cannot we display an image as a full coverpage so that there will not left any margins .
what we have to do inorder to display a whole image as a coverpage.
i just need to display some company image as a coverpage and i have remove a header n footer from coverpage also but still there is some margin left out so how can i rewmove it ..
help me out soon.
With VS2008, I have created a Canvas in a ScrollViewer, in which I place an Image which I overlay with Buttons and StackPanels. This far, everything works as I'd want to, but my next challenge is to implement a drag-move behavior where the user can click
on the Image and drag it in every direction. I figured out how I should move just the Image, but the problem is that the Buttons and StackPanels stay in place, where I really want them to be moved with Image as well. Trying to convert the drag-the-Image-method
to a sort of drag-the-Canvas one did not work out for me.
So my layout is structured like this:
Hi i have page where i am calling user control, on user control i want to give button when i click button same user control should appear on popup screen
but not able to do , here code
void Page_PreRender(object sender, EventArgs e)//some value set as hard coded
string defLayer = "1";//Build the params to be passed to gdd xaml file.
I need to move the location of the SQLFT text log files from it's current location %ProgramFiles%\Microsoft
SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\LOG folder to another larger drive to accomodate the log file growth. I cannot find anything on how to make this change. Does anyone have an answer? I have found this is a default at
install - but during install did not find how to change this.
Please take a look my full code below for Page1.aspx and Page2.aspx. My code is working but have problem at Page2.aspx only for menu “See Div2 at Page1.aspx”. Because when the user at Page2.aspx and click menu “See Div2 at Page1.aspx”, the user will see Div1 at Page1.aspx (not see Div2).
I need your advice to solve this simple example. I am using VS 2008. Thanks.
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Page1.aspx.vb" Inherits="MyExample_MovingDivAndPage_Page1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">