|
Thanks, Henry,
Summary : turns out the problem was with the side-effects of using Dock = DockStyle.Fill on my Row Panels. Whether this is VS 2010 or me : don't know (my machine with VS 2008 is down). Fix turned out to be pretty easy : just manually set the tops of the Row Panel objects.
In fact I did play with both AutoScrollMargin and AutoScrollMinSize properties; tried setting them both 32,32, setting them both to 64,64, as well using them at their default values of 0,0 : no change in behavior in my panel.
So then I thought maybe the problem is related to the fact the Panel is being hosted inside a Panel of a SplitContainer. So I took the main panel out of the SplitContainer and put it directly on the form : same result.
So I set up a test program : no problem forcing horizontal scrollbars to appear with a Panel on the Form or inside one of the Panels of a SplitContainer !
Back to the drawing board : I discovered that what is suppressing the display of the Horizontal Scrollbar is setting the Dock property of the newly constructed Row Panel object (containing a bunch of Column Panel objects) to 'Top.
By taking out the call to set DockStyle to 'Top : the Horizontal scroll bar appears : of course then all the Row Panels appear on top of each other !
So I tried hard-coding setting the Row Panels height and width after using 'Dock, as well as before : no change. I experimented with many variations of setting Dock before and after adding the Row Panel object to the top-level container Panel, etc. No difference.
Seems like whenever I use Dock (followed by 'BringToFront) to cause correct vertical display of the Row Panel objects : it over-rides the width of the RowPanel object and sets it to the size of the container Panel.
Here's a hierarchy of what I am doing :
Outer Container Panel
Row Panel 1
Columm Panel 1
Column Panel 2
Row Panel 2
And so forth. Inside the Row Panel the Column Panels are docked Left.
best, Bill
"Many : not conversant with mathematical studies, imagine that because it [the Analytical Engine] is to give results in numerical notation, its processes must consequently be arithmetical, numerical, rather than algebraical and analytical. This is an error. The engine can arrange and combine numerical quantities as if they were letters or any other general symbols; and it fact it might bring out its results in algebraical notation, were provisions made accordingly." Ada, Countess Lovelace, 1844
|
|
|
|
|
Well, about a month ago I posted a question in this forum because I ran into a massive problem in my program. I had over a hundred icons in 2 toolStrips. And then out of nowhere, for no particular reason, I opened Vis. Studio the next day to find that all of those Icons had dissappeared. No errors while debugging or anything. I could still click where the Icons should've been, and the program would perform the specified task, but the icons were just gone. And it's just recently happened again.
In short. Atleast, In my situation, this was caused by duplicate resources. I have no idea how it happened. But I removed sll the resources and then re-added them again and all is fine.
jase.
P.S. I remember telling somebody that I would post my findings, but I couldn't find my original post so I decided to create a new one.
Yay! problem solved lol
|
|
|
|
|
Hello,
I am developing one desktop application using odbc with access database.
I am getting an error while executing following line.
SELECT ShipmentAdvice.AdviceNo, ShipmentAdvice.ContractNo,ShipmentAdvice.BuyContNo,ShipmentAdvice.Dt,ShipmentAdvice.PLoading,ShipmentAdvice.PDischarge,ShipmentAdvice.FDest,ShipmentAdvice.Ship_Code,ShipmentAdvice.ETA,ShipmentAdvice.ETD,ShipmentAdvice.Vessel,ShipmentAdvice.BlNo,ShipmentAdvice.Buyer,ShipmentAdvice.Supplier,ConditionMst.Con_Text
from ShipmentAdvice LEFT OUTER JOIN ConditionMst
ON ShipmentAdvice.Ship_Code=ConditionMst.Con_No ON ConditionMst.Mode='SHIP')
where AdviceNo='NI0901114_34'];
I am geeting error say "syntax error (missing operator) in query expression 'ShipmentAdvice.Ship_Code=ConditionMst.Con_No ON ConditionMst.Mode='SHIP'.
Please help me.
Thank you in advance.
|
|
|
|
|
This is a SQL problem and not in any way related to Windows Forms so you are in the wrong forum.
To debug SQL problems you execute the SQL statement in a Database Tool rather than from your program.
krinaljariwala wrote: I am developing one desktop application using odbc with access database.
Using Access is a poor decision. You should look into using SQL Express[^]
|
|
|
|
|
Thanks for yr suggestion , sorry i am in the wrong forum.
|
|
|
|
|
Hi all.
I am currently doing the following to load my data sources from DLL's.
I have a DLL with 3 datasets and various datatables and tableadapters. I get a list of these through the following
Dim Assem As Assembly = Assembly.LoadFile(AssemFilename)
Dim AssemTypes() As System.Type = Assem.GetTypes
Now I can create an Object to one of these tableadapters like this
Dim TAType As Type = Assem.GetType(t)
Dim TAObj As Object = Activator.CreateInstance(TAType)
and I can use that object to retrieve data from the database.
Dim result As Object = CallByName(Obj, "GetData", CallType.Method, Nothing)
My problem is, I want to know what commands (Fill, FillBySurname, FillByCode) etc are on the TableAdapter (TAObj Above). Or at least to get the SQL commands so that I can set any parameters required in the CALLBYNAME command above.
Many thanks for any assistance.
|
|
|
|
|
The Windows 7 RC Training Kit for Developers [^] has been released. This version of the training kit includes 10 presentations and 8 Hand-On-Labs, covering most of the Windows 7 light-up features as well as application compatibility topics.
|
|
|
|
|
Please can someone help.
I am trying to run an application on a machine that does not have Visual Studio 2008 installed.
I am getting an error message "This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix the problem."
I have installed the distributable libraries on this machine. I have compiled my code under release mode. Update the machine with all patches from Microsoft update as well.
I used the setup and deployment wizard too to see if that would solve my problem.
What else could I have missed?
Can someone please help.
|
|
|
|
|
Umm does the client machine have the .net framework installed (the proper version of it as well)?
|
|
|
|
|
Yes.
If this helps, it's just a plain dialog based application.
Being curious, I created an application using the wizard, and tried it on the machine. Same result.
|
|
|
|
|
Hi, This is manjari and im facing some problem to getting no of copies.i cant get the particular method to restrict the no of copies in printdialog.tell me the proper method which will restrict the no of copies .menas if a user will give 10 copies to print if that user hv limit for 9 copies then it should blocked.hw i will restrict plz help me.
thanks,
regards,
manjari.
How i will design a a form in windows service to print a document.
|
|
|
|
|
The short answer is, you can't.
|
|
|
|
|
Wow. Two "you can't" in a row. You're on a anti-roll. Yeah, that's pretty weak but what the heck.
|
|
|
|
|
I aim to please!
I really thought the long answer was WAY beyond his skill level.
|
|
|
|
|
Hi Dave,
really i appriciate ur view.nw i m in notice period.i m leaving this company.but in this period also he told try to restrict no of copies of print dialog.hw yaar.i tried to set flags of copies and copycount method also set.but it returns only 1 copy not multiple copies.in this 8 days i will give whatever i searched.
and one more thing personally i want 2 share with u .when i gave resignation thattime my p.m called me personally and told i want u people for permanent position.why u want to leave this company.i just gave little smile and told what should i will do.i got another offer and i signed the agreement.
and one more thing plz give ur mailid,if u want.i want to keep touch with u.hw z ur life going on.if u thing that i m ur true frnd then mail me.take care.bye.hv a nice day.
How i will design a a form in windows service to print a document.
|
|
|
|
|
Hi Dave,
finally i got the solution.i restricted no of copies of printdialog.my project is finished.takecare.bye.
How i will design a a form in windows service to print a document.
|
|
|
|
|
Then share the solution with everyone else here.
|
|
|
|
|
ok. fine i m giving the code for restrict the no of copies of print dialog.
if (ds.Tables[0].Rows.Count > 0)
{
cmd = new MySqlCommand("select credencials.Limit-credencials.`No of Pages` from credencials where UserName='" + txtusername.Text + "' and Password='" + txtpassword.Text + "'", con);
{
adp = new MySqlDataAdapter(cmd);
ds = new DataSet();
adp.Fill(ds);
PrintDialog dia = new PrintDialog();
dia.PrinterSettings = ps;
if (dia.ShowDialog() == DialogResult.OK)
{
timer1.Dispose();
Copies = ps.Copies;
Copies = (short)(Copies * job.NumberOfPages);
if (Copies >= Convert.ToInt32(ds.Tables[0].Rows[0][0].ToString()))
{
MessageBox.Show("Exceed Printing Limit is " + Copies.ToString());
dia.ShowDialog();
timer1.Dispose();
job.Resume();
this.Hide();
}
else
{
timer1.Dispose();
job.Resume();
this.Hide();
}
using this code u can restrict the no of copies of print dialog with ur database copies.
takecare.
bye.
How i will design a a form in windows service to print a document.
|
|
|
|
|
This only restricts the number of copies in your app. Your original post came acrossed like you wanted to limit the number of copies in EVERY application running on the system.
|
|
|
|
|
Hi dave,
see first u run ur application then go to any like notepad or pdf or wordpad.give the print option then u wil get the print dialog box after clicking ok the pop up will come to ask username and password while thattime ur job is in pause mode.if valid it will ask for no of copies.if that particular user have limit like 6 copies it cant permit to 7 copies,and it will blocked.thats what he wants.he wants to do this one one exe or a service and implement it.i hope u understud my point.
c u.
takecare.
bye.
manjari.
How i will design a a form in windows service to print a document.
|
|
|
|
|
Ha Manjari ,
Pls email me at subashis.halder@wachovia.com
Regards
Subashis
|
|
|
|
|
There is a number of pc connected in LAN.
I want to run my Application on remote PC and also need the acknowledgement for the clicked button.
For e.g.
In my application there is form with "YES" and "NO" button.
I want the acknowledgement for which button user has been clicked?
|
|
|
|
|
You cannot do that. A process launched remote cannot be launched as an interactive process. The users will never see the form, even though the app will be running.
The process has to be launched by the user on their own machine in order to be visible. I think you need to rethink your design... perhaps using a web forms-based solution and an internal web server.
|
|
|
|
|
Have any of you come across, or, more interestingly, found a work-around for the bug in ListView, where doing multi-select in a multi-column control, with check boxes and full-row select enabled, causes the check state of already selected items to change? It's really annoying, as I'd like to keep full row selection, and multi-select. (edit : more detailed description below)
I found a message from MS admitting there was a problem, dated 2002( ) so it looks like they're not in any hurry to fix it.
The alternative is to track all the select and checked states myself, and do my own updates in the selection changed handler, which is just extra work and extra code.
I'm hoping somebody has a quick and easy solution, but none of the searches I've done has turned up anything useful...
edit : a more detailed description of the problem :-
Create a multi-column ListView, set to "Details" view mode, with checkboxes enabled (they appear in the first column), as well as multi-select and full row select.
Try selecting, and checking the checkboxes. When multi-selecting (ctrl+click) and clicking in any except the first column, the check boxes for rows already selected will nearly always toggle state.
There are three kinds of people in the world - those who can count and those who can't...
modified on Friday, June 5, 2009 2:10 PM
|
|
|
|
|
I recently answered this in another thread:
http://www.codeproject.com/Messages/3417741/Re-how-to-disable-multi-select-of-checkbox-in-list.aspx
HTH - hground
|
|
|
|