|
Member 8574327 wrote: Could you please provide me some example??
No, there are a few well documented ones on the Internet. Google is your friend
Full-fledged Java/.NET lover, full-fledged PHP hater.
Full-fledged Google/Microsoft lover, full-fledged Apple hater.
Full-fledged Skype lover, full-fledged YM hater.
|
|
|
|
|
I've got a datagridview with a column header row and some content rows that have top borders, and some content rows that don't.
When I scroll the grid, rows that have a top border don't collapse into the column header border and I end up with a double border.
What's the easiest way to collapse the border being scrolled either up or down? (Some events fire in only one direction).
|
|
|
|
|
I'm working with an Infragistics UltraGrid. The Add Row "*" thing is not appearing. Anyone know how to get this to show up?
If it's not broken, fix it until it is
|
|
|
|
|
There are two solutions given here[^]. One of them might help you.
|
|
|
|
|
maine kunjvihar se vada pav liya lekin usne chatni kam di aur bola k kande ka price jyada ho gaya hai kar k tereko chatni milni hi nahi chahiye thi ehsan maan maine de diya
|
|
|
|
|
This is an English speaking site. It really helps to posted your question in English if you expect an answer.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
Yes. And I want two of them. With mayonnaise.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Hello Sir/Mam
I'm trying connect sql server 2000 in windows service with other system on same network.
there are 4 system connected without any problem. But on other 4 system, it is giving error
on connection open while starting windows service. The error is: "the service on local computer started and then stopped some services stop automatically" etc. Same Connection string working in web service
without any error. But giving problem in Window Service. Is there any Configuration setting of that server or sql server 2000. Any help will be highly appreciated.........
|
|
|
|
|
Are you, by any chance, using a trusted connection? When you install a service it, by default, is installed using a specific account - and that account might not be trusted by your database.
|
|
|
|
|
Could be that, could be a firewall, could be something else.
Before trying to fix it though I'd introduce a minimum of logging in the service so in future you don't have to stare blindly at that nearly information-free message: "the service started, and then stopped unexpectedly".
It's also nice to have the ability to debug service initialization. To do this, introduce a config setting and put a method like this into your service class:
static void AwaitDebugger()
{
string s = ConfigurationManager.AppSettings["debug"];
if (s == null || s.ToLower() != "true") return;
DateTime until = DateTime.Now.AddSeconds(30);
while (DateTime.Now < until && !Debugger.IsAttached)
Thread.Sleep(50);
if (Debugger.IsAttached)
Debugger.Break();
}
Now in the service main thread, just insert a call to this method before doing anything else. (Not in the start method that probably simply starts the main thread; you want this method to return immediately as before. But in the thread it starts, you want to wait for a debugger to attach if so configured.) Build, deploy, and debug!
|
|
|
|
|
You might want to tell the OP this. I already know how to do this.
|
|
|
|
|
Hi,
Docking is quite useful in creating UI's, but when you Dock something: the "Margin" property settings of what you Dock are ignored.
In the past, I've created several types of UI's where an "outer" Panel's ControlCollection consists solely of identical "inner" Panels, all of the same type.
Setting all these "inner Panels" to Dock = Top, or whatever is very useful, but they will all be "jammed together" visually: Any Margin.Top or Margin.Top settings of these inner Panels will be ignored.
So far, my strategy for creating a better visual experience has been to use UserControls, not "raw" Panels, for the inner things-that-act-like-Panels:
Each UserControl has an "inner" Panel inside an "outer" Panel. Both these have Dock set to 'Fill. By setting the background color of the outer Panel to the same color as its outermost Panel, "the host," and then setting the Padding property of the outer Panel in the UserControl to offset the differently colored inner Panel of the UC:
Then, when they get all "jammed together" by docking, you can at least simulate a nice visual effect of space between the Docked inner Panels.
A logical question for you to be asking right now is: why not just set the UserControl BackColor to the same color as its host container, and have only one Panel in the UC: while I have done this, the simple answer is that I prefer the more fine-grained control possible (I can create fancier visual effects), by having outer/inner Panels in the UC.
I wonder if there is a simpler way to approach this ?
I guess in an ideal world ... hah ... we could have an over-load of the Dock mechanism, that you would pass a bool into with a name like "respectMarginSettings"
Should I add some links to "before" and "after" small .jpg screen-shots to this question, to make crystal-clear the visual results I am talking about ?
best, Bill
"Everything we call real is made of things that cannot be regarded as real." Niels Bohr
|
|
|
|
|
I find your question confusing, because I can't recall having seen a single Windows Forms control where the Margin settings actually produce any effect. I've always had to reach for Padding instead. But this does lead to just a quick suggestion: try to use padding instead, and let us know if that works.
|
|
|
|
|
This maybe academic but here goes anyway...
I'm drawing custom borders for a datagridview in the datagridview's paint event, the one in a Windows form. That works fine until I edit a cell.
When I edit a cell, the top and left grid borders (which are drawn by me in the grid's paint event) are over-layed by the EditingPanel control of the datagridview class.
So the borders disappears and the cell looks like it has only two borders...bottom...and right.
I subsequently created a custom column and cell template for the grid but no matter what I've tried so far, I can't get to the event that's overwriting my borders to either have it paint the missing borders themselves, or stop it from overwriting the ones that I'm drawing.
It would seem that this type of task needs to be accomplished all the time and I just don't know how...so I'm totally missing the boat on this one.
Would someone please let me in on the secret of how to (the proper procedures) for painting custom borders around the datagridview cell I'm editing?
The borders should be in alignment with the grid's boarders and have the ability to be drawn in different colors.
Please advise and thanks!!!
Mark
|
|
|
|
|
I guess a few hours of sleep help sometimes...I think that this is the way...
Private Sub Grid_CellPainting(sender As Object, e As System.Windows.Forms.DataGridViewCellPaintingEventArgs) Handles Grid.CellPainting
Try
'Paint the cell if the edit control is visible
If Grid.EditingControl IsNot Nothing Then
Dim g As Graphics = Graphics.FromHwnd(Grid.EditingPanel.Handle)
g.DrawRectangle(Pens.Red, Grid.EditingPanel.ClientRectangle)
g.Dispose()
End If
Catch ex As Exception
Debug.print(ex.Message)
End Try
End Sub
|
|
|
|
|
Hi All,
I am trying to create a folder under CommonAppDataFolder during install. It works fine for my Windows7 x64 computer, but the folder does not get created for WindowsXP x86 computer.
In Windows7 I get a folder "C:\ProgramData\MyCompany\MyProgram"
In Windows XP I would have expected a folder "C:\Documents and Settings\All Users\MyCompany\MyProgram", but that folder does not get created. On both computers I can manually create the folder with the user I am logged into, so I don't think its a permission thing.
In VS Setup Project I create a custom folder using "add special folder" saying that the DefaultLocation is: [CommonAppDataFolder][Manufacturer]\[ProductName], then I set the Property property to "COMMONAPPDATAFOLDER".
Is there something I am missing? Something specific to Windows XP?
|
|
|
|
|
It's under C:\Documents and Settings\All Users\Application Data\MyCompany\MyProgram.
The Application Data folder is hidden so it won't show up in Explorer unless you turn on "View hidden files and folders". You can still get to it by typing the path in the address bar in an Explorer window.
|
|
|
|
|
Excellent. That was it. I focused so much attention on Visual Studio, instead of digging deeper into the operating system. Thank You!
|
|
|
|
|
you can use inno setup to create your install programme, this little app can do anything if you write a pascal-like script. just find that if the folder is exist and do the sub prog to do the next work.
|
|
|
|
|
Hi, how to wrap DataGrid View column?Even though I set the WrapMode in DefaultCellStyle property of DataGridView to True,still wrapping is not happening.How to wrap the text in grid view column?
modified 6-Aug-12 3:51am.
|
|
|
|
|
It doesn't wrap until you move to a new cell and thus complete the edit.
|
|
|
|
|
How to create parent form and child form usin c#.
I want to create a parent form and two or three radio buttons should be on parent form, when user click on 1st radio button then a child form should be opened related to 1st radio button and another radio button vice-versa.......
Please reply Quickly.........
DSPNEO
|
|
|
|
|
Put a button on there, doubleclick;
public void Form1_Button1_Click(object sender, EventArgs e)
{
using(var myForm = new FormChildWithCoolName())
{
myForm.ShowDialog(this);
}
}
DSPNEOqqq wrote: Please reply Quickly.........
Quickly, quickly Zathras..
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Eddy Vluggen wrote: Quickly, quickly Zathras..
Babylon 5?
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
Yup
|
|
|
|