|
How do i multi-thread a function of type
bool MethodName (object obj) ?
coz the ParametrizedThreadStart delegate only allows for vod MethodName (object obj)
- Projjal
|
|
|
|
|
You can't return anything from the method that you use to start the thread, as the call doesn't wait for the thread to end.
---
single minded; short sighted; long gone;
|
|
|
|
|
guffa is right.. u can't do that.
else i think u should use global variables if possible to store bool value.
|
|
|
|
|
thank you guffa and nouman
- Projjal
|
|
|
|
|
you cannot do it directly...using a global variables is some useless. may you need to use a callback method to your delegate. i wish it can help you
|
|
|
|
|
Hi,
i am creating a setup program using VS setup & deployment project. in which added a Textboxes (A) User interface and have one textbox visible (say EditA1). I want to make this text field mandatory . Now wizard can move next dialog without entering anything in this window.
How to solve this?
|
|
|
|
|
Use a required field validator, if it is a normal page...
and bind the controltovalidate property to the desired textbox...
I think itll work...
I was born dumb!!
Programming made me laugh !!!
--sid--
|
|
|
|
|
hi guys
i am creating a project in which i want to assign permissions on some folders/files located on my local system to users located on my network ,
any help or samle code,,,
best regards
hello
|
|
|
|
|
|
you need to check first if the Drive.CanRead property.
search in the msdn for the Drive class and how to use it. or accurately, search for Drive.CanRead property.
|
|
|
|
|
Can anyone help me out on where to find some documentation on the .ico format?
-----
*** Never give me an answer having anything to do with Visual Studio. I don't have this because I have two computers, one being my dad's mac, which is connected to the internet, the other being my pc, which is, sadly, not connected to the internet. The setup for the Visual C# program I think is called a "bootstrap" program, and it needs to connect to the internet to install the program. THEREFORE I cannot install this program onto my pc.***
|
|
|
|
|
|
|
|
Thanks guys!
-----
*** Never give me an answer having anything to do with Visual Studio. I don't have this because I have two computers, one being my dad's mac, which is connected to the internet, the other being my pc, which is, sadly, not connected to the internet. The setup for the Visual C# program I think is called a "bootstrap" program, and it needs to connect to the internet to install the program. THEREFORE I cannot install this program onto my pc.***
|
|
|
|
|
I am sending one XML node.I need the highest unitnumber.unitmumber will appear in each and every Transaction.Actually there will be more than one Transaction Node in XML File.Within all those Transactions I need the highest unitnumber.I am sending 1 Transaction Node.
<Transaction type="system" description="Transaction" offset="Added">
<Action offset="">Create</Action>
<Cause />
<Comment />
<Created />
<CreatedBy />
<EffDate offset="">5/29/2007</EffDate>
<Effective />
<Expiration />
<Id temporary="1">{4CD8B01F-1FF1-41F1-AC08-83A2A66AE071}</Id>
<Modified />
<ParentId>{AC13D0F3-0896-41BE-AB14-751D7512CB95}</ParentId>
<PolicyTermPremium>0.00</PolicyTermPremium>
<Process />
<ProRatedChangePremium>0.00</ProRatedChangePremium>
<Status offset="">Pending Issuance</Status>
<SuppressPrint />
<TotalProRatedChangePremium>0.00</TotalProRatedChangePremium>
<Type />
<UnitNumber>1</UnitNumber>
<VersionedId />
</Transaction>
-- modified at 23:15 Sunday 24th June, 2007
|
|
|
|
|
You can use XPath to find the node with the highest number, or XSLT to sort by the number then grab the last node.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
go to http://www.w3schools.com/xquery/default.asp
and read XQuery
The best way to explain XQuery is to say that XQuery is to XML what SQL is to database tables.
XQuery was designed to query XML data.
XQuery is also known as XML Query.
|
|
|
|
|
Hi all,
I think it's quite easy to delete single selection of rows in a listview.
I usually do this :
DELETE FROM Purch WHERE PurchID
LIKE '" + lvPurch.Items[lvPurch.FocusedItem.Index].SubItems[0].Text + "' "
I wonder how to delete multiple selection of rows in a Listview Control ?
Learn from yesterday, live for today, hope for tomorrow
|
|
|
|
|
Try with this Code:
int CMultipleRowDeleteView::DeleteSelectedRowsFixed(void)
{
int nSelRows = GetListCtrl().GetSelectedCount();
if(!nSelRows)
return(0);
int* pnArrayOfSelRows = new int[nSelRows];
if(!pnArrayOfSelRows)
return(0);
int nTemp = nSelRows;
POSITION pos = GetListCtrl().GetFirstSelectedItemPosition();
int i = GetListCtrl().GetNextSelectedItem(pos);
while (i != -1)
{
nTemp = nTemp-1;
pnArrayOfSelRows[nTemp] = i;
i = GetListCtrl().GetNextSelectedItem(pos);
}
for(int j=0; j < nSelRows; j++)
{
GetListCtrl().DeleteItem(pnArrayOfSelRows[j]);
}
delete(pnArrayOfSelRows);
pnArrayOfSelRows = NULL;
return(1);
}
Hope this will Help you.
Regards,
Satips.
|
|
|
|
|
;Pfirst you need to get the selected rows :
object a = ListView.SelectedRows....
then you can delete it by calling the method Remove(); :
a[0].Remove();
if it's not working, so try :
a.Clear();
GoodLuck
|
|
|
|
|
Hi All,seems a great challenge,until now seems no one of some senior programmers in big consulting companies found a solution.
Problem:
We've got a complex User control, which is organized in 5 classes:
Shape
Corner
Color
Designer
UiTypeEditor
in "Color" we've got around 20 Properties indicating Different Brushes properties based on fixed value ranges.(PathBrush Distance from Center,a
Linear Gradient property based on an Enum which let User choose only stepped values as "Top,TopLeft" etc. as position for colors..)
We got in Corner,something similar to "Color class" in which we define all proportions and values only for having an independent object which act
as corner for a rounded rectangle.
In the "Shape Class" we have finally a Graphics access with the method for creating and colorizing our Graphic UserControl.
We reached the ability to Have a "Color" Category in PropertyGrid,but ONLY using all I explained in first class in file.
We tried using PostFilterProperties driven by a "FillingType" property(PathGradient,LinearGradient,Solid etc..)If we select from one of those values
we're able to show ONLY needed properties for type selected.(Ex. If Master Property is set to "Solid Fill Type",then Properties under It will be only
Color Solid and Transparency(Alpha)....If We select "LinearGradient",all Solid Fill Values disappear and appear in propertygrid ColorGradientA and ColorGradientB and so on for textureFill etc..)All that Works but:
For viewing result of switching we need to dispose control and re-drop from toolbox,we are NOT YET ABLE to expose to property grid something is coming
from other classes in same namespace(We got ALL Geometric values and methods in "Shape Class" and we would like to "pass" as fillpath(argument)
Our FillType selected by PropertyGrid.We tried Invalidate(),Refresh(),but nothing,and ever with First class.We would like to be able to
public class Shape
{
/// only generic snippet here for example...
public int var;
public int CornerRadius
{
get{...}
set{...}
}
}
//here real snippets
public class Color
{
public static string[] PropertiesToRemove = new string[13];
public enum FillTypeEnumerator
{
Solid,
LinearGradient,
PathGradient,
Texture
}
FillTypeEnumerator FillTypeValue = FillTypeEnumerator.Solid;
[Category("Color")]
public FillTypeEnumerator FillType
{
get { return FillTypeValue; }
set
{
FillTypeValue = value;
switch (FillTypeValue)
{
case FillTypeEnumerator.Solid:
PropertiesToRemove.SetValue("LinearGradientTransparencyA", 0);
PropertiesToRemove.SetValue("LinearGradientTransparencyB", 1);
PropertiesToRemove.SetValue("LinearGradientColorA", 2);
PropertiesToRemove.SetValue("LinearGradientColorB", 3);
PropertiesToRemove.SetValue("LinearGradientPositions", 4);
PropertiesToRemove.SetValue("PathGradientCenterColorTransparency", 5);
PropertiesToRemove.SetValue("PathGradientCenterColor", 6);
PropertiesToRemove.SetValue("PathGradientSurroundColor", 7);
PropertiesToRemove.SetValue("PathGradientSurroundColorTransparency", 8);
PropertiesToRemove.SetValue("PathGradientFocusDistance", 9);
PropertiesToRemove.SetValue("PathGradientCenterPosition", 10);
PropertiesToRemove.SetValue("TextureImage", 11);
break;
case FillTypeEnumerator.LinearGradient:
PropertiesToRemove.SetValue("SolidTransparency", 0);
PropertiesToRemove.SetValue("Solid", 1);
PropertiesToRemove.SetValue("PathGradientCenterColorTransparency", 2);
PropertiesToRemove.SetValue("PathGradientCenterColor", 3);
PropertiesToRemove.SetValue("PathGradientSurroundColor", 4);
PropertiesToRemove.SetValue("PathGradientSurroundColorTransparency", 5);
PropertiesToRemove.SetValue("PathGradientFocusDistance", 6);
PropertiesToRemove.SetValue("PathGradientCenterPosition", 7);
PropertiesToRemove.SetValue("TextureImage", 8);
break;
case FillTypeEnumerator.PathGradient:
PropertiesToRemove.SetValue("LinearGradientTransparencyA", 0);
PropertiesToRemove.SetValue("LinearGradientTransparencyB", 1);
PropertiesToRemove.SetValue("LinearGradientColorA", 2);
PropertiesToRemove.SetValue("LinearGradientColorB", 3);
PropertiesToRemove.SetValue("LinearGradientPositions", 4);
PropertiesToRemove.SetValue("TextureImage", 5);
PropertiesToRemove.SetValue("SolidTransparency", 6);
PropertiesToRemove.SetValue("Solid", 7);
break;
case FillTypeEnumerator.Texture:
PropertiesToRemove.SetValue("LinearGradientTransparencyA", 0);
PropertiesToRemove.SetValue("LinearGradientTransparencyB", 1);
PropertiesToRemove.SetValue("LinearGradientColorA", 2);
PropertiesToRemove.SetValue("LinearGradientColorB", 3);
PropertiesToRemove.SetValue("LinearGradientPositions", 4);
PropertiesToRemove.SetValue("PathGradientCenterColorTransparency", 5);
PropertiesToRemove.SetValue("PathGradientCenterColor", 6);
PropertiesToRemove.SetValue("PathGradientSurroundColor", 7);
PropertiesToRemove.SetValue("PathGradientSurroundColorTransparency", 8);
PropertiesToRemove.SetValue("PathGradientFocusDistance", 9);
PropertiesToRemove.SetValue("PathGradientCenterPosition", 10);
PropertiesToRemove.SetValue("SolidTransparency", 11);
PropertiesToRemove.SetValue("Solid", 12);
break;
}
this.Invalidate();
}
}
//SolidFill
int SolidTransparencyValue = 255;
[Category("Color")]
[Editor(typeof(TrackBarEditor), typeof(UITypeEditor))]
public int SolidTransparency
{
get { return SolidTransparencyValue; }
set { SolidTransparencyValue = value; this.Invalidate(); }
}
ColorDialog FillSolidColorDialog = new ColorDialog();
[Browsable(true)]
[Category("Color")]
public Color Solid
{
get { return Color.FromArgb(SolidTransparency, FillSolidColorDialog.Color); }
set { FillSolidColorDialog.Color = value; this.Invalidate(); }
}
}
}
Why for Example I cannot see in property Grid "Solid" Property and I'm be able to see ONLY Shape properties?
What we have to do?IExtenderProvider?
What needs PropertyGrid in System.Reflection for searching also in 2nd,3rd,n class?Service,a CustomDesigner?
Is possible Idictionary is filled ONLY by properties of 1st class? Simply re-populating the "Default Designr PropertyDescriptorCollection I would be able to...seems not...
Please we're in the middle of the Sea..try to Win this challenge!
Thanks to all for Patience!
Frank Drebin
|
|
|
|
|
HI
the problem is this :
i have made a one page presentation in MS PowerPoint with effects
i would like to displat it throw a web browser control
till know it's fine, but the scroll bar that comes with the web browser is annoying (of cuorse i had it disabled - it's property )
but it us still appear when i run th APP
HELP(not the beatles, hhhhhh)
THNKS
;P;P;P;P
kobkob
|
|
|
|
|
|
hhhhhhhh
been there already
i did try to make flash movie with alot of sucsess
BUT couldent load it throw the web control (i probably need macomedia to be instaled)
by the way : before the PPT is presented there's a
save load cancal dialog box, CAN I GET RIDE OF HIM????
THNKS anyway
kobkob
|
|
|
|
|