我ToolTip在我的表单上使用了一个控件,但是发现即使我的光标在一个控件上,工具提示也显示在其他地方.我想在我的光标所在的控件内显示这个.

如上图所示,当我的光标结束时Textbox3,工具提示正在显示Textbox4.我希望它显示指向Textbox3.
我目前正在使用以下代码在3个不同的事件中显示工具提示:
private void txtImmediateddest_Enter(object sender, EventArgs e)
{
ttpDetail.Show("Ex:111000025", txtImmediateddest);
}
private void txtImmediateddest_MouseHover(object sender, EventArgs e)
{
ttpDetail.Show("Ex:111000025", txtImmediateddest);
}
private void txtImmediateddest_MouseUp(object sender, MouseEventArgs e)
{
ttpDetail.Show("Ex:111000025", txtImmediateddest, e.Location);
//toolTipimmeddest.Show("Required & Must be 9 Digits", txtImmediateddest);
}
Run Code Online (Sandbox Code Playgroud)
编辑
private void textBox1_MouseHover(object sender, EventArgs e)
{
ttpDetail.AutoPopDelay = 2000;
ttpDetail.InitialDelay = 1000;
ttpDetail.ReshowDelay = 500;
ttpDetail.IsBalloon = true;
//ttpDetail.SetToolTip(textBox1, "Ex:01(Should be Numeric)");
ttpDetail.Show("Ex : 01(Should Be Numeric)", textBox1,textBox1.Width, textBox1.Height/10,5000); …Run Code Online (Sandbox Code Playgroud) 我正在使用SQL Server 2005.
我正在将数据从当前数据库(单个表)迁移到新数据库(规范化 - 许多表).在新数据库中,我有一个基表(我们称之为"BaseTable"),以及其他多个表(让我们调用它们"DependentA",和"DependentB").旧数据库中的一些数据将转到BaseTable,而另一些将转到另外两个.BaseTable与DependentA和DependentB都有一对一的关系,使用它们的Id作为外键.
所以这是我的问题.我应该如何迁移数据?这是我一直在尝试的一个查询,除了一件事之外它是有效的:BaseTable中的其他两个外键是相同的,而不是每个都有不同的.
Begin SQL:
BEGIN TRANSACTION
DECLARE @dep1Id int
DECLARE @dep2Id int
INSERT INTO DependentA (column1, column2)
SELECT c1, c2
FROM OldDatabase.OldTable
SELECT @dep1Id = Scope_Identity()
INSERT INTO DependentB (column3, column4)
SELECT c3, c4
FROM OldDatabase.OldTable
SELECT @dep2Id = Scope_Identity()
INSERT INTO BaseTable (column5, dependentTable1Id, dependentTablr2Id)
SELECT c5, @dep1Id, @dep2Id
FROM OldDatabase.OldTable
COMMIT
Run Code Online (Sandbox Code Playgroud) 我已经完成了一个代码,用于在用户单击控件时禁用控件.在我的表格上我有一个TextBox和一个DropDown.当用户点击一个TextBox我会disable在DropDown这样的当点击DropDown我将禁止TextBox其工作正常.
但是当用户点击Disabled控件时我想启用该控件.意味着如果我点击TextBox哪个被禁用我想Enable它也喜欢它dropdown...
我的示例脚本如下
<script type="text/javascript">
function toggleDropDownList1()
{
var d=document.getElementById("<%= DropDownList4.ClientID %>");
if(d.disabled)
{
d.disabled=false;
}
else
{
document.getElementById("<%= TextBox1.ClientID %>").disabled = true;
}
}
function toggleDropDownList2()
{
document.getElementById("<%= DropDownList4.ClientID %>").disabled = true;
}
</script>
Run Code Online (Sandbox Code Playgroud)
设计
<asp:TextBox ID="TextBox1" runat="server" onclick="toggleDropDownList2();"></asp:TextBox>
<asp:DropDownList ID="DropDownList4" runat="server" onclick="toggleDropDownList1();">
<asp:ListItem Text="One" Value="1"></asp:ListItem>
<asp:ListItem Text="One" Value="1"></asp:ListItem>
</asp:DropDownList>
Run Code Online (Sandbox Code Playgroud) 我将为树视图提供某种节点,如下所示
Root | - > some.txt(在运行时添加的文本文件)| - > Child(some.txt的子项)| - > child1(child for child)
我设计了我的上下文菜单,其中包含一些选项,如New和Remove
我需要的是当我righclick Root,孩子或孩子我想要禁用删除选项
我有一个树视图,根节点最初为Root.如果我右键单击Root节点,我将显示一个上下文菜单,其中一些选项为New和other,如果我选择New,我将向Root节点添加一个子节点.如果我再次右键单击Root节点,如果Root有子节点我想清除所有子节点并添加一个新的子节点我该怎么做呢
我如何使用Rupee符号Silverlight可以任何人告诉如何实现这一点
可能重复:
检索每个组中的最后一条记录
大家好我有我的表数据如下
ID FedTaxID RegularPay Payperiodnumber
1 562545366 500 1
2 562545366 501 1
3 562545366 5000 2
Run Code Online (Sandbox Code Playgroud)
我想得到如下数据
ID FedTaxID RegularPay Payperiodnumber
2 562545366 501 1
3 562545366 5000 2
Run Code Online (Sandbox Code Playgroud)
我尝试了一些如下的事情,但我没有得到所需的结果
select max(id) ID,regularpay,fedtaxid,payperiodnumber
from tblemployeegrosswagesn1 where fedtaxid="562545366"
group by payperiodnumber
having count(*) >= 1;
Run Code Online (Sandbox Code Playgroud)
谁能帮我
我有一个datagridiview动态绑定到a datatable.我想将标题中的一些列对齐到右对齐.
我datagridview为cellstyle和headercell 尝试了这个设置.对于单元格样式,它显示正确,但对于标题,它不是:

我用过的代码:
this.dataGridView1.Columns["Quantity"].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight;
this.dataGridView1.Columns["UnitPrice"].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
Run Code Online (Sandbox Code Playgroud)
有人能帮我吗?
我有代码,它以两种不同的形式检索一个目标路径.如果,在一种形式中,我选择一个路径来打开文件并处理它,当返回到另一个表单时,我收到一个Direcotry Exception错误.我习惯了不同的字符串来获得这条路径
在第二种形式中,我称之为:
string strFilePath2;
strFilePath2 = Directory.GetCurrentDirectory();
strFilePath2 = Directory.GetParent(strFilePath2).ToString();
strFilePath2 = Directory.GetParent(strFilePath2).ToString();
strFilePath2 = strFilePath2 + "\\ACH";
Run Code Online (Sandbox Code Playgroud)
我的第一个表格是:
strFilePath = Directory.GetCurrentDirectory();
strFilePath = Directory.GetParent(strFilePath).ToString();
strFilePath = Directory.GetParent(strFilePath).ToString();
strFilePath = strFilePath + "\\ACH\\" + Node;
Run Code Online (Sandbox Code Playgroud)
在调试过程中,我从第二种形式获取选定的路径,但不是我期望的路径.任何人都能说出原因吗?
我为我创建的应用程序创建了一个设置.我需要的是在开始菜单中有一个卸载选项,其中显示程序,也在安装应用程序的文件夹中.
c# ×8
winforms ×6
asp.net ×2
treeview ×2
.net ×1
datagridview ×1
javascript ×1
mysql ×1
silverlight ×1
sql ×1
sql-server ×1
textbox ×1
tooltip ×1