|
Hi Luc,
thank you very much for your suggestions. Sometimes the easy solutions do not come into my mind when thinking too hard about a problem
A little bit code refactoring and i am on my way again.
thank you very much again and have a nice weekend!
Brgds,
Michael
|
|
|
|
|
you're welcome.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
I have an app where I display a list of link buttons (determined by variable number or records returned from a db). I create the link buttons dynamically but the click/command event(s) do not fire when the button is selected.
Also, this is in an <asp:panel xmlns:asp="#unknown"> which is in the content section of a master page.
<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
if (!Page.IsPostBack)<br />
{<br />
}<br />
BuildLinkButtons();<br />
}<br />
<br />
protected void BuildLinkButtons()<br />
{<br />
Label lblNew = new Label();<br />
<br />
lblNew.ID = "weekLabel";<br />
lblNew.Text = "Select A Week:";<br />
lblNew.Font.Bold = true;<br />
weekPanel.Controls.AddAt(0, lblNew);<br />
weekPanel.Controls.AddAt(1, new LiteralControl(" "));<br />
<br />
int iPos = 2;
for (int i = 1; i < 10; i++)
{
LinkButton lnkBtn = new LinkButton();
lnkBtn.ID = "lnk1:" + i.ToString();
lnkBtn.Text = i.ToString();
lnkBtn.Click += new EventHandler(lnkBtn_Click);
lnkBtn.CommandName = i.ToString();
lnkBtn.Command += new CommandEventHandler(lnkBtn_Command);
weekPanel.Controls.AddAt(iPos++, lnkBtn);
weekPanel.Controls.AddAt(iPos++, new LiteralControl(" "));
}
}
void lnkBtn_Command(object sender, CommandEventArgs e)
{
// do some stuff here
}
void lnkBtn_Click(object sender, EventArgs e)
{
// do some stuff here
}
|
|
|
|
|
hello.. actually the problen is that i have added an msaccess database to my project and have buitl about 10 queries and contains 3 tables in it.
now i want to add a new table or modify an existing table in the database and when i modify the tables its not effecting in the data-sources in the project..what is the way to edit the database after adding it to the project without loosing the queries built in the dataset designer.. thans...
|
|
|
|
|
max.4u
Please Please take your time and explain things clearly.
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
www.ITS.co.za
|
|
|
|
|
sure.. actually mine is c# project.. and it has database of ms access by name test.mdb
test.mdb has a table named user_data
it has coloums id,pass.
this database is added to the project.
then i need to modify the table coloums like adding the new coloums.
when i add the new coloums its change is not taking effect in my project...
|
|
|
|
|
If i understand you correctly you went to Access Db and Opened it and change or added new columns and when you say it does not reflect in your project what do you mean ? please explain that part.
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
www.ITS.co.za
|
|
|
|
|
exactly .... and does not reflect the changes means that in my project the database in the right side in visual studio is not showing the modified tables i mean the new tows which i have added to the table...
|
|
|
|
|
Delete the Connection and recreate it , it should appear. But before you do that try to refresh it first from the Server explorer. i dont use Wizards for my database work.
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
www.ITS.co.za
|
|
|
|
|
if i recreate a new connection then i am loosing the queries i built in the dataset designer.... is it possible to make it without looosing the queries...?
|
|
|
|
|
If the Refresh in the server explorer does not work , unfortunately you will have to loose them.
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
www.ITS.co.za
|
|
|
|
|
Hi,
I want to disable all the keyboard and mouse event, but at the same time i want to show a popup where user can enter only numbers and press enter if the value is matched then all the event should be released . I tried using blockinput event but it's blocking all the events and i m not able to unblock it..
Any help would be aprciated...
thanks in advance
Prem..
modified on Thursday, April 16, 2009 10:24 AM
|
|
|
|
|
Hi,
I have implemented a device driver in state machine model using C# i.e based on the previous states output new state has to be initiated in one module.in every state i am sending info to Reader connected through serial port.Timer will be running parelally and checking for the data received event of Serial port and once data received state will be moved to nextstate.Its working fine but very inconsistent.Say executing some states and stopping there and waiting for the reply from Serial port.I cant understand whether its Timer problem or serial port problem.Can any one please reply .I will post the code used here which i used for stop module.
private void tmrCOMM_Tick(object sender, EventArgs e)
{
try
{
tmrCOMM.Enabled = false;
#region " Timeout "
if (blnCheckTimeOut)
{
intTimeout++;
if (intTimeout == 200) // 50 * 100 ms
{
AddLog("Timeout, no response from reader!");
intTimeout = 0;
intNextState = STATE_NOTHING;
intState = STATE_NOTHING;
tmrCOMM.Enabled = true;
blnCheckTimeOut = false;
Array.Resize(ref gblbMsgIn, 0);
return;
}
}
#endregion
switch (intState)
{
case STATE_STOP:
lstLOG.Items.Clear();
AddLog("STOP VarioSens...");
RetryCntr = 0;
intState = STATE_STOP_SND_GET_INV;
break;
case STATE_STOP_SND_GET_INV:
{
RetryCntr++;
StopVarioSens sv = (StopVarioSens)pMain.Controls[0];
sv.lblUID.Text = "";
Array.Resize(ref gblbMsgOut, CommandSet.bInventory().Length);
gblbMsgOut = CommandSet.bInventory();
blnRecordReceived = false;
blnCheckTimeOut = true;
intTimeout = 0;
intState = STATE_STOP_RCV_GET_INV;
AddLog(">> Inventory: " + Helper.ConvertToHexString(gblbMsgOut));
Array.Resize(ref gblbMsgIn, 0);
serialPort1.Write(gblbMsgOut, 0, gblbMsgOut.Length);
}
break;
case STATE_STOP_RCV_GET_INV:
if (blnRecordReceived)
{
blnRecordReceived = false;
if (gblbRecord[4] == 0)
{
RetryCntr = 0;
AddLog("<< Reply: " + Helper.ConvertToHexString(gblbRecord));
StopVarioSens sv = (StopVarioSens)pMain.Controls[0];
sv.lblUID.Text = "";
Array.Resize(ref gblbUID, 0);
for (int i = 0; i < 8; i++)
{
sv.lblUID.Text += string.Format("{0:x2}", gblbRecord[13-i]).ToUpper();
if (i < (gblbRecord.Length - 1))
sv.lblUID.Text += " ";
Array.Resize(ref gblbUID, gblbUID.Length+1);
gblbUID[gblbUID.Length - 1] = gblbRecord[6+i];
}
intState = STATE_STOP_SND_SET_PASSIVE;
}
else
{
AddLog("<< Reply: " + sGetVarioSensErrorDescription(gblbRecord[4]));
if (RetryCntr < 3)
{
intState = STATE_STOP_SND_GET_INV;
}
else
{
intState = STATE_NOTHING;
}
}
}
break;
}
}
Ayyappa Konakalla
|
|
|
|
|
Hello ,
I'm facing a problem ,
when i open 2 dialogs in my project my application icon disappear instead i get the ugly .net default icon showing there are 2 windows open , when i click on it , i can see the two different windows with the icons ,
my question is how can i prevent my application icon to disappear and keep it visible no matter how many open dialogs I'm viewing.
thanks in advance!
Net
|
|
|
|
|
With addition to above question
I am facing the same problem
When we click ALTER + TAB to see/select the applications running currently
it shows the same ugly icon in the list
if anybody have solution
please share with us!!!
Thanks in advance
Deep
Happy Coding
|
|
|
|
|
Rightclick on the solution in the 'Solution Explorer', and choose "Properties". Go to the tab labeled "Application", and verify that you have assigned an icon to the application (not just the mainform, as the mainform.icon != app.icon)
I are troll
|
|
|
|
|
yes i got the icon set in the application tab
and in the main form it still happens.
Net
|
|
|
|
|
there is an Icon property of form, you have to change it for each form.
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Thanks for reply Xmen!!!
This also does not work
i have done what yous said for each form in my application with addition to ShowInTaskBar property to true
however icons disappears from task bar when two or more forms are opened in the application specifically OS creates the stack(Re-groups) if other more applications are opened, and this time the icon of the stack representing my application change to icon which we can see when we choose new icon file in the Visual studio
|
|
|
|
|
does your icon contains 16x16 format ?
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
absolutely!!!!!!!
we can not provide 32x32 icon for form if we do so, we wont see it at the start of the title bar of the Form
|
|
|
|
|
SaveTigers wrote: we wont see it at the start of the title bar of the Form
that means its something wrong with your windows
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
What are you creating your Icons with? As far as i know windows requires different size icons for different things. i.e. you need to create an icon that supports multiple resolutions in order for them to be displayed in all instances.
Check this[^] out; its free, and always works for me
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
thanks musefan!!!
I was creating the icon form VS-2005
I did not used any other utility to create icon
let me use this and check if it works
anyways thanks for exploring with this tool
Happy coding
Deep
|
|
|
|
|
Thanks Eddy for reply!!!!!
This seems does not work.........
solution provided by you works only to show the icon in the task bar but not when
two form are opened or in the list appears after pressing ALTER + TAB keys
In my case what you have provided is done already but still facing the same problem
I thing either this is the bug in installer provided by the .net or it has to do with something with OS or with ICON size (as desktop icons are 32x32 and startup->program file,control panel->Add/remove program,taskbar icons are of 16x16)
I am not sure about this
what do you say??
|
|
|
|