|
thanks but it doesn't work. in my database, for example the startDay is 1/10/2005. whereas in my program, after extracting the date value from the user, it displays as 01/10/2005.. will there be any problem if there is a zero infornt ->01/10/2005 whereas in my database is just 1/10/2005???
|
|
|
|
|
hi,
please check the date format of your database. i can't figure out this.
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
My directory always get much temporary files after compiling. I always need to pick source files (like *.cpp, *.h etc) one by one when I want to copy them to another folder or backup them. It's so pain
Fortunately, I found a program today, it's very useful to me, maybe it's useful to you too. It can copy or clean specfied type of files and integrate with Explorer, very easy to use.
It's name is Clean Now!(http://www.liuxz.com/cleannow/index.htm) I have installed it in my computer and feel good Usually, I develop with VC6 and C++Builder 6. So I create my own "File Group" like following:
VC 6 Source Files: dsw;dsp;cpp;c;h;hpp;def;clw;lib;opt;rc;ncb;
CBC 6 Source Files: h;hpp;cpp;c;lib;dfm;res;bpr;bpg;
Now, it's very easy to copy my source files to another folder or backup them without garbage: (1) Right click at my source folder (2)Move mouse to "Copy"->"VC 6 Source Files" (3) Select a destinition folder. After a few seconds, all source file and only source files will be copied to destinition folder. I don't need to pick them manually anymore!
If I don't want to copy them out, I just select "Clean"->"VC 6 Source Files", and HOLD SHIFT while clicking. All files EXCEPT source files will be deleted. My source folder become clear
You can try it out if you have interest
code, debug, code, debug ...
I love it!
|
|
|
|
|
hi,
don't post these sort of information here. Go for some other section like soap etc
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
If I have a datatable I want to bind to a listbox, how can I make the valueMember equal two columns instead of one ?
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Hello all,
I've been trying like crazy to find a way to make it so that a ScrollableControl with AutoScroll = true will not scroll to a control within that gets focus. That is, I'm talking about this part from the MSDN : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformsformclassautoscrolltopic.asp[^]
"Additionally, when autoscrolling is on, the client area of the form automatically scrolls to make the control with input focus visible."
I do not want this to happen. I need scrollbars when items are outside of the client area, but not the scroll-to-focus. I have a workaround already that involves making a specialty panel that stores its scroller's location and has methods to "snap back" to the stored location but this causes a nasty flicker.
Is there someone that has made a panel that behaves the way I want? Rewriting the Windows Forms scroll behavior is not appealing. If there's a way to stop the flicker it would be acceptable as well.
|
|
|
|
|
Hi,
My question is :
I have a checkedListBox control in a WinForm, where I am displaying 'siteName' column from a table and the checkedListBox is being populated by siteName, but when forming a dynamic query, I want to form a query by 'siteID' not the sitename. How do i make a hidden column in a checkedListBox, where it selects, 'siteID' and should display 'siteName' on the checkedListBox control.
I appreciate your help.
Thanx
abhi
|
|
|
|
|
I have a form which contains several controls. But I now need to have a few of those controls portable as they will be used several time in my tool.
I encapsulated all of the logic including the Drag and Drop logic into my own UserControl, replaced the existing control with a panel and added the portable control into the panel.
The form looks the same as it always had and it is opened as a child form in an MDI parent. While everything looks fine, I now find that my events (MouseDown, MouseMove, DragDrop) are not reaching the controls. It is as if the form is stopping them from reaching my inner control.
Is there a document anywhere that discusses the event hierarchy --- or even better the steps I need to take to bubble these events down to the embedded control?
Thanks
This signature left intentionally blank
|
|
|
|
|
Either your form or your control has a property that sets how this works, but I forget what it's called. KeyPreview, perhaps ? It's a boolean property.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Christian,
The KeyPreview boolean only passes KeyPress events down to the form before they are raised to the control. Kind of the opposite of the problem I have.
I am trying to get my mouse events recognized by embedded controls inside my user control.
Michael
This signature left intentionally blank
|
|
|
|
|
Oh crap. I found the problem!
When I copy and pasted the controls into the user control, I never rebound the event handlers in the TreeView control (which originates the whole functionality within the user control!!!!
Well, thanks for at least giving me something to look at, Christian.
This signature left intentionally blank
|
|
|
|
|
Am I crazy? I cannot for the life of me figure out how to grab a column from a datagrid and convert it into an array...
Yes, I am the highly suggestable type.
|
|
|
|
|
The DataGrid can use any of the following data sources: DataTable , DataView , DataSet , DataViewManager , IListSource , or IList from the DataSource property. Access the data is simple from that. Check out the information on the DataTable[^] which the DataSet will hold. If you are having a specific problem with one of these, post it so we can help.
- Nick Parker My Blog | My Articles
|
|
|
|
|
I am making some progress, but i am hitting a wall at one point i have code that looks like this:
string[] bender = this.DataGrid1.Items[1].Cells[0].Text.Split(new char[]{'*'});
I am wondering how to do this, and wether or not it is even worth a try:
I am looking to make Items[1] look through all the rows, not just the one specified. Basically, if there are 7 rows of info, i want it to go through rows 0-6 and create an array of all the information. to test i have a "foreach" statement that writes a line of asp .net code that displays each of the results in it's own tag.
What is bothering me is that asp .net obviously has tools in place to gather the information in the dataview and make it into an array, then display that information in a table in the form of a datagrid. i want to crack that code so that i can make it write other kinds of formats, not just a datagrid.
Yes, I am the highly suggestable type.
|
|
|
|
|
Does anyone know if I can select multiple items in a richtext box programmatically? For example :
I have an RTB containing a document that holds the phrase "C# Code" in it.
I would like to select all occurances of 'C# Code' so that I can set the SelectedColor to Blue. I also want to select all occurances of 'Java Code' and change its selected color to Red.
Can this be done with one command or must I iterate through the document and do individual Select() calls to perform this function?
|
|
|
|
|
I think there's no way around iterating through the document.
You might consider sending WM_SETREDRAW to the RichTextBox before doing your coloring to reduce flicker.
(This discussion[^] shows you how to do it)
Regards,
mav
|
|
|
|
|
Thanks for the info. I'm starting a SetColor class definition now using that example. So now I'm off to start parsing text.
|
|
|
|
|
|
i need to create a program that can convert gregorian date, month and year to lunar date, month and year. help plz.. anw how to declare date in c# and use it? for example in VB.NET is dim d as date; date = #01.02.2005#....
chris
|
|
|
|
|
You declare a date in C# the same as you do with any managed language (barring any shortcuts like with VB.NET): DateTime dt = DateTime.Now (or use any other methods of the DateTime structure.
You can use the Calendar class derivatives to convert to and from different calendars.
I recommend ready about both the DateTime structure and the Calendar class in the .NET Framework SDK, which can be installed standalone and is installed by default with Visual Studio .NET.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Anyone know how to convert this following VB.NET to C# ?
Private WithEvents _PStatus AS StatusBar
Private Sub DrawItem(ByVal sender As Object, ByVal sbdevent As System.Windows.Forms.StatusBarDrawItemEventArgs) Handles _PStatus.DrawItem
Thank
|
|
|
|
|
I'd try this:
private StatusBar _PStatus;
private void DrawItem(object sender, StatusBarDrawItemEventArgs sbdevent)
But you have to tell the StatusBar that DrawItem is the event handler for the DrawItem event by writing:
_PStatus.DrawItem += new StatusBarDrawItemEventHandler(this.DrawItem); after you've created the StatusBar.
Regards,
mav
|
|
|
|
|
Thank your..
But it doesn't work. Let me description more detail.
MyStatusBarPanel Class :
private StatusBar _PStatus;
public void DrawItem(object sender,
System.Windows.Forms.StatusBarDrawItemEventArgs sbdevent)
{ }
public StatusBarProgressPanelClass(StatusBar sb)
{
_PStatus = sb;
_PStatus.DrawItem += new StatusBarDrawItemEventHandler(this.DrawItem);
}
MyMainForm :
pnl = new MyStatusBarPanel(statusBar1);
|
|
|
|
|
Without explicitely trying for myself the only thing I see right now that _could_ cause problems would be a naming conflict between the event DrawItem and the event handler function DrawItem.
Change public void DrawItem() to private void OnDrawItem() and += new StatusBarDrawItemEventHandler(this.DrawItem); to += new StatusBarDrawItemEventHandler(this.OnDrawItem);
then it could work.
If it doesn't then it would help to know what errors you get.
mav
|
|
|
|
|
Hi Mav,
Thank your help. Actually, I forget to set a property of my parent contol, so the DrawItem never work. I find out my problem.
P.S: your first response is work fine.
Thank again
|
|
|
|